]> git.sesse.net Git - ffmpeg/commitdiff
dsputil: Move DV-specific ff_zigzag248_direct table to dvdata
authorDiego Biurrun <diego@biurrun.de>
Wed, 26 Mar 2014 11:41:29 +0000 (04:41 -0700)
committerDiego Biurrun <diego@biurrun.de>
Fri, 4 Apr 2014 17:08:05 +0000 (19:08 +0200)
libavcodec/dsputil.c
libavcodec/dsputil.h
libavcodec/dv.c
libavcodec/dvdata.c
libavcodec/dvdata.h
libavcodec/dvenc.c

index 534bc92d40f815ec4315eb112188f1ac90522c12..a5f446b8a626a39158482aaed6c28eb44c6e2d2c 100644 (file)
@@ -57,19 +57,6 @@ uint32_t ff_square_tab[512] = { 0, };
 #define pb_7f (~0UL / 255 * 0x7f)
 #define pb_80 (~0UL / 255 * 0x80)
 
-/* Specific zigzag scan for 248 idct. NOTE that unlike the
- * specification, we interleave the fields */
-const uint8_t ff_zigzag248_direct[64] = {
-     0,  8,  1,  9, 16, 24,  2, 10,
-    17, 25, 32, 40, 48, 56, 33, 41,
-    18, 26,  3, 11,  4, 12, 19, 27,
-    34, 42, 49, 57, 50, 58, 35, 43,
-    20, 28,  5, 13,  6, 14, 21, 29,
-    36, 44, 51, 59, 52, 60, 37, 45,
-    22, 30,  7, 15, 23, 31, 38, 46,
-    53, 61, 54, 62, 39, 47, 55, 63,
-};
-
 const uint8_t ff_alternate_horizontal_scan[64] = {
      0,  1,  2,  3,  8,  9, 16, 17,
     10, 11,  4,  5,  6,  7, 15, 14,
index 7f467d16ff2d3d134c010616cc791bb377a31eb7..3ef48ecf42fb2cf87d345e5c117f600d38bab7be 100644 (file)
@@ -35,7 +35,6 @@
 /* encoding scans */
 extern const uint8_t ff_alternate_horizontal_scan[64];
 extern const uint8_t ff_alternate_vertical_scan[64];
-extern const uint8_t ff_zigzag248_direct[64];
 
 extern uint32_t ff_square_tab[512];
 
index a6f614a4250e7ec873d5bb46378f9f7838093041..1a54c4efa8dbf0cfd0375545414f2e1de7d2ef13 100644 (file)
@@ -311,7 +311,7 @@ av_cold int ff_dvvideo_init(AVCodecContext *avctx)
     /* 248DCT setup */
     s->fdct[1]     = dsp.fdct248;
     s->idct_put[1] = ff_simple_idct248_put;  // FIXME: need to add it to DSP
-    memcpy(s->dv_zigzag[1], ff_zigzag248_direct, 64);
+    memcpy(s->dv_zigzag[1], ff_dv_zigzag248_direct, 64);
 
     s->avctx = avctx;
     avctx->chroma_sample_location = AVCHROMA_LOC_TOPLEFT;
index f9c22ac20ffa43bd684c874e37f3aebbb1e6c6bd..ad41a1b5b25c144b24f263f40ad506310ac0ae2c 100644 (file)
 
 #include "dvdata.h"
 
+/* Specific zigzag scan for 248 idct. NOTE that unlike the
+ * specification, we interleave the fields */
+const uint8_t ff_dv_zigzag248_direct[64] = {
+     0,  8,  1,  9, 16, 24,  2, 10,
+    17, 25, 32, 40, 48, 56, 33, 41,
+    18, 26,  3, 11,  4, 12, 19, 27,
+    34, 42, 49, 57, 50, 58, 35, 43,
+    20, 28,  5, 13,  6, 14, 21, 29,
+    36, 44, 51, 59, 52, 60, 37, 45,
+    22, 30,  7, 15, 23, 31, 38, 46,
+    53, 61, 54, 62, 39, 47, 55, 63,
+};
+
 /* unquant tables (not used directly) */
 const uint8_t ff_dv_quant_shifts[22][4] = {
   { 3,3,4,4 },
index 164ef1b31f72ff10178396104113b751536a71ef..8e7c0fbcdf56d6b5962c68ff27f94980870f83bd 100644 (file)
@@ -21,6 +21,8 @@
 
 #include <stdint.h>
 
+extern const uint8_t ff_dv_zigzag248_direct[64];
+
 extern const uint8_t ff_dv_quant_shifts[22][4];
 extern const uint8_t ff_dv_quant_offset[4];
 
index 590a2a9527443c122a8a08baf168f6d0c1c56b05..6338deec26ad5e3ee5e4df25c4e9f39a0a6cb211 100644 (file)
@@ -245,7 +245,7 @@ static av_always_inline int dv_init_enc_block(EncBlockInfo* bi, uint8_t *data, i
     }
     bi->mb[0] = blk[0];
 
-    zigzag_scan = bi->dct_mode ? ff_zigzag248_direct : ff_zigzag_direct;
+    zigzag_scan = bi->dct_mode ? ff_dv_zigzag248_direct : ff_zigzag_direct;
     weight = bi->dct_mode ? dv_weight_248 : dv_weight_88;
 
     for (area = 0; area < 4; area++) {