--- postprocessing.h 2003/12/10 15:07:42 1.1.4.2 +++ postprocessing.h 2004/04/01 11:11:28 1.3 @@ -19,7 +19,7 @@ * along with this program ; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: postprocessing.h,v 1.1.4.2 2003/12/10 15:07:42 edgomez Exp $ + * $Id: postprocessing.h,v 1.3 2004/04/01 11:11:28 suxen_drol Exp $ * ****************************************************************************/ @@ -27,17 +27,52 @@ #define _POSTPROCESSING_H_ #include - #include "../portab.h" +/* Filtering thresholds */ + +#define THR1 2 +#define THR2 6 + +#define MAX_NOISE 4096 +#define MAX_SHIFT 1024 +#define MAX_RES (MAX_NOISE - MAX_SHIFT) + +typedef struct { + int8_t xvid_thresh_tbl[511]; + uint8_t xvid_abs_tbl[511]; + int8_t xvid_noise1[MAX_NOISE * sizeof(int8_t)]; + int8_t xvid_noise2[MAX_NOISE * sizeof(int8_t)]; + int8_t *xvid_prev_shift[MAX_RES][6]; + int prev_quant; +} XVID_POSTPROC; + void -image_deblock(IMAGE * img, int edged_width, +image_postproc(XVID_POSTPROC *tbls, IMAGE * img, int edged_width, const MACROBLOCK * mbs, int mb_width, int mb_height, int mb_stride, - int flags); + int flags, int brightness, int frame_num, int bvop); + +void deblock8x8_h(XVID_POSTPROC *tbls, uint8_t *img, int stride, int quant); +void deblock8x8_v(XVID_POSTPROC *tbls, uint8_t *img, int stride, int quant); + +void init_postproc(XVID_POSTPROC *tbls); +void init_noise(XVID_POSTPROC *tbls); +void init_deblock(XVID_POSTPROC *tbls); + + +void add_noise(XVID_POSTPROC * tbls, uint8_t *dst, uint8_t *src, int stride, int width, int height, int shiftptr, int quant); + + +typedef void (IMAGEBRIGHTNESS) (uint8_t * dst, + int stride, + int width, + int height, + int offset); +typedef IMAGEBRIGHTNESS *IMAGEBRIGHTNESS_PTR; -void deblock8x8_h(uint8_t *img, int stride, int quant); -void deblock8x8_v(uint8_t *img, int stride, int quant); +extern IMAGEBRIGHTNESS_PTR image_brightness; -void init_postproc(void); +IMAGEBRIGHTNESS image_brightness_c; +IMAGEBRIGHTNESS image_brightness_mmx; #endif