From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 1/9] avcodec/dvdata: Order code table by codes
Date: Tue, 6 Sep 2022 03:33:52 +0200
Message-ID: <GV1P250MB0737A2C2283945D6B48C869E8F7E9@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <AS8P250MB07446C8541237B01350DEAB78F7C9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM>
Andreas Rheinhardt:
> Right now, it is nearly ordered by "left codes in the tree first";
> the only exception is the escape value which has been put at the
> end. This commit moves it to the place it should have according
> to the above order. This is in preparation for further commits.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
> libavcodec/dv_tablegen.h | 2 +-
> libavcodec/dvdata.c | 12 ++++--------
> 2 files changed, 5 insertions(+), 9 deletions(-)
>
> diff --git a/libavcodec/dv_tablegen.h b/libavcodec/dv_tablegen.h
> index 941b5572be..0dcfffc140 100644
> --- a/libavcodec/dv_tablegen.h
> +++ b/libavcodec/dv_tablegen.h
> @@ -51,7 +51,7 @@ static struct dv_vlc_pair dv_vlc_map[DV_VLC_MAP_RUN_SIZE][DV_VLC_MAP_LEV_SIZE];
> static av_cold void dv_vlc_map_tableinit(void)
> {
> int i, j;
> - for (i = 0; i < NB_DV_VLC - 1; i++) {
> + for (int i = 0; i < NB_DV_VLC; i++) {
> if (ff_dv_vlc_run[i] >= DV_VLC_MAP_RUN_SIZE)
> continue;
> #if CONFIG_SMALL
> diff --git a/libavcodec/dvdata.c b/libavcodec/dvdata.c
> index 231569a328..1e48db591d 100644
> --- a/libavcodec/dvdata.c
> +++ b/libavcodec/dvdata.c
> @@ -75,7 +75,7 @@ const uint8_t ff_dv_quant_offset[4] = { 6, 3, 0, 1 };
> * when building misc. tables. E.g. (1, 0) can be either 0x7cf or 0x1f82.
> */
> const uint16_t ff_dv_vlc_bits[NB_DV_VLC] = {
> - 0x0000, 0x0002, 0x0007, 0x0008, 0x0009, 0x0014, 0x0015, 0x0016,
> + 0x0000, 0x0002, 0x0006, 0x0007, 0x0008, 0x0009, 0x0014, 0x0015, 0x0016,
> 0x0017, 0x0030, 0x0031, 0x0032, 0x0033, 0x0068, 0x0069, 0x006a,
> 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, 0x00e0, 0x00e1, 0x00e2,
> 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, 0x00e8, 0x00e9, 0x00ea,
> @@ -126,11 +126,10 @@ const uint16_t ff_dv_vlc_bits[NB_DV_VLC] = {
> 0x7fe8, 0x7fe9, 0x7fea, 0x7feb, 0x7fec, 0x7fed, 0x7fee, 0x7fef,
> 0x7ff0, 0x7ff1, 0x7ff2, 0x7ff3, 0x7ff4, 0x7ff5, 0x7ff6, 0x7ff7,
> 0x7ff8, 0x7ff9, 0x7ffa, 0x7ffb, 0x7ffc, 0x7ffd, 0x7ffe, 0x7fff,
> - 0x0006,
> };
>
> const uint8_t ff_dv_vlc_len[NB_DV_VLC] = {
> - 2, 3, 4, 4, 4, 5, 5, 5,
> + 2, 3, 4, 4, 4, 4, 5, 5, 5,
> 5, 6, 6, 6, 6, 7, 7, 7,
> 7, 7, 7, 7, 7, 8, 8, 8,
> 8, 8, 8, 8, 8, 8, 8, 8,
> @@ -181,11 +180,10 @@ const uint8_t ff_dv_vlc_len[NB_DV_VLC] = {
> 15, 15, 15, 15, 15, 15, 15, 15,
> 15, 15, 15, 15, 15, 15, 15, 15,
> 15, 15, 15, 15, 15, 15, 15, 15,
> - 4,
> };
>
> const uint8_t ff_dv_vlc_run[NB_DV_VLC] = {
> - 0, 0, 1, 0, 0, 2, 1, 0,
> + 0, 0, 127, 1, 0, 0, 2, 1, 0,
> 0, 3, 4, 0, 0, 5, 6, 2,
> 1, 1, 0, 0, 0, 7, 8, 9,
> 10, 3, 4, 2, 1, 1, 1, 0,
> @@ -236,11 +234,10 @@ const uint8_t ff_dv_vlc_run[NB_DV_VLC] = {
> 0, 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0, 0, 0, 0, 0, 0,
> - 127,
> };
>
> const uint8_t ff_dv_vlc_level[NB_DV_VLC] = {
> - 1, 2, 1, 3, 4, 1, 2, 5,
> + 1, 2, 0, 1, 3, 4, 1, 2, 5,
> 6, 1, 1, 7, 8, 1, 1, 2,
> 3, 4, 9, 10, 11, 1, 1, 1,
> 1, 2, 2, 3, 5, 6, 7, 12,
> @@ -291,5 +288,4 @@ const uint8_t ff_dv_vlc_level[NB_DV_VLC] = {
> 232, 233, 234, 235, 236, 237, 238, 239,
> 240, 241, 242, 243, 244, 245, 246, 247,
> 248, 249, 250, 251, 252, 253, 254, 255,
> - 0,
> };
Will apply this 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-09-06 1:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-04 21:54 Andreas Rheinhardt
2022-09-04 21:58 ` [FFmpeg-devel] [PATCH 2/9] avcodec/dvdec: Use ff_init_vlc_from_lengths() Andreas Rheinhardt
2022-09-04 21:58 ` [FFmpeg-devel] [PATCH 3/9] avcodec/dv_tablegen, dvdata: Remove ff_dv_vlc_bits Andreas Rheinhardt
2022-09-04 21:58 ` [FFmpeg-devel] [PATCH 4/9] avcodec/dvdec: Mark dv_init_static() as av_cold Andreas Rheinhardt
2022-09-04 21:58 ` [FFmpeg-devel] [PATCH 5/9] avcodec/dvdec: Avoid stack buffers Andreas Rheinhardt
2022-09-04 21:58 ` [FFmpeg-devel] [PATCH 6/9] avcodec/wmavoice: Avoid code table Andreas Rheinhardt
2022-09-04 21:58 ` [FFmpeg-devel] [PATCH 7/9] avcodec/wmaprodec: Use ff_init_vlc_from_lengths() instead of init_vlc Andreas Rheinhardt
2022-09-04 21:58 ` [FFmpeg-devel] [PATCH 8/9] avcodec/wmaprodec: Move applying offset to VLC creation Andreas Rheinhardt
2022-09-04 21:58 ` [FFmpeg-devel] [PATCH 9/9] avcodec/wmaprodec: Use symbol table more efficiently Andreas Rheinhardt
2022-09-06 1:33 ` 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=GV1P250MB0737A2C2283945D6B48C869E8F7E9@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