Browse code

bink: make IDCT take 32-bit input

Since IDCT transforming 32-bit input to 8-bit output is unusual and unpractical
for most codecs, move Bink IDCT into separate context. Get rid of an additional
permutation table while at it since SIMD support for Bink IDCT is unlikely to
be implemented in foreseeable future.
Quantisation tables also have to change type to signed for proper
dequantisation of DCT coefficients.

Signed-off-by: Mans Rullgard <mans@mansr.com>

Kostya Shishkov authored on 2011/07/23 22:46:35
Showing 7 changed files
... ...
@@ -89,7 +89,7 @@ OBJS-$(CONFIG_AURA2_DECODER)           += aura.o
89 89
 OBJS-$(CONFIG_AVS_DECODER)             += avs.o
90 90
 OBJS-$(CONFIG_BETHSOFTVID_DECODER)     += bethsoftvideo.o
91 91
 OBJS-$(CONFIG_BFI_DECODER)             += bfi.o
92
-OBJS-$(CONFIG_BINK_DECODER)            += bink.o binkidct.o
92
+OBJS-$(CONFIG_BINK_DECODER)            += bink.o binkdsp.o
93 93
 OBJS-$(CONFIG_BINKAUDIO_DCT_DECODER)   += binkaudio.o wma.o
94 94
 OBJS-$(CONFIG_BINKAUDIO_RDFT_DECODER)  += binkaudio.o wma.o
95 95
 OBJS-$(CONFIG_BMP_DECODER)             += bmp.o msrledec.o
... ...
@@ -24,6 +24,7 @@
24 24
 #include "avcodec.h"
25 25
 #include "dsputil.h"
26 26
 #include "binkdata.h"
27
+#include "binkdsp.h"
27 28
 #include "mathops.h"
28 29
 
29 30
 #define ALT_BITSTREAM_READER_LE
... ...
@@ -60,8 +61,8 @@ static const int binkb_bundle_signed[BINKB_NB_SRC] = {
60 60
     0, 0, 0, 1, 1, 0, 1, 0, 0, 0
61 61
 };
62 62
 
63
-static uint32_t binkb_intra_quant[16][64];
64
-static uint32_t binkb_inter_quant[16][64];
63
+static int32_t binkb_intra_quant[16][64];
64
+static int32_t binkb_inter_quant[16][64];
65 65
 
66 66
 /**
67 67
  * IDs for different data types used in Bink video codec
... ...
@@ -109,11 +110,11 @@ typedef struct Bundle {
109 109
 typedef struct BinkContext {
110 110
     AVCodecContext *avctx;
111 111
     DSPContext     dsp;
112
+    BinkDSPContext bdsp;
112 113
     AVFrame        pic, last;
113 114
     int            version;              ///< internal Bink file version
114 115
     int            has_alpha;
115 116
     int            swap_planes;
116
-    ScanTable      scantable;            ///< permutated scantable for DCT coeffs decoding
117 117
 
118 118
     Bundle         bundle[BINKB_NB_SRC]; ///< bundles for decoding all data types
119 119
     Tree           col_high[16];         ///< trees for decoding high nibble in "colours" data type
... ...
@@ -580,8 +581,8 @@ static inline int binkb_get_value(BinkContext *c, int bundle_num)
580 580
  * @param quant_matrices quantization matrices
581 581
  * @return 0 for success, negative value in other cases
582 582
  */
