Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Anton Khirnov <anton@khirnov.net>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: Niklas Haas <git@haasn.dev>
Subject: Re: [FFmpeg-devel] [PATCH v5 1/6] lavu/frame: Add Dolby Vision metadata side data type
Date: Mon, 20 Dec 2021 11:02:36 +0100
Message-ID: <163999455620.13029.4664456819716811959@lain.red.khirnov.net> (raw)
In-Reply-To: <20211212115546.119662-1-ffmpeg@haasn.xyz>

Quoting Niklas Haas (2021-12-12 12:55:41)
> From: Niklas Haas <git@haasn.dev>
> 
> Signed-off-by: Niklas Haas <git@haasn.dev>
> ---
>  doc/APIchanges        |   3 +
>  libavutil/dovi_meta.c |  12 ++++
>  libavutil/dovi_meta.h | 132 ++++++++++++++++++++++++++++++++++++++++++
>  libavutil/frame.c     |   1 +
>  libavutil/frame.h     |   9 ++-
>  libavutil/version.h   |   2 +-
>  6 files changed, 157 insertions(+), 2 deletions(-)
> 
> diff --git a/doc/APIchanges b/doc/APIchanges
> index 17aa664ca3..0ddde40bdf 100644
> --- a/doc/APIchanges
> +++ b/doc/APIchanges
> @@ -14,6 +14,9 @@ libavutil:     2021-04-27
>  
>  API changes, most recent first:
>  
> +2021-12-xx - xxxxxxxxxx - lavu 57.12.100 - frame.h
> +  Add AV_FRAME_DATA_DOVI_RESHAPING.

Doesn't match the actual name.

> +
>  2021-12-xx - xxxxxxxxxx - lavf 59.10.100 - avformat.h
>    Add AVFormatContext io_close2 which returns an int
>  
> diff --git a/libavutil/dovi_meta.c b/libavutil/dovi_meta.c
> index 7bd08f6c54..60b4cb2376 100644
> --- a/libavutil/dovi_meta.c
> +++ b/libavutil/dovi_meta.c
> @@ -33,3 +33,15 @@ AVDOVIDecoderConfigurationRecord *av_dovi_alloc(size_t *size)
>  
>      return dovi;
>  }
> +
> +AVDOVIMetadata *av_dovi_metadata_alloc(size_t *size)
> +{
> +    AVDOVIMetadata *dovi = av_mallocz(sizeof(AVDOVIMetadata));
> +    if (!dovi)
> +        return NULL;
> +
> +    if (size)
> +        *size = sizeof(*dovi);
> +
> +    return dovi;
> +}
> diff --git a/libavutil/dovi_meta.h b/libavutil/dovi_meta.h
> index 299911d434..20efd41676 100644
> --- a/libavutil/dovi_meta.h
> +++ b/libavutil/dovi_meta.h
> @@ -29,6 +29,7 @@
>  
>  #include <stdint.h>
>  #include <stddef.h>
> +#include "rational.h"
>  
>  /*
>   * DOVI configuration
> @@ -67,4 +68,135 @@ typedef struct AVDOVIDecoderConfigurationRecord {
>   */
>  AVDOVIDecoderConfigurationRecord *av_dovi_alloc(size_t *size);
>  
> +/**
> + * Dolby Vision RPU data header.
> + */
> +typedef struct AVDOVIRpuDataHeader {
> +    uint8_t rpu_type;
> +    uint16_t rpu_format;
> +    uint8_t vdr_rpu_profile;
> +    uint8_t vdr_rpu_level;
> +    int chroma_resampling_explicit_filter_flag;

Why are flags ints, while other things can be uint8_t?

> +
> +/**
> + * Combined struct representing a combination of header, mapping and color
> + * metadata, for attaching to frames as side data.
> + *
> + * @note The struct must be allocated with av_dovi_metadata_alloc() and
> + *       its size is not a part of the public ABI.

Maybe mention that the individual structs (header, mapping, color)
CANNOT be extended without a major bump.

> + */
> +
> +typedef struct AVDOVIMetadata {
> +    AVDOVIRpuDataHeader header;
> +    AVDOVIDataMapping mapping;
> +    AVDOVIColorMetadata color;
> +} AVDOVIMetadata;
> +
> +/**
> + * Allocate an AVDOVIMetadata structure and initialize its
> + * fields to default values.

+ * @param size If this parameter is non-NULL, the size in bytes of the
                allocated struct will be written here on success

-- 
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".

  parent reply	other threads:[~2021-12-20 10:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20211212115546.119662-1-ffmpeg@haasn.xyz>
     [not found] ` <CA+anqdwT+O2B2859vqyT3Or92bYHGXEQp9NgaC0C4b3Pb6m1bw@mail.gmail.com>
2021-12-15 14:19   ` Derek Buitenhuis
2021-12-18 18:34   ` Hendrik Leppkes
2021-12-20  9:53 ` Anton Khirnov
2021-12-20 10:02 ` Anton Khirnov [this message]
     [not found] ` <20211212115546.119662-4-ffmpeg@haasn.xyz>
2021-12-20 10:13   ` [FFmpeg-devel] [PATCH v5 4/6] lavc: Implement Dolby Vision RPU parsing Anton Khirnov
2021-12-20 14:47     ` Niklas Haas
2021-12-20 14:55       ` 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=163999455620.13029.4664456819716811959@lain.red.khirnov.net \
    --to=anton@khirnov.net \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=git@haasn.dev \
    /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