1 /* ------------------------------------------------------------------ 2 * Copyright (C) 1998-2009 PacketVideo 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 * express or implied. 14 * See the License for the specific language governing permissions 15 * and limitations under the License. 16 * ------------------------------------------------------------------- 17 */ 18 #ifndef CCZOOMROTATION16_H_INCLUDED 19 #define CCZOOMROTATION16_H_INCLUDED 20 21 #ifndef OSCL_BASE_H_INCLUDED 22 #include "oscl_base.h" 23 #endif 24 25 #ifndef CCZOOMROTATIONBASE_H_INCLUDED 26 #include "cczoomrotationbase.h" 27 #endif 28 29 /** 30 * This class is for 16 bit color conversion. The APIs usage is the same as 31 * ColorConvertBase. The output format for RGB is 5-6-5 bits. 32 */ 33 34 class ColorConvert16: public ColorConvertBase 35 { 36 public: 37 38 OSCL_IMPORT_REF static ColorConvertBase* NewL(void); 39 OSCL_IMPORT_REF virtual ~ColorConvert16(); 40 int32 Init(int32 Src_width, int32 Src_height, int32 Src_pitch, int32 Dst_width, int32 Dst_height, int32 Dst_pitch, int32 nRotation = 0); 41 int32 SetYuvFullRange(bool range); 42 int32 SetMode(int32 nMode); //nMode : 0 Off, 1 On 43 int32 Convert(uint8 *srcBuf, uint8 *destBuf); 44 int32 Convert(uint8 **srcBuf, uint8 *destBuf); 45 int32 GetOutputBufferSize(void); 46 47 48 private: 49 ColorConvert16(); 50 51 uint32 mCoefTbl32[516]; 52 uint8 *mCoefTbl; 53 int32 get_frame16(uint8 **src, uint8 *dst, DisplayProperties *disp, uint8 *COFF_TBL); 54 55 int32 cc16Rotate(uint8 **src, uint8 *dst, DisplayProperties *disp, uint8 *COFF_TBL); 56 int32 cc16ZoomIn(uint8 **src, uint8 *dst, DisplayProperties *disp, uint8 *COFF_TBL); 57 int32 cc16ZoomRotate(uint8 **src, uint8 *dst, DisplayProperties *disp, uint8 *COFF_TBL); 58 59 private: 60 int32(ColorConvert16::*mPtrYUV2RGB)(uint8 **src, uint8 *dst, DisplayProperties *disp, uint8 *COFF_TBL); 61 }; 62 63 #endif // CCZOOMROTATION16_H_INCLUDED 64