[MPlayer-cvslog] r28886 - trunk/libmpcodecs/native/rtjpegn.c

reimar subversion at mplayerhq.hu
Sun Mar 8 14:17:18 CET 2009


Author: reimar
Date: Sun Mar  8 14:17:18 2009
New Revision: 28886

Log:
Remove the grayscale and 4:2:2 RTjpeg code, it is neither used nor is there
anything special about to to justify preserving it for documentation purposes.

Modified:
   trunk/libmpcodecs/native/rtjpegn.c

Modified: trunk/libmpcodecs/native/rtjpegn.c
==============================================================================
--- trunk/libmpcodecs/native/rtjpegn.c	Sun Mar  8 14:10:21 2009	(r28885)
+++ trunk/libmpcodecs/native/rtjpegn.c	Sun Mar  8 14:17:18 2009	(r28886)
@@ -2907,126 +2907,6 @@ int RTjpeg_compressYUV420(__s8 *sp, unsi
  return (sp-sb);
 }
 
-static int RTjpeg_compressYUV422(__s8 *sp, unsigned char *bp)
-{
- __s8 * sb;
- register __s8 * bp2 = bp + RTjpeg_Ysize;
- register __s8 * bp3 = bp2 + RTjpeg_Csize;
- register int i, j, k;
-
-#if HAVE_MMX
- emms();
-#endif
- sb=sp;
-/* Y */
- for(i=RTjpeg_height; i; i-=8)
- {
-  for(j=0, k=0; j<RTjpeg_width; j+=16, k+=8)
-  {
-   RTjpeg_dctY(bp+j, RTjpeg_block, RTjpeg_Ywidth);
-   RTjpeg_quant(RTjpeg_block, RTjpeg_lqt);
-   sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_lb8);
-
-   RTjpeg_dctY(bp+j+8, RTjpeg_block, RTjpeg_Ywidth);
-   RTjpeg_quant(RTjpeg_block, RTjpeg_lqt);
-   sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_lb8);
-
-   RTjpeg_dctY(bp2+k, RTjpeg_block, RTjpeg_Cwidth);
-   RTjpeg_quant(RTjpeg_block, RTjpeg_cqt);
-   sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_cb8);
-
-   RTjpeg_dctY(bp3+k, RTjpeg_block, RTjpeg_Cwidth);
-   RTjpeg_quant(RTjpeg_block, RTjpeg_cqt);
-   sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_cb8);
-
-  }
-  bp+=RTjpeg_width<<3;
-  bp2+=RTjpeg_width<<2;
-  bp3+=RTjpeg_width<<2;
-			 
- }
-#if HAVE_MMX
- emms();
-#endif
- return (sp-sb);
-}
-
-static int RTjpeg_compress8(__s8 *sp, unsigned char *bp)
-{
- __s8 * sb;
- int i, j;
-
-#if HAVE_MMX
- emms();
-#endif
- 
- sb=sp;
-/* Y */
- for(i=0; i<RTjpeg_height; i+=8)
- {
-  for(j=0; j<RTjpeg_width; j+=8)
-  {
-   RTjpeg_dctY(bp+j, RTjpeg_block, RTjpeg_width);
-   RTjpeg_quant(RTjpeg_block, RTjpeg_lqt);
-   sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_lb8);
-  }
-  bp+=RTjpeg_width;
- }
-
-#if HAVE_MMX
- emms();
-#endif
- return (sp-sb);
-}
-
-static void RTjpeg_decompressYUV422(__s8 *sp, __u8 *bp)
-{
- register __s8 * bp2 = bp + RTjpeg_Ysize;
- register __s8 * bp3 = bp2 + (RTjpeg_Csize);
- int i, j,k;
-
-#if HAVE_MMX
- emms();
-#endif
-
-/* Y */
- for(i=RTjpeg_height; i; i-=8)
- {
-  for(k=0, j=0; j<RTjpeg_width; j+=16, k+=8) {
-   if(*sp==-1)sp++;
-   else
-   { 
-    sp+=RTjpeg_s2b(RTjpeg_block, sp, RTjpeg_lb8, RTjpeg_liqt);
-    RTjpeg_idct(bp+j, RTjpeg_block, RTjpeg_width);
-   }
-   if(*sp==-1)sp++;
-   else
-   { 
-    sp+=RTjpeg_s2b(RTjpeg_block, sp, RTjpeg_lb8, RTjpeg_liqt);
-    RTjpeg_idct(bp+j+8, RTjpeg_block, RTjpeg_width);
-   }
-   if(*sp==-1)sp++;
-   else
-   { 
-    sp+=RTjpeg_s2b(RTjpeg_block, sp, RTjpeg_cb8, RTjpeg_ciqt);
-    RTjpeg_idct(bp2+k, RTjpeg_block, RTjpeg_width>>1);
-   } 
-   if(*sp==-1)sp++;
-   else
-   { 
-    sp+=RTjpeg_s2b(RTjpeg_block, sp, RTjpeg_cb8, RTjpeg_ciqt);
-    RTjpeg_idct(bp3+k, RTjpeg_block, RTjpeg_width>>1);
-   } 
-  }
-  bp+=RTjpeg_width<<3;
-  bp2+=RTjpeg_width<<2;
-  bp3+=RTjpeg_width<<2;
- }
-#if HAVE_MMX
- emms();
-#endif
-}
-
 void RTjpeg_decompressYUV420(__s8 *sp, __u8 *bp)
 {
  register __s8 * bp1 = bp + (RTjpeg_width<<3);
@@ -3089,28 +2969,6 @@ void RTjpeg_decompressYUV420(__s8 *sp, _
 #endif
 }
 
-static void RTjpeg_decompress8(__s8 *sp, __u8 *bp)
-{
- int i, j;
-
-#if HAVE_MMX
- emms();
-#endif
-
-/* Y */
- for(i=0; i<RTjpeg_height; i+=8)
- {
-  for(j=0; j<RTjpeg_width; j+=8)
-   if(*sp==-1)sp++;
-   else
-   { 
-    sp+=RTjpeg_s2b(RTjpeg_block, sp, RTjpeg_lb8, RTjpeg_liqt);
-    RTjpeg_idct(bp+j, RTjpeg_block, RTjpeg_width);
-   }
-  bp+=RTjpeg_width<<3;
- }
-}
-
 /*
 External Function
 
@@ -3296,118 +3154,3 @@ int RTjpeg_mcompressYUV420(__s8 *sp, uns
 #endif
  return (sp-sb);
 }
-
-
-static int RTjpeg_mcompressYUV422(__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask)
-{
- __s8 * sb;
- __s16 *block;
- register __s8 * bp2;
- register __s8 * bp3;
- register int i, j, k;
-
-#if HAVE_MMX
- emms();
- RTjpeg_lmask.uq=((__u64)lmask<<48)|((__u64)lmask<<32)|((__u64)lmask<<16)|lmask;
- RTjpeg_cmask.uq=((__u64)cmask<<48)|((__u64)cmask<<32)|((__u64)cmask<<16)|cmask;
-#else
- RTjpeg_lmask=lmask;
- RTjpeg_cmask=cmask;
-#endif
- 
- bp = bp - RTjpeg_width*0;
- bp2 = bp + RTjpeg_Ysize-RTjpeg_width*0;
- bp3 = bp2 + RTjpeg_Csize;
-
- sb=sp;
- block=RTjpeg_old;
-/* Y */
- for(i=RTjpeg_height; i; i-=8)
- {
-  for(j=0, k=0; j<RTjpeg_width; j+=16, k+=8)
-  {
-   RTjpeg_dctY(bp+j, RTjpeg_block, RTjpeg_Ywidth);
-   RTjpeg_quant(RTjpeg_block, RTjpeg_lqt);
-   if(RTjpeg_bcomp(block, &RTjpeg_lmask))
-   {
-    *((__u8 *)sp++)=255;
-   } 
-	else sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_lb8);
-   block+=64;
-
-   RTjpeg_dctY(bp+j+8, RTjpeg_block, RTjpeg_Ywidth);
-   RTjpeg_quant(RTjpeg_block, RTjpeg_lqt);
-   if(RTjpeg_bcomp(block, &RTjpeg_lmask))
-   {
-    *((__u8 *)sp++)=255;
-   } 
-	else sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_lb8);
-   block+=64;
-
-   RTjpeg_dctY(bp2+k, RTjpeg_block, RTjpeg_Cwidth);
-   RTjpeg_quant(RTjpeg_block, RTjpeg_cqt);
-   if(RTjpeg_bcomp(block, &RTjpeg_cmask))
-   {
-    *((__u8 *)sp++)=255;
-   } 
-	else sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_cb8);
-   block+=64;
-
-   RTjpeg_dctY(bp3+k, RTjpeg_block, RTjpeg_Cwidth);
-   RTjpeg_quant(RTjpeg_block, RTjpeg_cqt);
-   if(RTjpeg_bcomp(block, &RTjpeg_cmask))
-   {
-    *((__u8 *)sp++)=255;
-   } 
-	else sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_cb8);
-   block+=64;
-
-  }
-  bp+=RTjpeg_width<<3;
-  bp2+=RTjpeg_width<<2;
-  bp3+=RTjpeg_width<<2;
- }
- printf ("%d\n", block - RTjpeg_old);
-#if HAVE_MMX
- emms();
-#endif
- return (sp-sb);
-}
-
-static int RTjpeg_mcompress8(__s8 *sp, unsigned char *bp, __u16 lmask)
-{
- __s8 * sb;
- __s16 *block;
- int i, j;
-
-#if HAVE_MMX
- emms();
- RTjpeg_lmask.uq=((__u64)lmask<<48)|((__u64)lmask<<32)|((__u64)lmask<<16)|lmask;
-#else
- RTjpeg_lmask=lmask;
-#endif
-
- 
- sb=sp;
- block=RTjpeg_old;
-/* Y */
- for(i=0; i<RTjpeg_height; i+=8)
- {
-  for(j=0; j<RTjpeg_width; j+=8)
-  {
-   RTjpeg_dctY(bp+j, RTjpeg_block, RTjpeg_width);
-   RTjpeg_quant(RTjpeg_block, RTjpeg_lqt);
-   if(RTjpeg_bcomp(block, &RTjpeg_lmask))
-   {
-    *((__u8 *)sp++)=255;
-//    printf("* %d ", sp[-1]);
-   } else sp+=RTjpeg_b2s(RTjpeg_block, sp, RTjpeg_lb8);
-   block+=64;
-  }
-  bp+=RTjpeg_width<<3;
- }
-#if HAVE_MMX
- emms();
-#endif
- return (sp-sb);
-}



More information about the MPlayer-cvslog mailing list