[svn] / branches / dev-api-4 / xvidcore / src / image / image.c Repository:
ViewVC logotype

Diff of /branches/dev-api-4/xvidcore/src/image/image.c

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

revision 1053, Mon Jun 9 01:25:19 2003 UTC revision 1128, Mon Aug 25 15:01:51 2003 UTC
# Line 1  Line 1 
1  /**************************************************************************  /**************************************************************************
2   *   *
3   *      XVID MPEG-4 VIDEO CODEC   *      XVID MPEG-4 VIDEO CODEC
4   *      image stuff   *  - Image management functions -
5   *   *
6   *      This program is an implementation of a part of one or more MPEG-4   *  Copyright(C) 2001-2003 Peter Ross <pross@xvid.org>
  *      Video tools as specified in ISO/IEC 14496-2 standard.  Those intending  
  *      to use this software module in hardware or software products are  
  *      advised that its use may infringe existing patents or copyrights, and  
  *      any such use would be at such party's own risk.  The original  
  *      developer of this software module and his/her company, and subsequent  
  *      editors and their companies, will have no liability for use of this  
  *      software or modifications or derivatives thereof.  
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 24  Line 17 
17   *   *
18   *      You should have received a copy of the GNU General Public License   *      You should have received a copy of the GNU General Public License
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., 675 Mass Ave, Cambridge, MA 02139, USA.   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
21   *   *
22   *************************************************************************/   * $Id: image.c,v 1.26.2.8 2003-08-25 15:01:51 edgomez Exp $
   
 /**************************************************************************  
  *  
  *      History:  
23   *   *
24   *  05.10.2002  support for interpolated images in qpel mode - Isibaar   ****************************************************************************/
  *      01.05.2002      BFRAME image-based u,v interpolation  
  *  22.04.2002  added some B-frame support  
  *      14.04.2002      added image_dump_yuvpgm(), added image_mad()  
  *              XVID_CSP_USER input support  
  *  09.04.2002  PSNR calculations - Isibaar  
  *      06.04.2002      removed interlaced edging from U,V blocks (as per spec)  
  *  26.03.2002  interlacing support (field-based edging in set_edges)  
  *      26.01.2002      rgb555, rgb565  
  *      07.01.2001      commented u,v interpolation (not required for uv-block-based)  
  *  23.12.2001  removed #ifdefs, added function pointers + init_common()  
  *      22.12.2001      cpu #ifdefs  
  *  19.12.2001  image_dump(); useful for debugging  
  *       6.12.2001      inital version; (c)2001 peter ross <pross@cs.rmit.edu.au>  
  *  
  *************************************************************************/  
25    
26  #include <stdlib.h>  #include <stdlib.h>
27  #include <string.h>                             /* memcpy, memset */  #include <string.h>                             /* memcpy, memset */
# Line 157  Line 131 
131                             uint32_t height)                             uint32_t height)
132  {  {
133          const uint32_t edged_width2 = edged_width / 2;          const uint32_t edged_width2 = edged_width / 2;
134          const uint32_t width2 = width / 2;          uint32_t width2;
135          uint32_t i;          uint32_t i;
136          uint8_t *dst;          uint8_t *dst;
137          uint8_t *src;          uint8_t *src;
# Line 166  Line 140 
140          dst = image->y - (EDGE_SIZE + EDGE_SIZE * edged_width);          dst = image->y - (EDGE_SIZE + EDGE_SIZE * edged_width);
141          src = image->y;          src = image->y;
142    
143            /* According to the Standard Clause 7.6.4, padding is done starting at 16
144             * pixel width and height multiples */
145            width  = (width+15)&~15;
146            height = (height+15)&~15;
147            width2 = width/2;
148    
149          for (i = 0; i < EDGE_SIZE; i++) {          for (i = 0; i < EDGE_SIZE; i++) {
150                  memset(dst, *src, EDGE_SIZE);                  memset(dst, *src, EDGE_SIZE);
151                  memcpy(dst + EDGE_SIZE, src, width);                  memcpy(dst + EDGE_SIZE, src, width);

Legend:
Removed from v.1053  
changed lines
  Added in v.1128

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