[cvs] / xvidcore / src / image / postprocessing.h Repository:
ViewVC logotype

Diff of /xvidcore/src/image/postprocessing.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.4.1, Wed Dec 10 01:02:44 2003 UTC revision 1.5, Sun Apr 18 07:55:11 2004 UTC
# Line 3  Line 3 
3   *  XVID MPEG-4 VIDEO CODEC   *  XVID MPEG-4 VIDEO CODEC
4   *  - Postprocessing header  -   *  - Postprocessing header  -
5   *   *
6   *  Copyright(C) 2003 Michael Militzer <skal@planet-d.net>   *  Copyright(C) 2003 Michael Militzer <isibaar@xvid.org>
7   *   *
8   *  This program is free software ; you can redistribute it and/or modify   *  This program is free software ; you can redistribute it and/or modify
9   *  it under the terms of the GNU General Public License as published by   *  it under the terms of the GNU General Public License as published by
# Line 19  Line 19 
19   *  along with this program ; if not, write to the Free Software   *  along with this program ; if not, write to the Free Software
20   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
21   *   *
22     * $Id$
23     *
24   ****************************************************************************/   ****************************************************************************/
25    
26  #ifndef _POSTPROCESSING_H_  #ifndef _POSTPROCESSING_H_
27  #define _POSTPROCESSING_H_  #define _POSTPROCESSING_H_
28    
29  #include <stdlib.h>  #include <stdlib.h>
   
30  #include "../portab.h"  #include "../portab.h"
31    
32    /* Filtering thresholds */
33    
34    #define THR1 2
35    #define THR2 6
36    
37    #define MAX_NOISE 4096
38    #define MAX_SHIFT 1024
39    #define MAX_RES (MAX_NOISE - MAX_SHIFT)
40    
41    #define DERING_STRENGTH         2
42    
43    typedef struct {
44            int8_t  xvid_thresh_tbl[511];
45            uint8_t xvid_abs_tbl[511];
46            int8_t  xvid_noise1[MAX_NOISE * sizeof(int8_t)];
47            int8_t  xvid_noise2[MAX_NOISE * sizeof(int8_t)];
48            int8_t  *xvid_prev_shift[MAX_RES][6];
49            int prev_quant;
50    } XVID_POSTPROC;
51    
52  void  void
53  image_deblock(IMAGE * img, int edged_width,  image_postproc(XVID_POSTPROC *tbls, IMAGE * img, int edged_width,
54                                  const MACROBLOCK * mbs, int mb_width, int mb_height, int mb_stride,                                  const MACROBLOCK * mbs, int mb_width, int mb_height, int mb_stride,
55                                  int flags);                                  int flags, int brightness, int frame_num, int bvop);
56    
57    void deblock8x8_h(XVID_POSTPROC *tbls, uint8_t *img, int stride, int quant, int dering);
58    void deblock8x8_v(XVID_POSTPROC *tbls, uint8_t *img, int stride, int quant, int dering);
59    
60    void init_postproc(XVID_POSTPROC *tbls);
61    void init_noise(XVID_POSTPROC *tbls);
62    void init_deblock(XVID_POSTPROC *tbls);
63    
64    void add_noise(XVID_POSTPROC * tbls, uint8_t *dst, uint8_t *src, int stride, int width, int height, int shiftptr, int quant);
65    
66    
67    typedef void (IMAGEBRIGHTNESS) (uint8_t * dst,
68                                                    int stride,
69                                                    int width,
70                                                    int height,
71                                                    int offset);
72    typedef IMAGEBRIGHTNESS *IMAGEBRIGHTNESS_PTR;
73    
74  void deblock8x8_h(uint8_t *img, int stride, int quant);  extern IMAGEBRIGHTNESS_PTR image_brightness;
 void deblock8x8_v(uint8_t *img, int stride, int quant);  
75    
76  void init_postproc(void);  IMAGEBRIGHTNESS image_brightness_c;
77    IMAGEBRIGHTNESS image_brightness_mmx;
78    
79  #endif  #endif

Legend:
Removed from v.1.1.4.1  
changed lines
  Added in v.1.5

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4