forked from HandBrake/HandBrake
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
contrib: update FFmpeg to version 6.1.
- Loading branch information
Showing
5 changed files
with
57 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
From ef33c5bd72846c5c93662a3e6a75c4f3273f0a35 Mon Sep 17 00:00:00 2001 | ||
From d0f915c761cfba6ae46d20fa9b995311ef0f0727 Mon Sep 17 00:00:00 2001 | ||
From: Damiano Galassi <[email protected]> | ||
Date: Tue, 11 Jul 2023 07:38:26 +0200 | ||
Date: Fri, 3 Nov 2023 13:43:50 +0100 | ||
Subject: [PATCH 1/2] avcodec: add ambient viewing environment packet side | ||
data. | ||
|
||
|
@@ -12,10 +12,10 @@ Subject: [PATCH 1/2] avcodec: add ambient viewing environment packet side | |
4 files changed, 12 insertions(+) | ||
|
||
diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c | ||
index 4fcfe1164b..5663a12dc4 100644 | ||
index 71f6cc3a74..58b07ac20c 100644 | ||
--- a/fftools/ffprobe.c | ||
+++ b/fftools/ffprobe.c | ||
@@ -2349,6 +2349,9 @@ static void print_pkt_side_data(WriterContext *w, | ||
@@ -2392,6 +2392,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); | ||
|
@@ -26,10 +26,10 @@ index 4fcfe1164b..5663a12dc4 100644 | |
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 | ||
index e29725c2d2..9f3e9d7d7c 100644 | ||
--- a/libavcodec/avpacket.c | ||
+++ b/libavcodec/avpacket.c | ||
@@ -300,6 +300,7 @@ const char *av_packet_side_data_name(enum AVPacketSideDataType type) | ||
@@ -301,6 +301,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)"; | ||
|
@@ -38,19 +38,19 @@ index 5fef65e97a..db9c0c95e8 100644 | |
return NULL; | ||
} | ||
diff --git a/libavcodec/decode.c b/libavcodec/decode.c | ||
index 7eada8e9ab..e58b462272 100644 | ||
index ad39021354..6049fbb2dd 100644 | ||
--- a/libavcodec/decode.c | ||
+++ b/libavcodec/decode.c | ||
@@ -1428,6 +1428,7 @@ int ff_decode_frame_props_from_pkt(const AVCodecContext *avctx, | ||
{ 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_SKIP_SAMPLES, AV_FRAME_DATA_SKIP_SAMPLES }, | ||
+ { AV_PKT_DATA_AMBIENT_VIEWING_ENVIRONMENT,AV_FRAME_DATA_AMBIENT_VIEWING_ENVIRONMENT }, | ||
}; | ||
@@ -1434,6 +1434,7 @@ static const struct { | ||
{ AV_PKT_DATA_CONTENT_LIGHT_LEVEL, AV_FRAME_DATA_CONTENT_LIGHT_LEVEL }, | ||
{ AV_PKT_DATA_ICC_PROFILE, AV_FRAME_DATA_ICC_PROFILE }, | ||
{ 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; | ||
int ff_decode_frame_props_from_pkt(const AVCodecContext *avctx, | ||
diff --git a/libavcodec/packet.h b/libavcodec/packet.h | ||
index f28e7e7011..199baad763 100644 | ||
index b19409b719..f5e0751497 100644 | ||
--- a/libavcodec/packet.h | ||
+++ b/libavcodec/packet.h | ||
@@ -299,6 +299,13 @@ enum AVPacketSideDataType { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
From 39152a8730363c6eca43b5e0f006165d7c138a64 Mon Sep 17 00:00:00 2001 | ||
From bd3e5a9d0a3e5e909881b2ced8e0824d3d2bb01a Mon Sep 17 00:00:00 2001 | ||
From: Damiano Galassi <[email protected]> | ||
Date: Tue, 11 Jul 2023 07:39:06 +0200 | ||
Date: Fri, 3 Nov 2023 13:46:20 +0100 | ||
Subject: [PATCH 2/2] avformat/mov: add support for 'amve' ambient viewing | ||
environment box. As defined in ISOBMFF (ISO/IEC 14496-12) document. | ||
|
||
--- | ||
libavformat/dump.c | 15 +++++++++++++++ | ||
libavformat/isom.h | 3 +++ | ||
libavformat/mov.c | 36 ++++++++++++++++++++++++++++++++++++ | ||
libavformat/mov.c | 35 +++++++++++++++++++++++++++++++++++ | ||
libavformat/movenc.c | 22 ++++++++++++++++++++++ | ||
4 files changed, 76 insertions(+) | ||
4 files changed, 75 insertions(+) | ||
|
||
diff --git a/libavformat/dump.c b/libavformat/dump.c | ||
index d31e4c2ec6..88dc9dd89c 100644 | ||
index c0868a1bb3..1058829cc7 100644 | ||
--- a/libavformat/dump.c | ||
+++ b/libavformat/dump.c | ||
@@ -27,6 +27,7 @@ | ||
|
@@ -52,7 +52,7 @@ index d31e4c2ec6..88dc9dd89c 100644 | |
av_log(ctx, AV_LOG_INFO, "unknown side data type %d " | ||
"(%"SIZE_SPECIFIER" bytes)", sd->type, sd->size); | ||
diff --git a/libavformat/isom.h b/libavformat/isom.h | ||
index 4b1cd42f0f..e24dfb3dd0 100644 | ||
index 3d375d7a46..46247b0ec7 100644 | ||
--- a/libavformat/isom.h | ||
+++ b/libavformat/isom.h | ||
@@ -29,6 +29,7 @@ | ||
|
@@ -73,10 +73,10 @@ index 4b1cd42f0f..e24dfb3dd0 100644 | |
uint32_t format; | ||
|
||
diff --git a/libavformat/mov.c b/libavformat/mov.c | ||
index be9975f297..ac193ff021 100644 | ||
index 2f29487beb..270b306711 100644 | ||
--- a/libavformat/mov.c | ||
+++ b/libavformat/mov.c | ||
@@ -6017,6 +6017,31 @@ static int mov_read_clli(MOVContext *c, AVIOContext *pb, MOVAtom atom) | ||
@@ -6030,6 +6030,31 @@ static int mov_read_clli(MOVContext *c, AVIOContext *pb, MOVAtom atom) | ||
return 0; | ||
} | ||
|
||
|
@@ -108,43 +108,42 @@ index be9975f297..ac193ff021 100644 | |
static int mov_read_st3d(MOVContext *c, AVIOContext *pb, MOVAtom atom) | ||
{ | ||
AVStream *st; | ||
@@ -7928,6 +7953,7 @@ static const MOVParseTableEntry mov_default_parse_table[] = { | ||
@@ -7950,6 +7975,7 @@ static const MOVParseTableEntry mov_default_parse_table[] = { | ||
{ MKTAG('p','c','m','C'), mov_read_pcmc }, /* PCM configuration box */ | ||
{ MKTAG('p','i','t','m'), mov_read_pitm }, | ||
{ MKTAG('e','v','c','C'), mov_read_glbl }, | ||
+{ MKTAG('a','m','v','e'), mov_read_amve }, /* ambient viewing environment box */ | ||
{ 0, NULL } | ||
}; | ||
|
||
@@ -8398,6 +8424,7 @@ static int mov_read_close(AVFormatContext *s) | ||
@@ -8420,6 +8446,7 @@ static int mov_read_close(AVFormatContext *s) | ||
av_freep(&sc->spherical); | ||
av_freep(&sc->mastering); | ||
av_freep(&sc->coll); | ||
+ av_freep(&sc->ambient); | ||
} | ||
|
||
av_freep(&mov->dv_demux); | ||
@@ -8763,6 +8790,15 @@ static int mov_read_header(AVFormatContext *s) | ||
@@ -8781,6 +8808,14 @@ static int mov_read_header(AVFormatContext *s) | ||
|
||
sc->coll = NULL; | ||
} | ||
+ if (sc->ambient) { | ||
+ err = av_stream_add_side_data(st, AV_PKT_DATA_AMBIENT_VIEWING_ENVIRONMENT, | ||
+ (uint8_t *)sc->ambient, | ||
+ sc->ambient_size); | ||
+ if (err < 0) | ||
+ return err; | ||
+ if (!av_packet_side_data_add(&st->codecpar->coded_side_data, &st->codecpar->nb_coded_side_data, | ||
+ AV_PKT_DATA_AMBIENT_VIEWING_ENVIRONMENT, | ||
+ (uint8_t *)sc->ambient, sc->ambient_size, 0)) | ||
+ return AVERROR(ENOMEM); | ||
+ | ||
+ sc->ambient = NULL; | ||
+ } | ||
break; | ||
} | ||
} | ||
diff --git a/libavformat/movenc.c b/libavformat/movenc.c | ||
index 7ef6cef46a..507d57d811 100644 | ||
index e39f1ac987..41a87f5168 100644 | ||
--- a/libavformat/movenc.c | ||
+++ b/libavformat/movenc.c | ||
@@ -2225,6 +2225,27 @@ static int mov_write_mdcv_tag(AVIOContext *pb, MOVTrack *track) | ||
@@ -2226,6 +2226,27 @@ static int mov_write_mdcv_tag(AVIOContext *pb, MOVTrack *track) | ||
return 32; | ||
} | ||
|
||
|
@@ -172,7 +171,7 @@ index 7ef6cef46a..507d57d811 100644 | |
static void find_compressor(char * compressor_name, int len, MOVTrack *track) | ||
{ | ||
AVDictionaryEntry *encoder; | ||
@@ -2435,6 +2456,7 @@ static int mov_write_video_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContex | ||
@@ -2437,6 +2458,7 @@ static int mov_write_video_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContex | ||
if (track->mode == MODE_MOV || track->mode == MODE_MP4) { | ||
mov_write_clli_tag(pb, track); | ||
mov_write_mdcv_tag(pb, track); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters