* [FFmpeg-devel] [PATCH] avcodec/libdav1d: support parsing multiple ITU-T T.35 entries in a picture
@ 2023-04-19 0:08 James Almer
0 siblings, 0 replies; only message in thread
From: James Almer @ 2023-04-19 0:08 UTC (permalink / raw)
To: ffmpeg-devel
This requires the newest libdav1d release.
Signed-off-by: James Almer <jamrial@gmail.com>
---
libavcodec/libdav1d.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c
index ddf2311a41..788ae5ef98 100644
--- a/libavcodec/libdav1d.c
+++ b/libavcodec/libdav1d.c
@@ -511,10 +511,16 @@ FF_ENABLE_DEPRECATION_WARNINGS
light->MaxFALL = p->content_light->max_frame_average_light_level;
}
if (p->itut_t35) {
+#if FF_DAV1D_VERSION_AT_LEAST(6,9)
+ for (size_t i = 0; i < p->n_itut_t35; i++) {
+ const Dav1dITUTT35 *itut_t35 = &p->itut_t35[i];
+#else
+ const Dav1dITUTT35 *itut_t35 = p->itut_t35;
+#endif
GetByteContext gb;
int provider_code;
- bytestream2_init(&gb, p->itut_t35->payload, p->itut_t35->payload_size);
+ bytestream2_init(&gb, itut_t35->payload, itut_t35->payload_size);
provider_code = bytestream2_get_be16(&gb);
switch (provider_code) {
@@ -546,7 +552,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
int provider_oriented_code = bytestream2_get_be16(&gb);
int application_identifier = bytestream2_get_byte(&gb);
- if (p->itut_t35->country_code != 0xB5 ||
+ if (itut_t35->country_code != 0xB5 ||
provider_oriented_code != 1 || application_identifier != 4)
break;
@@ -565,6 +571,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
default: // ignore unsupported provider codes
break;
}
+#if FF_DAV1D_VERSION_AT_LEAST(6,9)
+ }
+#endif
}
if (p->frame_hdr->film_grain.present && (!dav1d->apply_grain ||
(c->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN))) {
--
2.40.0
_______________________________________________
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".
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-04-19 0:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-19 0:08 [FFmpeg-devel] [PATCH] avcodec/libdav1d: support parsing multiple ITU-T T.35 entries in a picture James Almer
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