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

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

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

revision 1.10, Sun Nov 17 00:20:30 2002 UTC revision 1.11, Sat Feb 15 15:22:18 2003 UTC
# Line 1  Line 1 
 /*****************************************************************************  
  *  
  *  XVID MPEG4 Codec  
  *  - Image functions - header files  
  *  
  *  This file is part of XviD, a free MPEG-4 video encoder/decoder  
  *  
  *  XviD is free software; you can redistribute it and/or modify it  
  *  under the terms of the GNU General Public License as published by  
  *  the Free Software Foundation; either version 2 of the License, or  
  *  (at your option) any later version.  
  *  
  *  This program is distributed in the hope that it will be useful,  
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of  
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
  *  GNU General Public License for more details.  
  *  
  *  You should have received a copy of the GNU General Public License  
  *  along with this program; if not, write to the Free Software  
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA  
  *  
  *  Under section 8 of the GNU General Public License, the copyright  
  *  holders of XVID explicitly forbid distribution in the following  
  *  countries:  
  *  
  *    - Japan  
  *    - United States of America  
  *  
  *  Linking XviD statically or dynamically with other modules is making a  
  *  combined work based on XviD.  Thus, the terms and conditions of the  
  *  GNU General Public License cover the whole combination.  
  *  
  *  As a special exception, the copyright holders of XviD give you  
  *  permission to link XviD with independent modules that communicate with  
  *  XviD solely through the VFW1.1 and DShow interfaces, regardless of the  
  *  license terms of these independent modules, and to copy and distribute  
  *  the resulting combined work under terms of your choice, provided that  
  *  every copy of the combined work is accompanied by a complete copy of  
  *  the source code of XviD (the version of XviD used to produce the  
  *  combined work), being distributed under the terms of the GNU General  
  *  Public License plus this exception.  An independent module is a module  
  *  which is not derived from or based on XviD.  
  *  
  *  Note that people who make modified versions of XviD are not obligated  
  *  to grant this special exception for their modified versions; it is  
  *  their choice whether to do so.  The GNU General Public License gives  
  *  permission to release a modified version without this exception; this  
  *  exception also makes it possible to release a modified version which  
  *  carries forward this exception.  
  *  
  * $Id$  
  *  
  ****************************************************************************/  
   
1  #ifndef _IMAGE_H_  #ifndef _IMAGE_H_
2  #define _IMAGE_H_  #define _IMAGE_H_
3    
4    #include <stdlib.h>
5    
6  #include "../portab.h"  #include "../portab.h"
7    #include "../global.h"
8  #include "colorspace.h"  #include "colorspace.h"
9  #include "../xvid.h"  #include "../xvid.h"
10    
11  #define EDGE_SIZE  32  #define EDGE_SIZE  64
12    
13    void init_image(uint32_t cpu_flags);
14    
15    
16  typedef struct  static void __inline
17    image_null(IMAGE * image)
18  {  {
19          uint8_t *y;          image->y = image->u = image->v = NULL;
         uint8_t *u;  
         uint8_t *v;  
20  }  }
 IMAGE;  
   
 void init_image(uint32_t cpu_flags);  
21    
22  int32_t image_create(IMAGE * image,  int32_t image_create(IMAGE * image,
23                                           uint32_t edged_width,                                           uint32_t edged_width,
# Line 81  Line 28 
28    
29  void image_swap(IMAGE * image1,  void image_swap(IMAGE * image1,
30                                  IMAGE * image2);                                  IMAGE * image2);
31    
32  void image_copy(IMAGE * image1,  void image_copy(IMAGE * image1,
33                                  IMAGE * image2,                                  IMAGE * image2,
34                                  uint32_t edged_width,                                  uint32_t edged_width,
35                                  uint32_t height);                                  uint32_t height);
36    
37  void image_setedges(IMAGE * image,  void image_setedges(IMAGE * image,
38                                          uint32_t edged_width,                                          uint32_t edged_width,
39                                          uint32_t edged_height,                                          uint32_t edged_height,
40                                          uint32_t width,                                          uint32_t width,
41                                          uint32_t height);                                          uint32_t height);
42    
43  void image_interpolate(const IMAGE * refn,  void image_interpolate(const IMAGE * refn,
44                                             IMAGE * refh,                                             IMAGE * refh,
45                                             IMAGE * refv,                                             IMAGE * refv,
46                                             IMAGE * refhv,                                             IMAGE * refhv,
47                                             uint32_t edged_width,                                             uint32_t edged_width,
48                                             uint32_t edged_height,                                             uint32_t edged_height,
49                                               uint32_t quarterpel,
50                                             uint32_t rounding);                                             uint32_t rounding);
51    
52  float image_psnr(IMAGE * orig_image,  float image_psnr(IMAGE * orig_image,
# Line 105  Line 56 
56                                   uint16_t height);                                   uint16_t height);
57    
58    
59    float sse_to_PSNR(long sse, int pixels);
60    
61    long plane_sse(uint8_t * orig,
62                       uint8_t * recon,
63                       uint16_t stride,
64                       uint16_t width,
65                       uint16_t height);
66    
67    void
68    image_chroma_optimize(IMAGE * img, int width, int height, int edged_width);
69    
70    
71  int image_input(IMAGE * image,  int image_input(IMAGE * image,
72                                  uint32_t width,                                  uint32_t width,
73                                  int height,                                  int height,
74                                  uint32_t edged_width,                                  uint32_t edged_width,
75                                  uint8_t * src,                                  uint8_t * src,
76                                  int csp);                                  int src_stride,
77                                    int csp,
78                                    int interlaced);
79    
80  int image_output(IMAGE * image,  int image_output(IMAGE * image,
81                                   uint32_t width,                                   uint32_t width,
# Line 118  Line 83 
83                                   uint32_t edged_width,                                   uint32_t edged_width,
84                                   uint8_t * dst,                                   uint8_t * dst,
85                                   uint32_t dst_stride,                                   uint32_t dst_stride,
86                                   int csp);                                   int csp,
87                                     int interlaced);
88    
89    
90    
# Line 137  Line 103 
103  void  void
104  output_slice(IMAGE * cur, int edged_width, int width, XVID_DEC_PICTURE* out_frm, int mbx, int mby,int mbl);  output_slice(IMAGE * cur, int edged_width, int width, XVID_DEC_PICTURE* out_frm, int mbx, int mby,int mbl);
105    
106    
107    void
108    image_clear(IMAGE * img, int width, int height, int edged_width,
109                                            int y, int u, int v);
110    
111    
112    void
113    image_deblock_rrv(IMAGE * img, int edgeg_width,
114                                    const MACROBLOCK * mbs, int mb_width, int mb_height, int mb_stride,
115                                    int block, int flags);
116    
117    
118  #endif                                                  /* _IMAGE_H_ */  #endif                                                  /* _IMAGE_H_ */

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

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