From: Anton Khirnov <anton@khirnov.net>
To: Ffmpeg Devel <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 00/72] Implement support for Vulkan multiplane images and video decoding
Date: Mon, 20 Feb 2023 17:56:55 +0100
Message-ID: <167691221542.10789.16978767634134261273@lain.khirnov.net> (raw)
In-Reply-To: <NOST85t--3-9@lynne.ee>
Quoting Lynne (2023-02-17 04:43:50)
> From 1279c6011c610fdb054cd9eea7a6f07c94f69f29 Mon Sep 17 00:00:00 2001
> From: Lynne <dev@lynne.ee>
> Date: Wed, 14 Dec 2022 00:09:08 +0100
> Subject: [PATCH 08/72] h264_ps: expose bit rate and CPB size fields
>
> ---
> libavcodec/h264_ps.c | 8 ++++----
> libavcodec/h264_ps.h | 4 ++++
> 2 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
> index d9df570718..fc8715876a 100644
> --- a/libavcodec/h264_ps.c
> +++ b/libavcodec/h264_ps.c
> @@ -113,12 +113,12 @@ static inline int decode_hrd_parameters(GetBitContext *gb, void *logctx,
> return AVERROR_INVALIDDATA;
> }
>
> - get_bits(gb, 4); /* bit_rate_scale */
> + sps->bit_rate_scale = get_bits(gb, 4);
> get_bits(gb, 4); /* cpb_size_scale */
> for (i = 0; i < cpb_count; i++) {
> - get_ue_golomb_long(gb); /* bit_rate_value_minus1 */
> - get_ue_golomb_long(gb); /* cpb_size_value_minus1 */
> - get_bits1(gb); /* cbr_flag */
> + sps->bit_rate_value[i] = get_ue_golomb_long(gb) + 1; /* bit_rate_value_minus1 + 1 */
> + sps->cpb_size_value[i] = get_ue_golomb_long(gb) + 1; /* cpb_size_value_minus1 + 1 */
> + sps->cpr_flag[i] = get_bits1(gb);
> }
> sps->initial_cpb_removal_delay_length = get_bits(gb, 5) + 1;
> sps->cpb_removal_delay_length = get_bits(gb, 5) + 1;
> diff --git a/libavcodec/h264_ps.h b/libavcodec/h264_ps.h
> index 906bab7214..03bd0227d6 100644
> --- a/libavcodec/h264_ps.h
> +++ b/libavcodec/h264_ps.h
> @@ -89,6 +89,10 @@ typedef struct SPS {
> int pic_struct_present_flag;
> int time_offset_length;
> int cpb_cnt; ///< See H.264 E.1.2
> + int bit_rate_scale;
> + uint32_t bit_rate_value[32]; ///< bit_rate_value_minus1 + 1
> + uint32_t cpb_size_value[32]; ///< cpb_size_value_minus1 + 1
> + uint8_t cpr_flag[32];
If only there was a way to store 32 flags in less than 32 bytes.
--
Anton Khirnov
_______________________________________________
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:[~2023-02-20 16:57 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 3:43 Lynne
2023-02-17 9:08 ` Jean-Baptiste Kempf
2023-02-17 9:45 ` Hendrik Leppkes
2023-02-17 10:45 ` Lynne
2023-02-17 11:04 ` Kieran Kunhya
[not found] ` <CAK+ULv780c=z_dig_FAhPJ2poZ8u2_QOnnPUmV3SSiYoaQZ+tw@mail.gmail.com-NOU29aV----9>
2023-02-17 11:52 ` Lynne
2023-02-17 15:45 ` Michael Niedermayer
2023-02-17 16:35 ` Lynne
2023-02-18 19:02 ` Michael Niedermayer
2023-02-19 0:08 ` Lynne
2023-02-19 15:40 ` Michael Niedermayer
2023-02-19 15:44 ` Kieran Kunhya
2023-02-19 16:53 ` Lynne
2023-02-19 16:56 ` Jean-Baptiste Kempf
2023-02-19 16:58 ` Lynne
2023-02-19 17:02 ` Jean-Baptiste Kempf
2023-02-19 19:32 ` Niklas Haas
2023-02-19 18:50 ` Michael Niedermayer
2023-02-19 19:02 ` Lynne
2023-02-19 19:44 ` Michael Niedermayer
2023-02-19 20:00 ` Lynne
2023-02-19 20:14 ` Michael Niedermayer
[not found] ` <NOea74V--3-9@lynne.ee-NOeaB9K--R-9>
2023-02-19 16:57 ` Lynne
2023-02-19 17:36 ` Kieran Kunhya
2023-02-19 17:42 ` Kieran Kunhya
2023-02-19 18:46 ` Lynne
2023-02-19 21:59 ` Kieran Kunhya
2023-02-19 23:50 ` Neal Gompa
2023-02-20 5:13 ` Jean-Baptiste Kempf
2023-02-20 9:18 ` Hendrik Leppkes
2023-02-20 16:51 ` Anton Khirnov
2023-02-20 16:56 ` Anton Khirnov [this message]
2023-02-20 17:21 ` Anton Khirnov
2023-02-20 17:40 ` Anton Khirnov
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=167691221542.10789.16978767634134261273@lain.khirnov.net \
--to=anton@khirnov.net \
--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