changeset 8646:8b52ac19a91c libavcodec

remove zigzag_scan8x8, it is the same as ff_zigzag_direct
author stefang
date Sat, 24 Jan 2009 14:30:15 +0000
parents ead59531f24a
children 87b48b7d2007
files h264.c h264data.h
diffstat 2 files changed, 4 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Sat Jan 24 14:28:08 2009 +0000
+++ b/h264.c	Sat Jan 24 14:30:15 2009 +0000
@@ -3563,14 +3563,14 @@
         }
     }
     if(s->dsp.h264_idct8_add == ff_h264_idct8_add_c){
-        memcpy(h->zigzag_scan8x8,       zigzag_scan8x8,       64*sizeof(uint8_t));
+        memcpy(h->zigzag_scan8x8,       ff_zigzag_direct,     64*sizeof(uint8_t));
         memcpy(h->zigzag_scan8x8_cavlc, zigzag_scan8x8_cavlc, 64*sizeof(uint8_t));
         memcpy(h->field_scan8x8,        field_scan8x8,        64*sizeof(uint8_t));
         memcpy(h->field_scan8x8_cavlc,  field_scan8x8_cavlc,  64*sizeof(uint8_t));
     }else{
         for(i=0; i<64; i++){
 #define T(x) (x>>3) | ((x&7)<<3)
-            h->zigzag_scan8x8[i]       = T(zigzag_scan8x8[i]);
+            h->zigzag_scan8x8[i]       = T(ff_zigzag_direct[i]);
             h->zigzag_scan8x8_cavlc[i] = T(zigzag_scan8x8_cavlc[i]);
             h->field_scan8x8[i]        = T(field_scan8x8[i]);
             h->field_scan8x8_cavlc[i]  = T(field_scan8x8_cavlc[i]);
@@ -3579,7 +3579,7 @@
     }
     if(h->sps.transform_bypass){ //FIXME same ugly
         h->zigzag_scan_q0          = zigzag_scan;
-        h->zigzag_scan8x8_q0       = zigzag_scan8x8;
+        h->zigzag_scan8x8_q0       = ff_zigzag_direct;
         h->zigzag_scan8x8_cavlc_q0 = zigzag_scan8x8_cavlc;
         h->field_scan_q0           = field_scan;
         h->field_scan8x8_q0        = field_scan8x8;
@@ -6981,7 +6981,7 @@
                                 const uint8_t *jvt_list, const uint8_t *fallback_list){
     MpegEncContext * const s = &h->s;
     int i, last = 8, next = 8;
-    const uint8_t *scan = size == 16 ? zigzag_scan : zigzag_scan8x8;
+    const uint8_t *scan = size == 16 ? zigzag_scan : ff_zigzag_direct;
     if(!get_bits1(&s->gb)) /* matrix not written, we use the predicted one */
         memcpy(factors, fallback_list, size*sizeof(uint8_t));
     else
--- a/h264data.h	Sat Jan 24 14:28:08 2009 +0000
+++ b/h264data.h	Sat Jan 24 14:30:15 2009 +0000
@@ -286,25 +286,6 @@
  (0+1*2)*16, (1+1*2)*16,  //FIXME
 };
 
-static const uint8_t zigzag_scan8x8[64]={
- 0+0*8, 1+0*8, 0+1*8, 0+2*8,
- 1+1*8, 2+0*8, 3+0*8, 2+1*8,
- 1+2*8, 0+3*8, 0+4*8, 1+3*8,
- 2+2*8, 3+1*8, 4+0*8, 5+0*8,
- 4+1*8, 3+2*8, 2+3*8, 1+4*8,
- 0+5*8, 0+6*8, 1+5*8, 2+4*8,
- 3+3*8, 4+2*8, 5+1*8, 6+0*8,
- 7+0*8, 6+1*8, 5+2*8, 4+3*8,
- 3+4*8, 2+5*8, 1+6*8, 0+7*8,
- 1+7*8, 2+6*8, 3+5*8, 4+4*8,
- 5+3*8, 6+2*8, 7+1*8, 7+2*8,
- 6+3*8, 5+4*8, 4+5*8, 3+6*8,
- 2+7*8, 3+7*8, 4+6*8, 5+5*8,
- 6+4*8, 7+3*8, 7+4*8, 6+5*8,
- 5+6*8, 4+7*8, 5+7*8, 6+6*8,
- 7+5*8, 7+6*8, 6+7*8, 7+7*8,
-};
-
 // zigzag_scan8x8_cavlc[i] = zigzag_scan8x8[(i/4) + 16*(i%4)]
 static const uint8_t zigzag_scan8x8_cavlc[64]={
  0+0*8, 1+1*8, 1+2*8, 2+2*8,