From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 1/5] avcodec/mpeg12vlc: Move MPEG-1/2 RL VLCs to it
Date: Mon, 3 Oct 2022 01:08:44 +0200
Message-ID: <GV1P250MB0737D55A14C5F15F3FDC24C68F589@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <GV1P250MB073772618F63A1D0EF71233E8F569@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM>
Andreas Rheinhardt:
> It is better place for these declarations than
> mpeg12data.h as RL VLC are just a variant of VLCs.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
> libavcodec/mpeg12data.c | 1 +
> libavcodec/mpeg12data.h | 4 ----
> libavcodec/mpeg12dec.h | 10 ----------
> libavcodec/mpeg12enc.c | 1 +
> libavcodec/mpeg12enc.h | 3 ---
> libavcodec/mpeg12vlc.h | 15 +++++++++++++++
> libavcodec/speedhq.c | 2 +-
> libavcodec/speedhqenc.c | 2 +-
> 8 files changed, 19 insertions(+), 19 deletions(-)
>
> diff --git a/libavcodec/mpeg12data.c b/libavcodec/mpeg12data.c
> index 4da96d7da3..e301310b9f 100644
> --- a/libavcodec/mpeg12data.c
> +++ b/libavcodec/mpeg12data.c
> @@ -26,6 +26,7 @@
> */
>
> #include "mpeg12data.h"
> +#include "mpeg12vlc.h"
>
> const uint16_t ff_mpeg1_default_intra_matrix[256] = {
> 8, 16, 19, 22, 26, 27, 29, 34,
> diff --git a/libavcodec/mpeg12data.h b/libavcodec/mpeg12data.h
> index f51faf4607..bc39655fbf 100644
> --- a/libavcodec/mpeg12data.h
> +++ b/libavcodec/mpeg12data.h
> @@ -30,7 +30,6 @@
>
> #include <stdint.h>
> #include "libavutil/rational.h"
> -#include "rl.h"
>
> extern const uint16_t ff_mpeg1_default_intra_matrix[];
> extern const uint16_t ff_mpeg1_default_non_intra_matrix[64];
> @@ -40,9 +39,6 @@ extern const unsigned char ff_mpeg12_vlc_dc_lum_bits[12];
> extern const uint16_t ff_mpeg12_vlc_dc_chroma_code[12];
> extern const unsigned char ff_mpeg12_vlc_dc_chroma_bits[12];
>
> -extern RLTable ff_rl_mpeg1;
> -extern RLTable ff_rl_mpeg2;
> -
> extern const uint8_t ff_mpeg12_mbAddrIncrTable[36][2];
> extern const uint8_t ff_mpeg12_mbPatTable[64][2];
>
> diff --git a/libavcodec/mpeg12dec.h b/libavcodec/mpeg12dec.h
> index b4e94a92ce..4c015d3096 100644
> --- a/libavcodec/mpeg12dec.h
> +++ b/libavcodec/mpeg12dec.h
> @@ -24,16 +24,6 @@
>
> #include "get_bits.h"
> #include "mpeg12vlc.h"
> -#include "rl.h"
> -
> -#define INIT_2D_VLC_RL(rl, static_size, flags)\
> -{\
> - static RL_VLC_ELEM rl_vlc_table[static_size];\
> - rl.rl_vlc[0] = rl_vlc_table;\
> - ff_init_2d_vlc_rl(&rl, static_size, flags);\
> -}
> -
> -void ff_init_2d_vlc_rl(RLTable *rl, unsigned static_size, int flags);
>
> static inline int decode_dc(GetBitContext *gb, int component)
> {
> diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
> index e1f09b7ede..f636afe42d 100644
> --- a/libavcodec/mpeg12enc.c
> +++ b/libavcodec/mpeg12enc.c
> @@ -43,6 +43,7 @@
> #include "mpeg12.h"
> #include "mpeg12data.h"
> #include "mpeg12enc.h"
> +#include "mpeg12vlc.h"
> #include "mpegutils.h"
> #include "mpegvideo.h"
> #include "mpegvideoenc.h"
> diff --git a/libavcodec/mpeg12enc.h b/libavcodec/mpeg12enc.h
> index fbbc43f891..0455e5e4e2 100644
> --- a/libavcodec/mpeg12enc.h
> +++ b/libavcodec/mpeg12enc.h
> @@ -25,9 +25,6 @@
> #include <stdint.h>
>
> #include "mpegvideo.h"
> -#include "rl.h"
> -
> -void ff_mpeg1_init_uni_ac_vlc(const RLTable *rl, uint8_t *uni_ac_vlc_len);
>
> void ff_mpeg1_encode_picture_header(MpegEncContext *s, int picture_number);
> void ff_mpeg1_encode_mb(MpegEncContext *s, int16_t block[8][64],
> diff --git a/libavcodec/mpeg12vlc.h b/libavcodec/mpeg12vlc.h
> index 70aca645cb..4fb19371f0 100644
> --- a/libavcodec/mpeg12vlc.h
> +++ b/libavcodec/mpeg12vlc.h
> @@ -28,6 +28,7 @@
> #ifndef AVCODEC_MPEG12VLC_H
> #define AVCODEC_MPEG12VLC_H
>
> +#include "rl.h"
> #include "vlc.h"
>
> #define DC_VLC_BITS 9
> @@ -49,4 +50,18 @@ extern VLC ff_mv_vlc;
>
> void ff_mpeg12_init_vlcs(void);
>
> +#define INIT_2D_VLC_RL(rl, static_size, flags)\
> +{\
> + static RL_VLC_ELEM rl_vlc_table[static_size];\
> + rl.rl_vlc[0] = rl_vlc_table;\
> + ff_init_2d_vlc_rl(&rl, static_size, flags);\
> +}
> +
> +extern RLTable ff_rl_mpeg1;
> +extern RLTable ff_rl_mpeg2;
> +
> +void ff_init_2d_vlc_rl(RLTable *rl, unsigned static_size, int flags);
> +
> +void ff_mpeg1_init_uni_ac_vlc(const RLTable *rl, uint8_t *uni_ac_vlc_len);
> +
> #endif /* AVCODEC_MPEG12VLC_H */
> diff --git a/libavcodec/speedhq.c b/libavcodec/speedhq.c
> index 11d3311794..6dbba02776 100644
> --- a/libavcodec/speedhq.c
> +++ b/libavcodec/speedhq.c
> @@ -38,9 +38,9 @@
> #include "idctdsp.h"
> #include "libavutil/thread.h"
> #include "mathops.h"
> -#include "mpeg12dec.h"
> #include "mpeg12data.h"
> #include "mpeg12vlc.h"
> +#include "rl.h"
>
> #define MAX_INDEX (64 - 1)
>
> diff --git a/libavcodec/speedhqenc.c b/libavcodec/speedhqenc.c
> index 747ed679bd..4a009bd070 100644
> --- a/libavcodec/speedhqenc.c
> +++ b/libavcodec/speedhqenc.c
> @@ -34,7 +34,7 @@
> #include "avcodec.h"
> #include "codec_internal.h"
> #include "mpeg12data.h"
> -#include "mpeg12enc.h"
> +#include "mpeg12vlc.h"
> #include "mpegvideo.h"
> #include "mpegvideoenc.h"
> #include "speedhqenc.h"
Will apply this patchset tomorrow unless there are objections.
- Andreas
_______________________________________________
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".
prev parent reply other threads:[~2022-10-02 23:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-30 2:17 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 ` [FFmpeg-devel] [PATCH 3/5] avcodec/mpeg12: Inline ff_mpeg12_common_init() into mpeg12enc.c Andreas Rheinhardt
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 ` Andreas Rheinhardt [this message]
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=GV1P250MB0737D55A14C5F15F3FDC24C68F589@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