| 1 | /****************************************************************************** |
|---|
| 2 | *_Copyright (c) 2009 Digital Stream Technology Inc. All Rights Reserved. |
|---|
| 3 | * |
|---|
| 4 | * Module: dsthalpic.h |
|---|
| 5 | * |
|---|
| 6 | * Description |
|---|
| 7 | * Picture Tuning or Quality APIs |
|---|
| 8 | * |
|---|
| 9 | * @author |
|---|
| 10 | * @version $Revision: 1.1 $ |
|---|
| 11 | * |
|---|
| 12 | ******************************************************************************/ |
|---|
| 13 | |
|---|
| 14 | #ifndef __DSTHAL_PIC_H__ |
|---|
| 15 | #define __DSTHAL_PIC_H__ |
|---|
| 16 | |
|---|
| 17 | /****************************************************************************** |
|---|
| 18 | * MEMC Mode |
|---|
| 19 | ******************************************************************************/ |
|---|
| 20 | typedef enum |
|---|
| 21 | { |
|---|
| 22 | DHL_PIC_MEMC_OFF = 0, |
|---|
| 23 | DHL_PIC_MEMC_WEAK, |
|---|
| 24 | DHL_PIC_MEMC_MIDIUM, |
|---|
| 25 | DHL_PIC_MEMC_STRONG |
|---|
| 26 | } DHL_PIC_MEMC_MODE; |
|---|
| 27 | |
|---|
| 28 | /****************************************************************************** |
|---|
| 29 | * DHL Rectangle Definition |
|---|
| 30 | ******************************************************************************/ |
|---|
| 31 | typedef struct tag_DHL_RECT |
|---|
| 32 | { |
|---|
| 33 | DS_U16 Top; |
|---|
| 34 | DS_U16 Left; |
|---|
| 35 | DS_U16 Height; |
|---|
| 36 | DS_U16 Width; |
|---|
| 37 | } DHL_RECT, *P_DHL_RECT; |
|---|
| 38 | |
|---|
| 39 | /****************************************************************************** |
|---|
| 40 | * DHL RGB Component Definition |
|---|
| 41 | ******************************************************************************/ |
|---|
| 42 | typedef struct tag_DHL_RGB_TRIPLET |
|---|
| 43 | { |
|---|
| 44 | DS_U8 RComponent; |
|---|
| 45 | DS_U8 GComponent; |
|---|
| 46 | DS_U8 BComponent; |
|---|
| 47 | } DHL_RGB_TRIPLET, *P_DHL_RGB_TRIPLET; |
|---|
| 48 | |
|---|
| 49 | typedef struct tag_PIC_PARAM |
|---|
| 50 | { |
|---|
| 51 | DS_U32 Brightness; |
|---|
| 52 | DS_U32 Contrast; |
|---|
| 53 | DS_U32 Saturation; |
|---|
| 54 | int Hue; |
|---|
| 55 | DS_U32 vSharpness, hSharpness; |
|---|
| 56 | } PIC_PARAM_t, *P_PIC_PARAM_t; |
|---|
| 57 | |
|---|
| 58 | typedef struct tag_PIC_EXT_PARAM |
|---|
| 59 | { |
|---|
| 60 | int ColorTemp; |
|---|
| 61 | int NR; |
|---|
| 62 | int ColorSystem; |
|---|
| 63 | int BlackExtension; |
|---|
| 64 | int WhiteExtension; |
|---|
| 65 | int BlueStretch; |
|---|
| 66 | int APL, DCI, ACR, ColorMgmt, MpegNR; |
|---|
| 67 | |
|---|
| 68 | int FleshTone; |
|---|
| 69 | int Red, Blue, Green; |
|---|
| 70 | |
|---|
| 71 | int RCont, GCont, BCont; // RGB Contrast |
|---|
| 72 | int BlackExtVal, WhiteExtVal; // MPPROC 1E |
|---|
| 73 | int BlackLevel; // MPPROC 28 |
|---|
| 74 | int SubContrast; // MPPROC 25 |
|---|
| 75 | int MEMC; |
|---|
| 76 | DS_U16 RedGamma, BlueGamma, GreenGamma; |
|---|
| 77 | DS_BOOL Movie; |
|---|
| 78 | } PIC_EXT_PARAM_t; |
|---|
| 79 | |
|---|
| 80 | typedef struct tag_PIC_CONFIG_t |
|---|
| 81 | { |
|---|
| 82 | PIC_PARAM_t Param; |
|---|
| 83 | PIC_EXT_PARAM_t ExtParam; |
|---|
| 84 | DS_BOOL SharpnessOn; |
|---|
| 85 | DS_BOOL BrightnessOn; |
|---|
| 86 | DS_BOOL HueSaturationOn; |
|---|
| 87 | DS_BOOL ColorManagementOn; |
|---|
| 88 | } PIC_CONFIG_t, *P_PIC_CONFIG_t; |
|---|
| 89 | |
|---|
| 90 | |
|---|
| 91 | #if defined __cplusplus |
|---|
| 92 | extern "C" { |
|---|
| 93 | #endif |
|---|
| 94 | |
|---|
| 95 | DHL_RESULT DHL_PIC_PresetParams(P_PIC_CONFIG_t pPicConfig); |
|---|
| 96 | DHL_RESULT DHL_PIC_PresetDefaultParams(void); |
|---|
| 97 | DHL_RESULT DHL_PIC_PresetParamsPIP(P_PIC_CONFIG_t pPicConfig); |
|---|
| 98 | DHL_RESULT DHL_PIC_PresetDefaultParamsPIP(void); |
|---|
| 99 | |
|---|
| 100 | void DHL_PIC_UpdateNextParam(void); |
|---|
| 101 | void DHL_PIC_UpdateNextParamPIP(void); |
|---|
| 102 | |
|---|
| 103 | // |
|---|
| 104 | // Picture Parameter Functions |
|---|
| 105 | // |
|---|
| 106 | DHL_RESULT DHL_PIC_EnableSharpness(DS_BOOL ON); |
|---|
| 107 | DHL_RESULT DHL_PIC_EnableHueSaturation(DS_BOOL ON); |
|---|
| 108 | DHL_RESULT DHL_PIC_EnableBrightness(DS_BOOL ON); |
|---|
| 109 | DHL_RESULT DHL_PIC_SetSharpness(DS_U32 uHorzSharpness, DS_U32 uVertSharpness); |
|---|
| 110 | DHL_RESULT DHL_PIC_GetSharpness(DS_U32 *puHorzSharpness, DS_U32 *puVertSharpness); |
|---|
| 111 | DHL_RESULT DHL_PIC_SetContrast(DS_U32 uContrast); |
|---|
| 112 | DHL_RESULT DHL_PIC_GetContrast(DS_U32 *puContrast); |
|---|
| 113 | DHL_RESULT DHL_PIC_SetBrightness(DS_U32 uBrightness); |
|---|
| 114 | DHL_RESULT DHL_PIC_GetBrightness(DS_U32 *puBrightness); |
|---|
| 115 | DHL_RESULT DHL_PIC_SetSaturation(DS_U32 uSaturation); |
|---|
| 116 | DHL_RESULT DHL_PIC_GetSaturation(DS_U32 *puSaturation); |
|---|
| 117 | DHL_RESULT DHL_PIC_SetHue(int uHue); |
|---|
| 118 | DHL_RESULT DHL_PIC_GetHue(int *puHue); |
|---|
| 119 | DHL_RESULT DHL_PIC_SetMEMCMode(DHL_PIC_MEMC_MODE mode); |
|---|
| 120 | |
|---|
| 121 | // |
|---|
| 122 | // Extended Picture Parameter Functions |
|---|
| 123 | // |
|---|
| 124 | DHL_RESULT DHL_PIC_SetDCISpeed(int Speed); |
|---|
| 125 | DHL_RESULT DHL_PIC_SetColorTemperature(int ColorTemp); |
|---|
| 126 | DHL_RESULT DHL_PIC_SetNR(int NR); |
|---|
| 127 | DHL_RESULT DHL_PIC_SetColorSystem(int ColorSystem); |
|---|
| 128 | DHL_RESULT DHL_PIC_SetBlackExtension(int BlackExtension); |
|---|
| 129 | DHL_RESULT DHL_PIC_SetWhiteExtension(int WhiteExtension); |
|---|
| 130 | DHL_RESULT DHL_PIC_SetBlueStretch(int BlueStretch); |
|---|
| 131 | DHL_RESULT DHL_PIC_SetAPL(int APL); |
|---|
| 132 | DHL_RESULT DHL_PIC_SetDCI(int DCI); |
|---|
| 133 | DHL_RESULT DHL_PIC_SetACR(int ACR); |
|---|
| 134 | DHL_RESULT DHL_PIC_SetColorMgmt(int ColorMgmt); |
|---|
| 135 | DHL_RESULT DHL_PIC_SetMpegNR(int MpegNR); |
|---|
| 136 | |
|---|
| 137 | DHL_RESULT DHL_PIC_SetFleshTone(int FleshTone); |
|---|
| 138 | DHL_RESULT DHL_PIC_SetRGBOffset(int Red, int Green, int Blue); |
|---|
| 139 | DHL_RESULT DHL_PIC_SetRGBContrast( DS_U16 R, DS_U16 G, DS_U16 B ); |
|---|
| 140 | DHL_RESULT DHL_PIC_SetBlackWhiteStretch( DS_U8 B, DS_U8 W ); |
|---|
| 141 | DHL_RESULT DHL_PIC_SetBlackLevel( DS_U8 BlackLevel ); |
|---|
| 142 | DHL_RESULT DHL_PIC_SetSubContrast( DS_U8 SubContrast ); |
|---|
| 143 | DHL_RESULT DHL_PIC_SetAutoMovieMode( DS_BOOL enable ); |
|---|
| 144 | DHL_RESULT DHL_PIC_GetHistogram( DS_U8 *pHistogram); |
|---|
| 145 | |
|---|
| 146 | DHL_RESULT DHL_PIC_SetParams(int bFull); |
|---|
| 147 | |
|---|
| 148 | int DHL_PIC_GetColorTemperature(void); |
|---|
| 149 | int DHL_PIC_GetNR(void); |
|---|
| 150 | int DHL_PIC_GetColorSystem(void); |
|---|
| 151 | int DHL_PIC_GetBlackExtension(void); |
|---|
| 152 | int DHL_PIC_GetWhiteExtension(void); |
|---|
| 153 | int DHL_PIC_GetBlueStretch(void); |
|---|
| 154 | int DHL_PIC_GetAPL(void); |
|---|
| 155 | int DHL_PIC_GetDCI(void); |
|---|
| 156 | int DHL_PIC_GetACR(void); |
|---|
| 157 | int DHL_PIC_GetColorMgmt(void); |
|---|
| 158 | int DHL_PIC_GetFleshTone(void); |
|---|
| 159 | void DHL_PIC_GetRedOffset(int *pRed, int *pGreen, int *pBlue); |
|---|
| 160 | int DHL_PIC_GetMpegNR(void); |
|---|
| 161 | DS_BOOL DHL_PIC_GetAutoMovieMode(void);; |
|---|
| 162 | |
|---|
| 163 | #if defined __cplusplus |
|---|
| 164 | } |
|---|
| 165 | #endif |
|---|
| 166 | |
|---|
| 167 | #endif /*__DSTHAL_PIC_H__*/ |
|---|