Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Damiano Galassi <damiog@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Damiano Galassi <damiog@gmail.com>
Subject: [FFmpeg-devel] [PATCH 1/2] avcodec: add ambient viewing environment packet side data.
Date: Tue, 11 Jul 2023 09:41:25 +0200
Message-ID: <20230711074126.95328-1-damiog@gmail.com> (raw)

---
 fftools/ffprobe.c     | 3 +++
 libavcodec/avpacket.c | 1 +
 libavcodec/decode.c   | 1 +
 libavcodec/packet.h   | 7 +++++++
 4 files changed, 12 insertions(+)

diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
index 1ff76ce809..9f17567897 100644
--- a/fftools/ffprobe.c
+++ b/fftools/ffprobe.c
@@ -2360,6 +2360,9 @@ static void print_pkt_side_data(WriterContext *w,
             AVContentLightMetadata *metadata = (AVContentLightMetadata *)sd->data;
             print_int("max_content", metadata->MaxCLL);
             print_int("max_average", metadata->MaxFALL);
+        } else if (sd->type == AV_PKT_DATA_AMBIENT_VIEWING_ENVIRONMENT) {
+            print_ambient_viewing_environment(
+                w, (const AVAmbientViewingEnvironment *)sd->data);
         } else if (sd->type == AV_PKT_DATA_DYNAMIC_HDR10_PLUS) {
             AVDynamicHDRPlus *metadata = (AVDynamicHDRPlus *)sd->data;
             print_dynamic_hdr10_plus(w, metadata);
diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c
index 5fef65e97a..db9c0c95e8 100644
--- a/libavcodec/avpacket.c
+++ b/libavcodec/avpacket.c
@@ -300,6 +300,7 @@ const char *av_packet_side_data_name(enum AVPacketSideDataType type)
     case AV_PKT_DATA_DOVI_CONF:                  return "DOVI configuration record";
     case AV_PKT_DATA_S12M_TIMECODE:              return "SMPTE ST 12-1:2014 timecode";
     case AV_PKT_DATA_DYNAMIC_HDR10_PLUS:         return "HDR10+ Dynamic Metadata (SMPTE 2094-40)";
+    case AV_PKT_DATA_AMBIENT_VIEWING_ENVIRONMENT:return "Ambient viewing environment";
     }
     return NULL;
 }
diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index a47abeca06..d8ba94d363 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -1374,6 +1374,7 @@ int ff_decode_frame_props_from_pkt(const AVCodecContext *avctx,
         { AV_PKT_DATA_ICC_PROFILE,                AV_FRAME_DATA_ICC_PROFILE },
         { AV_PKT_DATA_S12M_TIMECODE,              AV_FRAME_DATA_S12M_TIMECODE },
         { AV_PKT_DATA_DYNAMIC_HDR10_PLUS,         AV_FRAME_DATA_DYNAMIC_HDR_PLUS },
+        { AV_PKT_DATA_AMBIENT_VIEWING_ENVIRONMENT,AV_FRAME_DATA_AMBIENT_VIEWING_ENVIRONMENT },
     };
 
     frame->pts          = pkt->pts;
diff --git a/libavcodec/packet.h b/libavcodec/packet.h
index f28e7e7011..199baad763 100644
--- a/libavcodec/packet.h
+++ b/libavcodec/packet.h
@@ -299,6 +299,13 @@ enum AVPacketSideDataType {
      */
     AV_PKT_DATA_DYNAMIC_HDR10_PLUS,
 
+    /**
+     * Ambient viewing environment metadata, as defined by H.274.. This metadata
+     * should be associated with a video stream and contains data in the form
+     * of the AVAmbientViewingEnvironment struct.
+     */
+    AV_PKT_DATA_AMBIENT_VIEWING_ENVIRONMENT,
+
     /**
      * The number of side data types.
      * This is not part of the public API/ABI in the sense that it may
-- 
2.39.2 (Apple Git-143)

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

             reply	other threads:[~2023-07-11  7:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-11  7:41 Damiano Galassi [this message]
2023-07-11  7:41 ` [FFmpeg-devel] [PATCH 2/2] avformat/mov: add support for 'amve' ambient viewing environment box. As defined in ISOBMFF (ISO/IEC 14496-12) document Damiano Galassi
2023-07-11 16:53   ` James Almer
2023-07-15 10:30     ` Damiano Galassi
2023-07-11 16:45 ` [FFmpeg-devel] [PATCH 1/2] avcodec: add ambient viewing environment packet side data Anton Khirnov
2023-07-15 10:31   ` Damiano Galassi

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=20230711074126.95328-1-damiog@gmail.com \
    --to=damiog@gmail.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