From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Subject: [FFmpeg-devel] [PATCH 5/7] avcodec/msmpeg4dec: Move setting decode_mb for WMV2 to wmv2dec.c Date: Wed, 26 Oct 2022 04:01:46 +0200 Message-ID: <AS8P250MB07448FB823D70622868AA2E18F309@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw) In-Reply-To: <AS8P250MB0744149DC87FAB32814CAF938F2E9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> It avoids checks and allows to make ff_wmv2_decode_mb() static; furthermore, it allows to avoid a config_components.h inclusion. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/msmpeg4dec.c | 6 +----- libavcodec/wmv2dec.c | 4 +++- libavcodec/wmv2dec.h | 1 - 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/libavcodec/msmpeg4dec.c b/libavcodec/msmpeg4dec.c index 8e12e1aab2..bc554ed2eb 100644 --- a/libavcodec/msmpeg4dec.c +++ b/libavcodec/msmpeg4dec.c @@ -22,8 +22,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "config_components.h" - #include "libavutil/thread.h" #include "avcodec.h" @@ -38,7 +36,6 @@ #include "h263dec.h" #include "mpeg4videodec.h" #include "msmpeg4data.h" -#include "wmv2dec.h" #define DC_VLC_BITS 9 #define V2_INTRA_CBPC_VLC_BITS 3 @@ -391,8 +388,7 @@ av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx) s->decode_mb= msmpeg4v34_decode_mb; break; case 5: - if (CONFIG_WMV2_DECODER) - s->decode_mb= ff_wmv2_decode_mb; + break; case 6: //FIXME + TODO VC1 decode mb break; diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c index a70913134c..2daf6c70e8 100644 --- a/libavcodec/wmv2dec.c +++ b/libavcodec/wmv2dec.c @@ -445,7 +445,7 @@ static inline int wmv2_decode_inter_block(WMV2DecContext *w, int16_t *block, } } -int ff_wmv2_decode_mb(MpegEncContext *s, int16_t block[6][64]) +static int wmv2_decode_mb(MpegEncContext *s, int16_t block[6][64]) { /* The following is only allowed because this encoder * does not use slice threading. */ @@ -573,6 +573,8 @@ static av_cold int wmv2_decode_init(AVCodecContext *avctx) if ((ret = ff_msmpeg4_decode_init(avctx)) < 0) return ret; + s->decode_mb = wmv2_decode_mb; + ff_wmv2_common_init(s); return ff_intrax8_common_init(avctx, &w->x8, diff --git a/libavcodec/wmv2dec.h b/libavcodec/wmv2dec.h index cc410afe17..bc8745bf6f 100644 --- a/libavcodec/wmv2dec.h +++ b/libavcodec/wmv2dec.h @@ -23,7 +23,6 @@ #include "mpegvideo.h" -int ff_wmv2_decode_mb(MpegEncContext *s, int16_t block[6][64]); int ff_wmv2_decode_picture_header(MpegEncContext * s); int ff_wmv2_decode_secondary_picture_header(MpegEncContext * s); void ff_wmv2_add_mb(MpegEncContext *s, int16_t block[6][64], -- 2.34.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2022-10-26 2:02 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-10-24 2:21 [FFmpeg-devel] [PATCH 1/2] avcodec/mpegvideo: Don't initialize H264Chroma ctx unnecessarily Andreas Rheinhardt 2022-10-24 2:22 ` [FFmpeg-devel] [PATCH 2/2] configure: Remove unnecessary mpeg[12]video_enc->h263dsp dependencies Andreas Rheinhardt 2022-10-26 2:01 ` [FFmpeg-devel] [PATCH 3/7] avcodec/mpegvideo: Don't overallocate buffer Andreas Rheinhardt 2022-10-28 13:53 ` Andreas Rheinhardt 2022-10-26 2:01 ` [FFmpeg-devel] [PATCH 4/7] avcodec/mpegvideo: Allocate map and score_map buffers jointly Andreas Rheinhardt 2022-10-26 2:01 ` Andreas Rheinhardt [this message] 2022-10-26 2:01 ` [FFmpeg-devel] [PATCH 6/7] avcodec/mpegvideo: Remove always-false check Andreas Rheinhardt 2022-10-26 2:01 ` [FFmpeg-devel] [PATCH 7/7] avcodec/mpegvideo: Remove incorrect comment Andreas Rheinhardt 2022-10-26 23:33 ` [FFmpeg-devel] [PATCH 1/2] avcodec/mpegvideo: Don't initialize H264Chroma ctx unnecessarily Andreas Rheinhardt
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=AS8P250MB07448FB823D70622868AA2E18F309@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM \ --to=andreas.rheinhardt@outlook.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git