vtprotocolplugins/DisplaySink/inc/CVtImageScalerImplWeightedAverage.h
changeset 0 ed9695c8bcbe
equal deleted inserted replaced
-1:000000000000 0:ed9695c8bcbe
       
     1 /*
       
     2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:    Image Transforms subsystem.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CVTIMAGESCALERIMPLWEIGHTEDAVERAGE_H
       
    22 #define CVTIMAGESCALERIMPLWEIGHTEDAVERAGE_H
       
    23 
       
    24 // INCLUDE FILES
       
    25 
       
    26 #include "CVtImageScalerImpl.h"
       
    27 
       
    28 // CLASS DECLARATIONS
       
    29 
       
    30 /**
       
    31 *  Weighted average scaler implementation.
       
    32 *
       
    33 *  @lib videosource.lib
       
    34 */
       
    35 class CVtImageScalerImplWeightedAverage : public CVtImageScalerImpl
       
    36     {
       
    37     private: // from CVtImageScalerImpl
       
    38 
       
    39         /**
       
    40         * From CVtImageScalerImpl. Check CVtImageScalerImpl for description.
       
    41         */
       
    42         TInt Scale( TBool& aContinue );
       
    43 
       
    44     private: // methods
       
    45 
       
    46         /**
       
    47         * Validate given parameters.
       
    48         */
       
    49         void ValidateSourceTargetL(
       
    50             const CVtImage& aSource,
       
    51             CVtImage& aTarget );
       
    52 
       
    53         /**
       
    54         * Initializes internal variables for scaling.
       
    55         */
       
    56         void Initialize();
       
    57 
       
    58         /**
       
    59         * Scales images in displaymode EColor4K.
       
    60         */
       
    61         void Scale4K();
       
    62 
       
    63         /**
       
    64         * Scales images in displaymode EColor64K.
       
    65         */
       
    66         void Scale64K();
       
    67 
       
    68         /**
       
    69         * Scales images in displaymode EColor16M.
       
    70         */
       
    71         void Scale16M();
       
    72 
       
    73         /**
       
    74         * Scales images in displaymode EColor16MU.
       
    75         */
       
    76         void Scale16MU();
       
    77 
       
    78         /**
       
    79         * Scales images in displaymode EColor16MA.
       
    80         */
       
    81         void Scale16MA();
       
    82 
       
    83         /**
       
    84         * Fast scaling when target is double the source size for
       
    85         * 4K and 64K display modes.
       
    86         */
       
    87         void Scale2x4K64K( TUint32 aMask );
       
    88 
       
    89         /**
       
    90         * Fast scaling when target is double the source size for
       
    91         * 16M display mode.
       
    92         */
       
    93         void Scale2x16M();
       
    94 
       
    95         /**
       
    96         * Fast scaling when target is double the source size for
       
    97         * 16MU and 16MA display modes.
       
    98         */
       
    99         void Scale2x16MU16MA();
       
   100 
       
   101     private: // data
       
   102 
       
   103         // Target width ratio to source width
       
   104         TUint32 iU;
       
   105 
       
   106         // Target height ratio to source height
       
   107         TUint32 iV;
       
   108 
       
   109     };
       
   110 
       
   111 #endif // CVTIMAGESCALERIMPLWEIGHTEDAVERAGE_H
       
   112 
       
   113 // End of File
       
   114 
       
   115