[svn] / branches / release-1_3-branch / xvidcore / src / image / image.c Repository:
ViewVC logotype

Diff of /branches/release-1_3-branch/xvidcore/src/image/image.c

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

revision 1733, Fri Oct 13 07:38:09 2006 UTC revision 1736, Fri Oct 13 11:26:18 2006 UTC
# 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: image.c,v 1.36 2006-10-13 07:38:09 Skal Exp $   * $Id: image.c,v 1.38 2006-10-13 11:26:18 Skal Exp $
23   *   *
24   ****************************************************************************/   ****************************************************************************/
25    
# Line 1018  Line 1018 
1018    
1019  /****************************************************************************/  /****************************************************************************/
1020    
1021  static void (*deintl_core)(unsigned char *, int width, int height, const int stride) = 0;  static void (*deintl_core)(uint8_t *, int width, int height, const int stride) = 0;
1022  extern void xvid_deinterlace_sse(unsigned char *, int width, int height, const int stride);  extern void xvid_deinterlace_sse(uint8_t *, int width, int height, const int stride);
1023    
1024  #define CLIP_255(x)   ( ((x)&~255) ? ((-(x)) >> (8*sizeof((x))-1))&0xff : (x) )  #define CLIP_255(x)   ( ((x)&~255) ? ((-(x)) >> (8*sizeof((x))-1))&0xff : (x) )
1025    
1026  static void deinterlace_c(unsigned char *pix, int width, int height, const int bps)  static void deinterlace_c(uint8_t *pix, int width, int height, const int bps)
1027  {  {
1028    pix += bps;    pix += bps;
1029    while(width-->0)    while(width-->0)
# Line 1058  Line 1058 
1058          if (img->csp!=XVID_CSP_PLANAR && img->csp!=XVID_CSP_I420 && img->csp!=XVID_CSP_YV12)          if (img->csp!=XVID_CSP_PLANAR && img->csp!=XVID_CSP_I420 && img->csp!=XVID_CSP_YV12)
1059                  return 0;       /* not yet supported */                  return 0;       /* not yet supported */
1060          if (deintl_core==0) {          if (deintl_core==0) {
                 const int cpu_flags = check_cpu_features();  
1061                  deintl_core = deinterlace_c;                  deintl_core = deinterlace_c;
1062  #ifdef ARCH_IS_IA32  #ifdef ARCH_IS_IA32
1063                    {
1064                            int cpu_flags = check_cpu_features();
1065                  if (cpu_flags & XVID_CPU_MMX)                  if (cpu_flags & XVID_CPU_MMX)
1066                          deintl_core = xvid_deinterlace_sse;                          deintl_core = xvid_deinterlace_sse;
1067                    }
1068  #endif  #endif
1069          }          }
1070          if (!bottom_first) {          if (!bottom_first) {
# Line 1071  Line 1073 
1073                  deintl_core(img->plane[2], width>>1, height>>1, img->stride[2]);                  deintl_core(img->plane[2], width>>1, height>>1, img->stride[2]);
1074          }          }
1075          else {          else {
1076                  deintl_core(img->plane[0] + ( height    -1)*img->stride[0], width,    height,    -img->stride[0]);                  deintl_core((uint8_t *)img->plane[0] + ( height    -1)*img->stride[0], width,    height,    -img->stride[0]);
1077                  deintl_core(img->plane[1] + ((height>>1)-1)*img->stride[1], width>>1, height>>1, -img->stride[1]);                  deintl_core((uint8_t *)img->plane[1] + ((height>>1)-1)*img->stride[1], width>>1, height>>1, -img->stride[1]);
1078                  deintl_core(img->plane[2] + ((height>>1)-1)*img->stride[2], width>>1, height>>1, -img->stride[2]);                  deintl_core((uint8_t *)img->plane[2] + ((height>>1)-1)*img->stride[2], width>>1, height>>1, -img->stride[2]);
1079          }          }
1080          emms();          emms();
1081    

Legend:
Removed from v.1733  
changed lines
  Added in v.1736

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