History

avcodec/rv10: Perform RV20 initialization during init

Andreas Rheinhardt committed 1 year ago

Commit f5fc31a1 parent 8e0f0641 file · +4 −4Browse files

Unified · Split

libavcodec/rv10.c+4−4
@@ -284,7 +284,6 @@ static int rv20_decode_picture_header(RVDecContext *rv, int whole_size) · 283 unmodified lines
284284 skip_bits(&s->gb, 5);
285285
286286 s->h263_aic = s->pict_type == AV_PICTURE_TYPE_I;
287− s->modified_quant = 1;
288287 if (!s->avctx->lowres)
289288 s->loop_filter = 1;
290289
@@ -370,6 +369,10 @@ static av_cold int rv10_decode_init(AVCodecContext *avctx) · 79 unmodified lines
370369
371370 s->h263_long_vectors = avctx->extradata[3] & 1;
372371 rv->sub_id = AV_RB32A(avctx->extradata + 4);
372+ if (avctx->codec_id == AV_CODEC_ID_RV20) {
373+ s->modified_quant = 1;
374+ s->chroma_qscale_table = ff_h263_chroma_qscale_table;
375+ }
373376
374377 major_ver = RV_GET_MAJOR_VER(rv->sub_id);
375378 minor_ver = RV_GET_MINOR_VER(rv->sub_id);
@@ -475,9 +478,6 @@ static int rv10_decode_packet(AVCodecContext *avctx, const uint8_t *buf, · 99 unmodified lines
475478 s->c_dc_scale_table = ff_mpeg1_dc_scale_table;
476479 }
477480
478− if (s->modified_quant)
479− s->chroma_qscale_table = ff_h263_chroma_qscale_table;
480−
481481 ff_set_qscale(s, s->qscale);
482482
483483 s->rv10_first_dc_coded[0] = 0;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t