[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.2.2, Mon Jun 9 13:53:56 2003 UTC
# Line 1  Line 1 
1  /*****************************************************************************  /*****************************************************************************
2   *   *
3   *  XVID MPEG4 Codec   *  XVID MPEG-4 VIDEO CODEC
4   *  - Image functions - header files   *  - Image related header  -
5   *   *
6   *  This file is part of XviD, a free MPEG-4 video encoder/decoder   *  Copyright(C) 2001-2003 Peter Ross <pross@xvid.org>
7   *   *
8   *  XviD is free software; you can redistribute it and/or modify it   *  This program is free software ; you can redistribute it and/or modify
9   *  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
10   *  the Free Software Foundation; either version 2 of the License, or   *  the Free Software Foundation; either version 2 of the License, or
11   *  (at your option) any later version.   *  (at your option) any later version.
12   *   *
# 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   *   *
  *  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.  
  *  
22   * $Id$   * $Id$
23   *   *
24   ****************************************************************************/   ****************************************************************************/
# Line 55  Line 26 
26  #ifndef _IMAGE_H_  #ifndef _IMAGE_H_
27  #define _IMAGE_H_  #define _IMAGE_H_
28    
29    #include <stdlib.h>
30    
31  #include "../portab.h"  #include "../portab.h"
32    #include "../global.h"
33  #include "colorspace.h"  #include "colorspace.h"
34  #include "../xvid.h"  #include "../xvid.h"
35    
36  #define EDGE_SIZE  32  #define EDGE_SIZE  64
37    
38    void init_image(uint32_t cpu_flags);
39    
40    
41  typedef struct  static void __inline
42    image_null(IMAGE * image)
43  {  {
44          uint8_t *y;          image->y = image->u = image->v = NULL;
         uint8_t *u;  
         uint8_t *v;  
45  }  }
 IMAGE;  
   
 void init_image(uint32_t cpu_flags);  
46    
47  int32_t image_create(IMAGE * image,  int32_t image_create(IMAGE * image,
48                                           uint32_t edged_width,                                           uint32_t edged_width,
# Line 81  Line 53 
53    
54  void image_swap(IMAGE * image1,  void image_swap(IMAGE * image1,
55                                  IMAGE * image2);                                  IMAGE * image2);
56    
57  void image_copy(IMAGE * image1,  void image_copy(IMAGE * image1,
58                                  IMAGE * image2,                                  IMAGE * image2,
59                                  uint32_t edged_width,                                  uint32_t edged_width,
60                                  uint32_t height);                                  uint32_t height);
61    
62  void image_setedges(IMAGE * image,  void image_setedges(IMAGE * image,
63                                          uint32_t edged_width,                                          uint32_t edged_width,
64                                          uint32_t edged_height,                                          uint32_t edged_height,
65                                          uint32_t width,                                          uint32_t width,
66                                          uint32_t height);                                          uint32_t height);
67    
68  void image_interpolate(const IMAGE * refn,  void image_interpolate(const IMAGE * refn,
69                                             IMAGE * refh,                                             IMAGE * refh,
70                                             IMAGE * refv,                                             IMAGE * refv,
71                                             IMAGE * refhv,                                             IMAGE * refhv,
72                                             uint32_t edged_width,                                             uint32_t edged_width,
73                                             uint32_t edged_height,                                             uint32_t edged_height,
74                                               uint32_t quarterpel,
75                                             uint32_t rounding);                                             uint32_t rounding);
76    
77  float image_psnr(IMAGE * orig_image,  float image_psnr(IMAGE * orig_image,
# Line 105  Line 81 
81                                   uint16_t height);                                   uint16_t height);
82    
83    
84    float sse_to_PSNR(long sse, int pixels);
85    
86    long plane_sse(uint8_t * orig,
87                       uint8_t * recon,
88                       uint16_t stride,
89                       uint16_t width,
90                       uint16_t height);
91    
92    void
93    image_chroma_optimize(IMAGE * img, int width, int height, int edged_width);
94    
95    
96  int image_input(IMAGE * image,  int image_input(IMAGE * image,
97                                  uint32_t width,                                  uint32_t width,
98                                  int height,                                  int height,
99                                  uint32_t edged_width,                                  uint32_t edged_width,
100                                  uint8_t * src,                                  uint8_t * src[4],
101                                  int csp);                                  int src_stride[4],
102                                    int csp,
103                                    int interlaced);
104    
105  int image_output(IMAGE * image,  int image_output(IMAGE * image,
106                                   uint32_t width,                                   uint32_t width,
107                                   int height,                                   int height,
108                                   uint32_t edged_width,                                   uint32_t edged_width,
109                                   uint8_t * dst,                                   uint8_t * dst[4],
110                                   uint32_t dst_stride,                                   uint32_t dst_stride[4],
111                                   int csp);                                   int csp,
112                                     int interlaced);
113    
114    
115    
# Line 135  Line 126 
126                                  uint32_t height);                                  uint32_t height);
127    
128  void  void
129  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_image_t* out_frm, int mbx, int mby,int mbl);
130    
131    
132    void
133    image_clear(IMAGE * img, int width, int height, int edged_width,
134                                            int y, int u, int v);
135    
136    
137    void
138    image_deblock_rrv(IMAGE * img, int edgeg_width,
139                                    const MACROBLOCK * mbs, int mb_width, int mb_height, int mb_stride,
140                                    int block, int flags);
141    
142    
143  #endif                                                  /* _IMAGE_H_ */  #endif                                                  /* _IMAGE_H_ */

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

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