aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-10-30 02:13:03 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-11-06 17:41:25 +0100
commit777a8c2d500c3423a3a55b57752b18e88e876a2f (patch)
tree85833d5dd05eab6aaf3b788f0f087ce5cefdba4f
parente4df54851ae36ea2c93928c0ca237b393668254d (diff)
downloadffmpeg-777a8c2d500c3423a3a55b57752b18e88e876a2f.tar.gz
avcodec/vc1: Move setting res_fasttx-IDCT functions to vc1dec.c
It allows to avoid compiling simple_idct.o for the VC-1 parser. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavcodec/Makefile2
-rw-r--r--libavcodec/vc1.c11
-rw-r--r--libavcodec/vc1dec.c9
3 files changed, 10 insertions, 12 deletions
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 23e368137a..3e8dd86768 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -1169,7 +1169,7 @@ OBJS-$(CONFIG_SBC_PARSER) += sbc_parser.o
OBJS-$(CONFIG_SIPR_PARSER) += sipr_parser.o
OBJS-$(CONFIG_TAK_PARSER) += tak_parser.o tak.o
OBJS-$(CONFIG_VC1_PARSER) += vc1_parser.o vc1.o vc1data.o \
- simple_idct.o wmv2data.o
+ wmv2data.o
OBJS-$(CONFIG_VP3_PARSER) += vp3_parser.o
OBJS-$(CONFIG_VP8_PARSER) += vp8_parser.o
OBJS-$(CONFIG_VP9_PARSER) += vp9_parser.o
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index f6468b54c7..6eb0d70a68 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -35,7 +35,6 @@
#include "vc1data.h"
#include "wmv2data.h"
#include "unary.h"
-#include "simple_idct.h"
/***********************************************************************/
/**
@@ -314,16 +313,6 @@ int ff_vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitCo
v->res_x8 = get_bits1(gb); //reserved
v->multires = get_bits1(gb);
v->res_fasttx = get_bits1(gb);
- if (!v->res_fasttx) {
- v->vc1dsp.vc1_inv_trans_8x8 = ff_simple_idct_int16_8bit;
- v->vc1dsp.vc1_inv_trans_8x4 = ff_simple_idct84_add;
- v->vc1dsp.vc1_inv_trans_4x8 = ff_simple_idct48_add;
- v->vc1dsp.vc1_inv_trans_4x4 = ff_simple_idct44_add;
- v->vc1dsp.vc1_inv_trans_8x8_dc = ff_simple_idct_add_int16_8bit;
- v->vc1dsp.vc1_inv_trans_8x4_dc = ff_simple_idct84_add;
- v->vc1dsp.vc1_inv_trans_4x8_dc = ff_simple_idct48_add;
- v->vc1dsp.vc1_inv_trans_4x4_dc = ff_simple_idct44_add;
- }
v->fastuvmc = get_bits1(gb); //common
if (!v->profile && !v->fastuvmc) {
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index fa6b5cfd3c..2cb39430f5 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -40,6 +40,7 @@
#include "msmpeg4data.h"
#include "msmpeg4dec.h"
#include "profiles.h"
+#include "simple_idct.h"
#include "vc1.h"
#include "vc1data.h"
#include "libavutil/avassert.h"
@@ -562,6 +563,14 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
memcpy(v->zz_8x8, ff_wmv1_scantable, 4*64);
v->left_blk_sh = 3;
v->top_blk_sh = 0;
+ v->vc1dsp.vc1_inv_trans_8x8 = ff_simple_idct_int16_8bit;
+ v->vc1dsp.vc1_inv_trans_8x4 = ff_simple_idct84_add;
+ v->vc1dsp.vc1_inv_trans_4x8 = ff_simple_idct48_add;
+ v->vc1dsp.vc1_inv_trans_4x4 = ff_simple_idct44_add;
+ v->vc1dsp.vc1_inv_trans_8x8_dc = ff_simple_idct_add_int16_8bit;
+ v->vc1dsp.vc1_inv_trans_8x4_dc = ff_simple_idct84_add;
+ v->vc1dsp.vc1_inv_trans_4x8_dc = ff_simple_idct48_add;
+ v->vc1dsp.vc1_inv_trans_4x4_dc = ff_simple_idct44_add;
}
if (avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || avctx->codec_id == AV_CODEC_ID_VC1IMAGE) {