1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avcodec/h263dec: Move calculating gob_index to {intel,itu}h263dec.c

This avoids checks for whether it should be calculated at all.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2025-05-17 20:20:05 +02:00
parent 9918741967
commit a0a136e57b
3 changed files with 5 additions and 5 deletions

View File

@ -535,11 +535,6 @@ int ff_h263_decode_frame(AVCodecContext *avctx, AVFrame *pict,
}
}
if (s->codec_id == AV_CODEC_ID_H263 ||
s->codec_id == AV_CODEC_ID_H263P ||
s->codec_id == AV_CODEC_ID_H263I)
s->gob_index = H263_GOB_HEIGHT(s->height);
/* skip B-frames if we don't have reference frames */
if (!s->last_pic.ptr &&
(s->pict_type == AV_PICTURE_TYPE_B || s->droppable))

View File

@ -19,6 +19,7 @@
*/
#include "codec_internal.h"
#include "h263.h"
#include "mpegvideo.h"
#include "mpegvideodec.h"
#include "h263data.h"
@ -119,6 +120,8 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s)
if (skip_1stop_8data_bits(&s->gb) < 0)
return AVERROR_INVALIDDATA;
s->gob_index = H263_GOB_HEIGHT(s->height);
ff_h263_show_pict_info(s);
return 0;

View File

@ -1314,6 +1314,8 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
s->mb_height = (s->height + 15) / 16;
s->mb_num = s->mb_width * s->mb_height;
s->gob_index = H263_GOB_HEIGHT(s->height);
if (s->pb_frame) {
skip_bits(&s->gb, 3); /* Temporal reference for B-pictures */
if (s->custom_pcf)