encpreprocess.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*------------------------------------------------------------------------------
  2. -- --
  3. -- This software is confidential and proprietary and may be used --
  4. -- only as expressly authorized by a licensing agreement from --
  5. -- --
  6. -- Hantro Products Oy. --
  7. -- --
  8. -- (C) COPYRIGHT 2006 HANTRO PRODUCTS OY --
  9. -- ALL RIGHTS RESERVED --
  10. -- --
  11. -- The entire notice above must be reproduced --
  12. -- on all copies and should not be removed. --
  13. -- --
  14. --------------------------------------------------------------------------------
  15. --
  16. -- Description : Preprocessor setup
  17. --
  18. ------------------------------------------------------------------------------*/
  19. #ifndef __ENC_PRE_PROCESS_H__
  20. #define __ENC_PRE_PROCESS_H__
  21. /*------------------------------------------------------------------------------
  22. 1. Include headers
  23. ------------------------------------------------------------------------------*/
  24. #include "basetype.h"
  25. #include "encasiccontroller.h"
  26. /*------------------------------------------------------------------------------
  27. 2. External compiler flags
  28. --------------------------------------------------------------------------------
  29. --------------------------------------------------------------------------------
  30. 3. Module defines
  31. ------------------------------------------------------------------------------*/
  32. #define ROTATE_0 0U
  33. #define ROTATE_90R 1U /* Rotate 90 degrees clockwise */
  34. #define ROTATE_90L 2U /* Rotate 90 degrees counter-clockwise */
  35. /* maximum input picture width set by the available bits in ASIC regs */
  36. #define MAX_INPUT_IMAGE_WIDTH (8192)
  37. typedef struct
  38. {
  39. u32 lumWidthSrc; /* Source input image width */
  40. u32 lumHeightSrc; /* Source input image height */
  41. u32 lumWidth; /* Encoded image width */
  42. u32 lumHeight; /* Encoded image height */
  43. u32 horOffsetSrc; /* Encoded frame offset, reference is ... */
  44. u32 verOffsetSrc; /* ...top left corner of source image */
  45. u32 inputFormat;
  46. u32 rotation;
  47. u32 videoStab;
  48. u32 colorConversionType; /* 0 = bt601, 1 = bt709, 2 = user defined */
  49. u32 colorConversionCoeffA;
  50. u32 colorConversionCoeffB;
  51. u32 colorConversionCoeffC;
  52. u32 colorConversionCoeffE;
  53. u32 colorConversionCoeffF;
  54. } preProcess_s;
  55. /*------------------------------------------------------------------------------
  56. 4. Function prototypes
  57. ------------------------------------------------------------------------------*/
  58. i32 EncPreProcessCheck(const preProcess_s * preProcess);
  59. void EncPreProcess(asicData_s * asic, const preProcess_s * preProcess);
  60. void EncSetColorConversion(preProcess_s * preProcess, asicData_s * asic);
  61. #endif