583
-static int read_dct_coeffs(GetBitContext *gb, DCTELEM block[64], const uint8_t *scan,
584
-                           const uint32_t quant_matrices[16][64], int q)
583
+static int read_dct_coeffs(GetBitContext *gb, int32_t block[64], const uint8_t *scan,
584
+                           const int32_t quant_matrices[16][64], int q)
585 585
 {
586 586
     int coef_list[128];
587 587
     int mode_list[128];
... ...
@@ -590,7 +591,7 @@ static int read_dct_coeffs(GetBitContext *gb, DCTELEM block[64], const uint8_t *
590 590
     int coef_count = 0;
591 591
     int coef_idx[64];
592 592
     int quant_idx;
593
-    const uint32_t *quant;
593
+    const int32_t *quant;
594 594
 
595 595
     coef_list[list_end] = 4;  mode_list[list_end++] = 0;
596 596
     coef_list[list_end] = 24; mode_list[list_end++] = 0;
... ...
@@ -791,6 +792,7 @@ static int binkb_decode_plane(BinkContext *c, GetBitContext *gb, int plane_idx,
791 791
     const uint8_t *scan;
792 792
     int xoff, yoff;
793 793
     LOCAL_ALIGNED_16(DCTELEM, block, [64]);
794
+    LOCAL_ALIGNED_16(int32_t, dctblock, [64]);
794 795
     int coordmap[64];
795 796
     int ybias = is_key ? -15 : 0;
796 797
     int qp;
... ...
@@ -845,11 +847,11 @@ static int binkb_decode_plane(BinkContext *c, GetBitContext *gb, int plane_idx,
845 845
                     dst[coordmap[*scan++]] = binkb_get_value(c, BINKB_SRC_COLORS);
846 846
                 break;
847 847
             case 2:
848
-                c->dsp.clear_block(block);
849
-                block[0] = binkb_get_value(c, BINKB_SRC_INTRA_DC);
848
+                memset(dctblock, 0, sizeof(*dctblock) * 64);
849
+                dctblock[0] = binkb_get_value(c, BINKB_SRC_INTRA_DC);
850 850
                 qp = binkb_get_value(c, BINKB_SRC_INTRA_Q);
851
-                read_dct_coeffs(gb, block, c->scantable.permutated, binkb_intra_quant, qp);
852
-                c->dsp.idct_put(dst, stride, block);
851
+                read_dct_coeffs(gb, dctblock, bink_scan, binkb_intra_quant, qp);
852
+                c->bdsp.idct_put(dst, stride, dctblock);
853 853
                 break;
854 854
             case 3:
855 855
                 xoff = binkb_get_value(c, BINKB_SRC_X_OFF);
... ...
@@ -878,11 +880,11 @@ static int binkb_decode_plane(BinkContext *c, GetBitContext *gb, int plane_idx,
878 878
                 } else {
879 879
                     put_pixels8x8_overlapped(dst, ref, stride);
880 880
                 }
881
-                c->dsp.clear_block(block);
882
-                block[0] = binkb_get_value(c, BINKB_SRC_INTER_DC);
881
+                memset(dctblock, 0, sizeof(*dctblock) * 64);
882
+                dctblock[0] = binkb_get_value(c, BINKB_SRC_INTER_DC);
883 883
                 qp = binkb_get_value(c, BINKB_SRC_INTER_Q);
884
-                read_dct_coeffs(gb, block, c->scantable.permutated, binkb_inter_quant, qp);
885
-                c->dsp.idct_add(dst, stride, block);
884
+                read_dct_coeffs(gb, dctblock, bink_scan, binkb_inter_quant, qp);
885
+                c->bdsp.idct_add(dst, stride, dctblock);
886 886
                 break;
887 887
             case 5:
888 888
                 v = binkb_get_value(c, BINKB_SRC_COLORS);
... ...
@@ -937,6 +939,7 @@ static int bink_decode_plane(BinkContext *c, GetBitContext *gb, int plane_idx,
937 937
     int xoff, yoff;
938 938
     LOCAL_ALIGNED_16(DCTELEM, block, [64]);
939 939
     LOCAL_ALIGNED_16(uint8_t, ublock, [64]);
940
+    LOCAL_ALIGNED_16(int32_t, dctblock, [64]);
940 941
     int coordmap[64];
941 942
 
942 943
     const int stride = c->pic.linesize[plane_idx];
... ...
@@ -1019,11 +1022,10 @@ static int bink_decode_plane(BinkContext *c, GetBitContext *gb, int plane_idx,
1019 1019
                         ublock[*scan++] = get_value(c, BINK_SRC_COLORS);
1020 1020
                     break;
1021 1021
                 case INTRA_BLOCK:
1022
-                    c->dsp.clear_block(block);
1023
-                    block[0] = get_value(c, BINK_SRC_INTRA_DC);
1024
-                    read_dct_coeffs(gb, block, c->scantable.permutated, bink_intra_quant, -1);
1025
-                    c->dsp.idct(block);
1026
-                    c->dsp.put_pixels_nonclamped(block, ublock, 8);
1022
+                    memset(dctblock, 0, sizeof(*dctblock) * 64);
1023
+                    dctblock[0] = get_value(c, BINK_SRC_INTRA_DC);
1024
+                    read_dct_coeffs(gb, dctblock, bink_scan, bink_intra_quant, -1);
1025
+                    c->bdsp.idct_put(ublock, 8, dctblock);
1027 1026
                     break;
1028 1027
                 case FILL_BLOCK:
1029 1028
                     v = get_value(c, BINK_SRC_COLORS);
... ...
@@ -1103,10 +1105,10 @@ static int bink_decode_plane(BinkContext *c, GetBitContext *gb, int plane_idx,
1103 1103
                 c->dsp.add_pixels8(dst, block, stride);
1104 1104
                 break;
1105 1105
             case INTRA_BLOCK:
1106
-                c->dsp.clear_block(block);
1107
-                block[0] = get_value(c, BINK_SRC_INTRA_DC);
1108
-                read_dct_coeffs(gb, block, c->scantable.permutated, bink_intra_quant, -1);
1109
-                c->dsp.idct_put(dst, stride, block);
1106
+                memset(dctblock, 0, sizeof(*dctblock) * 64);
1107
+                dctblock[0] = get_value(c, BINK_SRC_INTRA_DC);
1108
+                read_dct_coeffs(gb, dctblock, bink_scan, bink_intra_quant, -1);
1109
+                c->bdsp.idct_put(dst, stride, dctblock);
1110 1110
                 break;
1111 1111
             case FILL_BLOCK:
1112 1112
                 v = get_value(c, BINK_SRC_COLORS);
... ...
@@ -1117,10 +1119,10 @@ static int bink_decode_plane(BinkContext *c, GetBitContext *gb, int plane_idx,
1117 1117
                 yoff = get_value(c, BINK_SRC_Y_OFF);
1118 1118
                 ref = prev + xoff + yoff * stride;
1119 1119
                 c->dsp.put_pixels_tab[1][0](dst, ref, stride, 8);
1120
-                c->dsp.clear_block(block);
1121
-                block[0] = get_value(c, BINK_SRC_INTER_DC);
1122
-                read_dct_coeffs(gb, block, c->scantable.permutated, bink_inter_quant, -1);
1123
-                c->dsp.idct_add(dst, stride, block);
1120
+                memset(dctblock, 0, sizeof(*dctblock) * 64);
1121
+                dctblock[0] = get_value(c, BINK_SRC_INTER_DC);
1122
+                read_dct_coeffs(gb, dctblock, bink_scan, bink_inter_quant, -1);
1123
+                c->bdsp.idct_add(dst, stride, dctblock);
1124 1124
                 break;
1125 1125
             case PATTERN_BLOCK:
1126 1126
                 for (i = 0; i < 2; i++)
... ...
@@ -1288,7 +1290,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
1288 1288
 
1289 1289
     avctx->idct_algo = FF_IDCT_BINK;
1290 1290
     dsputil_init(&c->dsp, avctx);
1291
-    ff_init_scantable(c->dsp.idct_permutation, &c->scantable, bink_scan);
1291
+    ff_binkdsp_init(&c->bdsp);
1292 1292
 
1293 1293
     init_bundles(c);
1294 1294
 
... ...
@@ -285,7 +285,7 @@ static const uint8_t bink_patterns[16][64] = {
285 285
     }
286 286
 };
287 287
 
288
-static const uint32_t bink_intra_quant[16][64] = {
288
+static const int32_t bink_intra_quant[16][64] = {
289 289
 {
290 290
  0x010000, 0x016315, 0x01E83D, 0x02A535, 0x014E7B, 0x016577, 0x02F1E6, 0x02724C,
291 291
  0x010000, 0x00EEDA, 0x024102, 0x017F9B, 0x00BE80, 0x00611E, 0x01083C, 0x00A552,
... ...
@@ -448,7 +448,7 @@ static const uint32_t bink_intra_quant[16][64] = {
448 448
 },
449 449
 };
450 450
 
451
-static const uint32_t bink_inter_quant[16][64] = {
451
+static const int32_t bink_inter_quant[16][64] = {
452 452
 {
453 453
  0x010000, 0x017946, 0x01A5A9, 0x0248DC, 0x016363, 0x0152A7, 0x0243EC, 0x0209EA,
454 454
  0x012000, 0x00E248, 0x01BBDA, 0x015CBC, 0x00A486, 0x0053E0, 0x00F036, 0x008095,
455 455
new file mode 100644
... ...
@@ -0,0 +1,119 @@
0
+/*
1
+ * Bink DSP routines
2
+ * Copyright (c) 2009 Kostya Shishkov
3
+ *
4
+ * This file is part of Libav.
5
+ *
6
+ * Libav is free software; you can redistribute it and/or
7
+ * modify it under the terms of the GNU Lesser General Public
8
+ * License as published by the Free Software Foundation; either
9
+ * version 2.1 of the License, or (at your option) any later version.
10
+ *
11
+ * Libav is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
+ * Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public
17
+ * License along with Libav; if not, write to the Free Software
18
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
+ */
20
+
21
+/**
22
+ * @file
23
+ * Bink DSP routines
24
+ */
25
+
26
+#include "dsputil.h"
27
+#include "binkdsp.h"
28
+
29
+#define A1  2896 /* (1/sqrt(2))<<12 */
30
+#define A2  2217
31
+#define A3  3784
32
+#define A4 -5352
33
+
34
+#define IDCT_TRANSFORM(dest,s0,s1,s2,s3,s4,s5,s6,s7,d0,d1,d2,d3,d4,d5,d6,d7,munge,src) {\
35
+    const int a0 = (src)[s0] + (src)[s4]; \
36
+    const int a1 = (src)[s0] - (src)[s4]; \
37
+    const int a2 = (src)[s2] + (src)[s6]; \
38
+    const int a3 = (A1*((src)[s2] - (src)[s6])) >> 11; \
39
+    const int a4 = (src)[s5] + (src)[s3]; \
40
+    const int a5 = (src)[s5] - (src)[s3]; \
41
+    const int a6 = (src)[s1] + (src)[s7]; \
42
+    const int a7 = (src)[s1] - (src)[s7]; \
43
+    const int b0 = a4 + a6; \
44
+    const int b1 = (A3*(a5 + a7)) >> 11; \
45
+    const int b2 = ((A4*a5) >> 11) - b0 + b1; \
46
+    const int b3 = (A1*(a6 - a4) >> 11) - b2; \
47
+    const int b4 = ((A2*a7) >> 11) + b3 - b1; \
48
+    (dest)[d0] = munge(a0+a2   +b0); \
49
+    (dest)[d1] = munge(a1+a3-a2+b2); \
50
+    (dest)[d2] = munge(a1-a3+a2+b3); \
51
+    (dest)[d3] = munge(a0-a2   -b4); \
52
+    (dest)[d4] = munge(a0-a2   +b4); \
53
+    (dest)[d5] = munge(a1-a3+a2-b3); \
54
+    (dest)[d6] = munge(a1+a3-a2-b2); \
55
+    (dest)[d7] = munge(a0+a2   -b0); \
56
+}
57
+/* end IDCT_TRANSFORM macro */
58
+
59
+#define MUNGE_NONE(x) (x)
60
+#define IDCT_COL(dest,src) IDCT_TRANSFORM(dest,0,8,16,24,32,40,48,56,0,8,16,24,32,40,48,56,MUNGE_NONE,src)
61
+
62
+#define MUNGE_ROW(x) (((x) + 0x7F)>>8)
63
+#define IDCT_ROW(dest,src) IDCT_TRANSFORM(dest,0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,MUNGE_ROW,src)
64
+
65
+static inline void bink_idct_col(int *dest, const int32_t *src)
66
+{
67
+    if ((src[8]|src[16]|src[24]|src[32]|src[40]|src[48]|src[56])==0) {
68
+        dest[0]  =
69
+        dest[8]  =
70
+        dest[16] =
71
+        dest[24] =
72
+        dest[32] =
73
+        dest[40] =
74
+        dest[48] =
75
+        dest[56] = src[0];
76
+    } else {
77
+        IDCT_COL(dest, src);
78
+    }
79
+}
80
+
81
+static void bink_idct_c(int32_t *block)
82
+{
83
+    int i;
84
+    int temp[64];
85
+
86
+    for (i = 0; i < 8; i++)
87
+        bink_idct_col(&temp[i], &block[i]);
88
+    for (i = 0; i < 8; i++) {
89
+        IDCT_ROW( (&block[8*i]), (&temp[8*i]) );
90
+    }
91
+}
92
+
93
+static void bink_idct_add_c(uint8_t *dest, int linesize, int32_t *block)
94
+{
95
+    int i, j;
96
+
97
+    bink_idct_c(block);
98
+    for (i = 0; i < 8; i++, dest += linesize, block += 8)
99
+        for (j = 0; j < 8; j++)
100
+             dest[j] += block[j];
101
+}
102
+
103
+static void bink_idct_put_c(uint8_t *dest, int linesize, int32_t *block)
104
+{
105
+    int i;
106
+    int temp[64];
107
+    for (i = 0; i < 8; i++)
108
+        bink_idct_col(&temp[i], &block[i]);
109
+    for (i = 0; i < 8; i++) {
110
+        IDCT_ROW( (&dest[i*linesize]), (&temp[8*i]) );
111
+    }
112
+}
113
+
114
+void ff_binkdsp_init(BinkDSPContext *c)
115
+{
116
+    c->idct_add    = bink_idct_add_c;
117
+    c->idct_put    = bink_idct_put_c;
118
+}
0 119
new file mode 100644
... ...
@@ -0,0 +1,39 @@
0
+/*
1
+ * Bink DSP routines
2
+ * Copyright (c) 2009 Kostya Shishkov
3
+ *
4
+ * This file is part of Libav.
5
+ *
6
+ * Libav is free software; you can redistribute it and/or
7
+ * modify it under the terms of the GNU Lesser General Public
8
+ * License as published by the Free Software Foundation; either
9
+ * version 2.1 of the License, or (at your option) any later version.
10
+ *
11
+ * Libav is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
+ * Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public
17
+ * License along with Libav; if not, write to the Free Software
18
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
+ */
20
+
21
+/**
22
+ * @file
23
+ * Bink DSP routines
24
+ */
25
+
26
+#ifndef AVCODEC_BINKDSP_H
27
+#define AVCODEC_BINKDSP_H
28
+
29
+#include "dsputil.h"
30
+
31
+typedef struct BinkDSPContext {
32
+    void (*idct_put)(uint8_t *dest/*align 8*/, int line_size, int32_t *block/*align 16*/);
33
+    void (*idct_add)(uint8_t *dest/*align 8*/, int line_size, int32_t *block/*align 16*/);
34
+} BinkDSPContext;
35
+
36
+void ff_binkdsp_init(BinkDSPContext *c);
37
+
38
+#endif /* AVCODEC_BINKDSP_H */
0 39
deleted file mode 100644
... ...
@@ -1,112 +0,0 @@
1
-/*
2
- * Bink IDCT algorithm
3
- * Copyright (c) 2009 Kostya Shishkov
4
- *
5
- * This file is part of Libav.
6
- *
7
- * Libav is free software; you can redistribute it and/or
8
- * modify it under the terms of the GNU Lesser General Public
9
- * License as published by the Free Software Foundation; either
10
- * version 2.1 of the License, or (at your option) any later version.
11
- *
12
- * Libav is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
- * Lesser General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU Lesser General Public
18
- * License along with Libav; if not, write to the Free Software
19
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
- */
21
-
22
-/**
23
- * @file
24
- * Bink IDCT algorithm
25
- */
26
-
27
-#include "dsputil.h"
28
-
29
-#define A1  2896 /* (1/sqrt(2))<<12 */
30
-#define A2  2217
31
-#define A3  3784
32
-#define A4 -5352
33
-
34
-#define IDCT_TRANSFORM(dest,s0,s1,s2,s3,s4,s5,s6,s7,d0,d1,d2,d3,d4,d5,d6,d7,munge,src) {\
35
-    const int a0 = (src)[s0] + (src)[s4]; \
36
-    const int a1 = (src)[s0] - (src)[s4]; \
37
-    const int a2 = (src)[s2] + (src)[s6]; \
38
-    const int a3 = (A1*((src)[s2] - (src)[s6])) >> 11; \
39
-    const int a4 = (src)[s5] + (src)[s3]; \
40
-    const int a5 = (src)[s5] - (src)[s3]; \
41
-    const int a6 = (src)[s1] + (src)[s7]; \
42
-    const int a7 = (src)[s1] - (src)[s7]; \
43
-    const int b0 = a4 + a6; \
44
-    const int b1 = (A3*(a5 + a7)) >> 11; \
45
-    const int b2 = ((A4*a5) >> 11) - b0 + b1; \
46
-    const int b3 = (A1*(a6 - a4) >> 11) - b2; \
47
-    const int b4 = ((A2*a7) >> 11) + b3 - b1; \
48
-    (dest)[d0] = munge(a0+a2   +b0); \
49
-    (dest)[d1] = munge(a1+a3-a2+b2); \
50
-    (dest)[d2] = munge(a1-a3+a2+b3); \
51
-    (dest)[d3] = munge(a0-a2   -b4); \
52
-    (dest)[d4] = munge(a0-a2   +b4); \
53
-    (dest)[d5] = munge(a1-a3+a2-b3); \
54
-    (dest)[d6] = munge(a1+a3-a2-b2); \
55
-    (dest)[d7] = munge(a0+a2   -b0); \
56
-}
57
-/* end IDCT_TRANSFORM macro */
58
-
59
-#define MUNGE_NONE(x) (x)
60
-#define IDCT_COL(dest,src) IDCT_TRANSFORM(dest,0,8,16,24,32,40,48,56,0,8,16,24,32,40,48,56,MUNGE_NONE,src)
61
-
62
-#define MUNGE_ROW(x) (((x) + 0x7F)>>8)
63
-#define IDCT_ROW(dest,src) IDCT_TRANSFORM(dest,0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,MUNGE_ROW,src)
64
-
65
-static inline void bink_idct_col(int *dest, const DCTELEM *src)
66
-{
67
-    if ((src[8]|src[16]|src[24]|src[32]|src[40]|src[48]|src[56])==0) {
68
-        dest[0]  =
69
-        dest[8]  =
70
-        dest[16] =
71
-        dest[24] =
72
-        dest[32] =
73
-        dest[40] =
74
-        dest[48] =
75
-        dest[56] = src[0];
76
-    } else {
77
-        IDCT_COL(dest, src);
78
-    }
79
-}
80
-
81
-void ff_bink_idct_c(DCTELEM *block)
82
-{
83
-    int i;
84
-    int temp[64];
85
-
86
-    for (i = 0; i < 8; i++)
87
-        bink_idct_col(&temp[i], &block[i]);
88
-    for (i = 0; i < 8; i++) {
89
-        IDCT_ROW( (&block[8*i]), (&temp[8*i]) );
90
-    }
91
-}
92
-
93
-void ff_bink_idct_add_c(uint8_t *dest, int linesize, DCTELEM *block)
94
-{
95
-    int i, j;
96
-
97
-    ff_bink_idct_c(block);
98
-    for (i = 0; i < 8; i++, dest += linesize, block += 8)
99
-        for (j = 0; j < 8; j++)
100
-             dest[j] += block[j];
101
-}
102
-
103
-void ff_bink_idct_put_c(uint8_t *dest, int linesize, DCTELEM *block)
104
-{
105
-    int i;
106
-    int temp[64];
107
-    for (i = 0; i < 8; i++)
108
-        bink_idct_col(&temp[i], &block[i]);
109
-    for (i = 0; i < 8; i++) {
110
-        IDCT_ROW( (&dest[i*linesize]), (&temp[8*i]) );
111
-    }
112
-}
... ...
@@ -2894,11 +2894,6 @@ av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx)
2894 2894
         }else if(CONFIG_EATGQ_DECODER && avctx->idct_algo==FF_IDCT_EA) {
2895 2895
             c->idct_put= ff_ea_idct_put_c;
2896 2896
             c->idct_permutation_type= FF_NO_IDCT_PERM;
2897
-        }else if(CONFIG_BINK_DECODER && avctx->idct_algo==FF_IDCT_BINK) {
2898
-            c->idct     = ff_bink_idct_c;
2899
-            c->idct_add = ff_bink_idct_add_c;
2900
-            c->idct_put = ff_bink_idct_put_c;
2901
-            c->idct_permutation_type = FF_NO_IDCT_PERM;
2902 2897
         }else{ //accurate/default
2903 2898
             c->idct_put = ff_simple_idct_put_8;
2904 2899
             c->idct_add = ff_simple_idct_add_8;