The branch, master has been updated
via dad06a445f9aa3c19c01d9d4f0e98e00fefcd05b (commit)
via 10d3479da083bb86fdb149ba317a754279e884a0 (commit)
from d96f8d32adfd4ea08c276cd2b6f10e7a3caf06fc (commit)
- Log -----------------------------------------------------------------
commit dad06a445f9aa3c19c01d9d4f0e98e00fefcd05b
Author: Andreas Rheinhardt <[email protected]>
AuthorDate: Wed Oct 8 04:56:04 2025 +0200
Commit: Andreas Rheinhardt <[email protected]>
CommitDate: Sat Oct 11 07:51:01 2025 +0200
avcodec/Makefile: Remove h263 decoder->mpeg4videodec.o dependency
Also prefer using #if CONFIG_MPEG4_DECODER checks in order not
to rely on DCE.
Signed-off-by: Andreas Rheinhardt <[email protected]>
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index d55e899c14..791fd5d5a4 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -158,7 +158,7 @@ OBJS-$(CONFIG_MPEGVIDEOENC) += mpegvideo_enc.o
mpeg12data.o \
motion_est.o ratecontrol.o
OBJS-$(CONFIG_MPEGVIDEOENCDSP) += mpegvideoencdsp.o
OBJS-$(CONFIG_MSMPEG4DEC) += msmpeg4dec.o msmpeg4.o msmpeg4data.o
\
- msmpeg4_vc1_data.o
+ msmpeg4_vc1_data.o mpeg4videodec.o
OBJS-$(CONFIG_MSMPEG4ENC) += msmpeg4enc.o msmpeg4.o msmpeg4data.o
\
msmpeg4_vc1_data.o
OBJS-$(CONFIG_MSS34DSP) += mss34dsp.o jpegquanttables.o
@@ -576,7 +576,8 @@ OBJS-$(CONFIG_MPEG2_CUVID_DECODER) += cuviddec.o
OBJS-$(CONFIG_MPEG2_MEDIACODEC_DECODER) += mediacodecdec.o
OBJS-$(CONFIG_MPEG2_VAAPI_ENCODER) += vaapi_encode_mpeg2.o
OBJS-$(CONFIG_MPEG2_V4L2M2M_DECODER) += v4l2_m2m_dec.o
-OBJS-$(CONFIG_MPEG4_DECODER) += mpeg4videodsp.o xvididct.o
+OBJS-$(CONFIG_MPEG4_DECODER) += mpeg4videodec.o mpeg4videodsp.o \
+ xvididct.o
OBJS-$(CONFIG_MPEG4_ENCODER) += mpeg4videoenc.o
OBJS-$(CONFIG_MPEG4_CUVID_DECODER) += cuviddec.o
OBJS-$(CONFIG_MPEG4_MEDIACODEC_DECODER) += mediacodecdec.o
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index bacd258d53..697fe7e572 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -201,10 +201,12 @@ static int decode_slice(H263DecContext *const h)
ff_set_qscale(&h->c, h->c.qscale);
+#if CONFIG_MPEG4_DECODER
if (h->c.studio_profile) {
if ((ret = ff_mpeg4_decode_studio_slice_header(h)) < 0)
return ret;
}
+#endif
if (h->c.avctx->hwaccel) {
const uint8_t *start = h->gb.buffer + get_bits_count(&h->gb) / 8;
@@ -500,13 +502,15 @@ int ff_h263_decode_frame(AVCodecContext *avctx, AVFrame
*pict,
avctx->has_b_frames = !h->c.low_delay;
- if (CONFIG_MPEG4_DECODER && avctx->codec_id == AV_CODEC_ID_MPEG4) {
+#if CONFIG_MPEG4_DECODER
+ if (avctx->codec_id == AV_CODEC_ID_MPEG4) {
if (h->c.pict_type != AV_PICTURE_TYPE_B && h->c.mb_num/2 >
get_bits_left(&h->gb))
return AVERROR_INVALIDDATA;
ff_mpeg4_workaround_bugs(avctx);
if (h->c.studio_profile != (h->c.idsp.idct == NULL))
ff_mpv_idct_init(s);
}
+#endif
/* After H.263 & MPEG-4 header decode we have the height, width,
* and other parameters. So then we could init the picture. */
@@ -615,8 +619,10 @@ frame_end:
ff_mpv_frame_end(s);
- if (CONFIG_MPEG4_DECODER && avctx->codec_id == AV_CODEC_ID_MPEG4)
+#if CONFIG_MPEG4_DECODER
+ if (avctx->codec_id == AV_CODEC_ID_MPEG4)
ff_mpeg4_frame_end(avctx, avpkt);
+#endif
av_assert1(h->c.pict_type == h->c.cur_pic.ptr->f->pict_type);
if (h->c.pict_type == AV_PICTURE_TYPE_B || h->c.low_delay) {
diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c
index 7a78b95c50..dc8847b53b 100644
--- a/libavcodec/ituh263dec.c
+++ b/libavcodec/ituh263dec.c
@@ -240,9 +240,11 @@ int ff_h263_resync(H263DecContext *const h)
if (show_bits(&h->gb, 16) ==0) {
pos = get_bits_count(&h->gb);
- if(CONFIG_MPEG4_DECODER && h->c.codec_id==AV_CODEC_ID_MPEG4)
+#if CONFIG_MPEG4_DECODER
+ if (h->c.codec_id == AV_CODEC_ID_MPEG4)
ret = ff_mpeg4_decode_video_packet_header(h);
else
+#endif
ret = h263_decode_gob_header(h);
if(ret>=0)
return pos;
@@ -257,9 +259,11 @@ int ff_h263_resync(H263DecContext *const h)
GetBitContext bak = h->gb;
pos = get_bits_count(&h->gb);
- if(CONFIG_MPEG4_DECODER && h->c.codec_id==AV_CODEC_ID_MPEG4)
+#if CONFIG_MPEG4_DECODER
+ if (h->c.codec_id == AV_CODEC_ID_MPEG4)
ret = ff_mpeg4_decode_video_packet_header(h);
else
+#endif
ret = h263_decode_gob_header(h);
if(ret>=0)
return pos;
commit 10d3479da083bb86fdb149ba317a754279e884a0
Author: Andreas Rheinhardt <[email protected]>
AuthorDate: Wed Oct 8 03:45:20 2025 +0200
Commit: Andreas Rheinhardt <[email protected]>
CommitDate: Sat Oct 11 07:51:01 2025 +0200
avcodec/h263dec: Avoid redundant branch
Only the MPEG-4 decoder can have partitioned frames here.
Signed-off-by: Andreas Rheinhardt <[email protected]>
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 3821472e91..bacd258d53 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -215,12 +215,15 @@ static int decode_slice(H263DecContext *const h)
return ret;
}
+#if CONFIG_MPEG4_DECODER
if (h->partitioned_frame) {
const int qscale = h->c.qscale;
- if (CONFIG_MPEG4_DECODER && h->c.codec_id == AV_CODEC_ID_MPEG4)
- if ((ret = ff_mpeg4_decode_partitions(h)) < 0)
- return ret;
+ av_assert1(h->c.codec_id == AV_CODEC_ID_MPEG4);
+
+ ret = ff_mpeg4_decode_partitions(h);
+ if (ret < 0)
+ return ret;
/* restore variables which were modified */
h->c.first_slice_line = 1;
@@ -228,6 +231,7 @@ static int decode_slice(H263DecContext *const h)
h->c.mb_y = h->c.resync_mb_y;
ff_set_qscale(&h->c, qscale);
}
+#endif
for (; h->c.mb_y < h->c.mb_height; h->c.mb_y++) {
/* per-row end of slice checks */
-----------------------------------------------------------------------
Summary of changes:
libavcodec/Makefile | 5 +++--
libavcodec/h263dec.c | 20 +++++++++++++++-----
libavcodec/ituh263dec.c | 8 ++++++--
3 files changed, 24 insertions(+), 9 deletions(-)
hooks/post-receive
--
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]