You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.6KB

  1. /*
  2. Copyright (C) 2001 Michael Niedermayer (michaelni@gmx.at)
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 2 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, write to the Free Software
  13. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  14. */
  15. // POSTPROCESS_H is defined by opendivx's postprocess.h
  16. #ifndef NEWPOSTPROCESS_H
  17. #define NEWPOSTPROCESS_H
  18. #define BLOCK_SIZE 8
  19. #define TEMP_STRIDE 8
  20. #define V_DEBLOCK 0x01
  21. #define H_DEBLOCK 0x02
  22. #define DERING 0x04
  23. #define LEVEL_FIX 0x08 /* Brightness & Contrast */
  24. #define LUM_V_DEBLOCK V_DEBLOCK // 1
  25. #define LUM_H_DEBLOCK H_DEBLOCK // 2
  26. #define CHROM_V_DEBLOCK (V_DEBLOCK<<4) // 16
  27. #define CHROM_H_DEBLOCK (H_DEBLOCK<<4) // 32
  28. #define LUM_DERING DERING // 4
  29. #define CHROM_DERING (DERING<<4) // 64
  30. #define LUM_LEVEL_FIX LEVEL_FIX // 8
  31. //not supported currently
  32. #define CHROM_LEVEL_FIX (LEVEL_FIX<<4) // 128
  33. // Experimental vertical filters
  34. #define V_RK1_FILTER 0x0100 // 256
  35. #define V_X1_FILTER 0x0200 // 512
  36. // Experimental horizontal filters
  37. #define H_RK1_FILTER 0x1000 // 4096
  38. #define H_X1_FILTER 0x2000 // 8192
  39. #define TIMEING
  40. #define MORE_TIMEING
  41. #define MIN(a,b) ((a) > (b) ? (b) : (a))
  42. #define MAX(a,b) ((a) < (b) ? (b) : (a))
  43. #define ABS(a) ((a) > 0 ? (a) : (-(a)))
  44. #define SIGN(a) ((a) > 0 ? 1 : -1)
  45. #define QP_STORE_T int
  46. #ifdef HAVE_MMX2
  47. #define PAVGB(a,b) "pavgb " #a ", " #b " \n\t"
  48. #elif defined (HAVE_3DNOW)
  49. #define PAVGB(a,b) "pavgusb " #a ", " #b " \n\t"
  50. #endif
  51. //#ifdef __cplusplus
  52. //#include <inttypes.h>
  53. //void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStride, int width, int height,
  54. // QP_STORE_T QPs[], int QPStride, int isColor, int mode);
  55. //#endif
  56. //#ifdef __cplusplus
  57. //extern "C"
  58. //{
  59. //#endif
  60. void postprocess(unsigned char * src[], int src_stride,
  61. unsigned char * dst[], int dst_stride,
  62. int horizontal_size, int vertical_size,
  63. QP_STORE_T *QP_store, int QP_stride, int mode);
  64. int getPpModeForQuality(int quality);
  65. //#ifdef __cplusplus
  66. //}
  67. //#endif
  68. #define GET_PP_QUALITY_MAX 6
  69. #endif