aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2025-05-25 15:40:25 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2025-06-21 22:08:51 +0200
commitf5fc31acecdef68fae669faa96a3ee0914989859 (patch)
treec718bec12827b0d089298d246e15a1d373ffc100
parent8e0f064a1170ab93bd309ec18d8070a9d2641656 (diff)
downloadffmpeg-f5fc31acecdef68fae669faa96a3ee0914989859.tar.gz
avcodec/rv10: Perform RV20 initialization during init
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavcodec/rv10.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c
index 482af8e52a..1aae92a358 100644
--- a/libavcodec/rv10.c
+++ b/libavcodec/rv10.c
@@ -284,7 +284,6 @@ static int rv20_decode_picture_header(RVDecContext *rv, int whole_size)
skip_bits(&s->gb, 5);
s->h263_aic = s->pict_type == AV_PICTURE_TYPE_I;
- s->modified_quant = 1;
if (!s->avctx->lowres)
s->loop_filter = 1;
@@ -370,6 +369,10 @@ static av_cold int rv10_decode_init(AVCodecContext *avctx)
s->h263_long_vectors = avctx->extradata[3] & 1;
rv->sub_id = AV_RB32A(avctx->extradata + 4);
+ if (avctx->codec_id == AV_CODEC_ID_RV20) {
+ s->modified_quant = 1;
+ s->chroma_qscale_table = ff_h263_chroma_qscale_table;
+ }
major_ver = RV_GET_MAJOR_VER(rv->sub_id);
minor_ver = RV_GET_MINOR_VER(rv->sub_id);
@@ -475,9 +478,6 @@ static int rv10_decode_packet(AVCodecContext *avctx, const uint8_t *buf,
s->c_dc_scale_table = ff_mpeg1_dc_scale_table;
}
- if (s->modified_quant)
- s->chroma_qscale_table = ff_h263_chroma_qscale_table;
-
ff_set_qscale(s, s->qscale);
s->rv10_first_dc_coded[0] = 0;