[FFmpeg-devel] [PATCH v2 2/4] avcodec: add support for hevc ambient viewing environment SEI message

Michael Niedermayer michael at niedermayer.cc
Mon Mar 28 17:30:49 EEST 2022


On Mon, Mar 28, 2022 at 08:41:09PM +0800, lance.lmwang at gmail.com wrote:
> From: Limin Wang <lance.lmwang at gmail.com>
> 
> Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> ---
>  libavcodec/hevc_sei.c      | 19 +++++++++++++++++++
>  libavcodec/hevc_sei.h      |  8 ++++++++
>  libavcodec/hevcdec.c       | 10 ++++++++++
>  tests/ref/fate/hevc-dv-rpu |  6 ++++++
>  4 files changed, 43 insertions(+)
> 
> diff --git a/libavcodec/hevc_sei.c b/libavcodec/hevc_sei.c
> index ec3036f..d94df4e 100644
> --- a/libavcodec/hevc_sei.c
> +++ b/libavcodec/hevc_sei.c
> @@ -497,6 +497,23 @@ static int decode_film_grain_characteristics(HEVCSEIFilmGrainCharacteristics *h,
>      return 0;
>  }
>  
> +static int decode_ambient_viewing_env(HEVCSEIAmbientViewingEnvironment *s, GetBitContext *gb, int size)
> +{
> +    if (size < 8)
> +        return AVERROR_INVALIDDATA;
> +
> +    s->ambient_illuminance  = get_bits(gb, 32);

get_bits_long

thx

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20220328/6e5decee/attachment.sig>


More information about the ffmpeg-devel mailing list