summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-05 19:43:28 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-05 19:43:28 +0200
commit47fc82b5b34677f49bb263ee9e67350cb004fe31 (patch)
tree082f3f5e1a65159244427d1362f3caea9092af7c
parente6f69b324e88794c7a2874e5ee8398b3ac41b10c (diff)
parent5f9220437025a0d66abc68323b4ce9b50e72d51b (diff)
downloadffmpeg-47fc82b5b34677f49bb263ee9e67350cb004fe31.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: dsputil: Move DV-specific ff_zigzag248_direct table to dvdata Conflicts: libavcodec/dv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/dsputil.c13
-rw-r--r--libavcodec/dsputil.h1
-rw-r--r--libavcodec/dv.c4
-rw-r--r--libavcodec/dvdata.c13
-rw-r--r--libavcodec/dvdata.h2
-rw-r--r--libavcodec/dvenc.c2
6 files changed, 18 insertions, 17 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index cfa8b768c6..21e3feaca9 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -59,19 +59,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,
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
index d01c3df4d1..f8eb8fd008 100644
--- a/libavcodec/dsputil.h
+++ b/libavcodec/dsputil.h
@@ -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];
diff --git a/libavcodec/dv.c b/libavcodec/dv.c
index ea05e9dd88..a9f64b4a8d 100644
--- a/libavcodec/dv.c
+++ b/libavcodec/dv.c
@@ -314,11 +314,11 @@ av_cold int ff_dvvideo_init(AVCodecContext *avctx)
s->idct_put[1] = ff_simple_idct248_put; // FIXME: need to add it to DSP
if (avctx->lowres){
for (i = 0; i < 64; i++){
- int j = ff_zigzag248_direct[i];
+ int j = ff_dv_zigzag248_direct[i];
s->dv_zigzag[1][i] = dsp.idct_permutation[(j & 7) + (j & 8) * 4 + (j & 48) / 2];
}
}else
- 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;
diff --git a/libavcodec/dvdata.c b/libavcodec/dvdata.c
index a3be7fd7ad..ace01ffda2 100644
--- a/libavcodec/dvdata.c
+++ b/libavcodec/dvdata.c
@@ -28,6 +28,19 @@
#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 },
diff --git a/libavcodec/dvdata.h b/libavcodec/dvdata.h
index 8c120df722..0932d3ad15 100644
--- a/libavcodec/dvdata.h
+++ b/libavcodec/dvdata.h
@@ -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];
diff --git a/libavcodec/dvenc.c b/libavcodec/dvenc.c
index 3efe53a838..052b631863 100644
--- a/libavcodec/dvenc.c
+++ b/libavcodec/dvenc.c
@@ -249,7 +249,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++) {