From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Subject: [FFmpeg-devel] [PATCH 3/5] avcodec/mpeg12: Inline ff_mpeg12_common_init() into mpeg12enc.c
Date: Fri, 30 Sep 2022 04:18:52 +0200
Message-ID: <GV1P250MB0737943821C0157073B8CC458F569@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <GV1P250MB073772618F63A1D0EF71233E8F569@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavcodec/mpeg12.c | 9 ---------
libavcodec/mpeg12.h | 2 --
libavcodec/mpeg12enc.c | 4 +++-
3 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index d78e25a777..7f2aaea7c0 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -36,7 +36,6 @@
#include "mpeg12.h"
#include "mpeg12data.h"
#include "mpeg12dec.h"
-#include "mpegvideodata.h"
#include "startcode.h"
static const uint8_t table_mb_ptype[7][2] = {
@@ -100,14 +99,6 @@ av_cold void ff_init_2d_vlc_rl(RLTable *rl, unsigned static_size, int flags)
}
}
-av_cold void ff_mpeg12_common_init(MpegEncContext *s)
-{
-
- s->y_dc_scale_table =
- s->c_dc_scale_table = ff_mpeg2_dc_scale_table[s->intra_dc_precision];
-
-}
-
void ff_mpeg1_clean_buffers(MpegEncContext *s)
{
s->last_dc[0] = 1 << (7 + s->intra_dc_precision);
diff --git a/libavcodec/mpeg12.h b/libavcodec/mpeg12.h
index e0406b32d9..b323728a33 100644
--- a/libavcodec/mpeg12.h
+++ b/libavcodec/mpeg12.h
@@ -34,8 +34,6 @@
#define EXT_START_CODE 0x000001b5
#define USER_START_CODE 0x000001b2
-void ff_mpeg12_common_init(MpegEncContext *s);
-
void ff_mpeg1_clean_buffers(MpegEncContext *s);
#if FF_API_FLAG_TRUNCATED
int ff_mpeg1_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size, AVCodecParserContext *s);
diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
index f636afe42d..01cfd1c1fa 100644
--- a/libavcodec/mpeg12enc.c
+++ b/libavcodec/mpeg12enc.c
@@ -46,6 +46,7 @@
#include "mpeg12vlc.h"
#include "mpegutils.h"
#include "mpegvideo.h"
+#include "mpegvideodata.h"
#include "mpegvideoenc.h"
#include "profiles.h"
@@ -1133,7 +1134,8 @@ av_cold void ff_mpeg1_encode_init(MpegEncContext *s)
{
static AVOnce init_static_once = AV_ONCE_INIT;
- ff_mpeg12_common_init(s);
+ s->y_dc_scale_table =
+ s->c_dc_scale_table = ff_mpeg2_dc_scale_table[s->intra_dc_precision];
s->me.mv_penalty = mv_penalty;
s->fcode_tab = fcode_tab;
--
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-09-30 2:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-30 2:17 [FFmpeg-devel] [PATCH 1/5] avcodec/mpeg12vlc: Move MPEG-1/2 RL VLCs to it Andreas Rheinhardt
2022-09-30 2:18 ` [FFmpeg-devel] [PATCH 2/5] avcodec/mpeg12dec: Don't call ff_mpeg12_common_init() Andreas Rheinhardt
2022-09-30 2:18 ` Andreas Rheinhardt [this message]
2022-09-30 2:18 ` [FFmpeg-devel] [PATCH 4/5] configure, avcodec/Makefile: Remove obsolete mpegvideo dependencies Andreas Rheinhardt
2022-09-30 2:18 ` [FFmpeg-devel] [PATCH 5/5] avcodec/mpeg12: Move ff_mpeg1_clean_buffers decl to a new header Andreas Rheinhardt
2022-10-02 23:08 ` [FFmpeg-devel] [PATCH 1/5] avcodec/mpeg12vlc: Move MPEG-1/2 RL VLCs to it 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=GV1P250MB0737943821C0157073B8CC458F569@GV1P250MB0737.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