History

avcodec/libdav1d: support parsing multiple ITU-T T.35 entries in a picture

This requires the newest libdav1d release.

James Almer committed 3 years ago

Commit 09b2ca91 parent 24f16b71 file · +11 −2Browse files

Unified · Split

libavcodec/libdav1d.c+11−2
@@ -514,10 +514,16 @@ FF_ENABLE_DEPRECATION_WARNINGS · 513 unmodified lines
514 light->MaxFALL = p->content_light->max_frame_average_light_level;514 light->MaxFALL = p->content_light->max_frame_average_light_level;
515 }515 }
516 if (p->itut_t35) {516 if (p->itut_t35) {
517#if FF_DAV1D_VERSION_AT_LEAST(6,9)
518 for (size_t i = 0; i < p->n_itut_t35; i++) {
519 const Dav1dITUTT35 *itut_t35 = &p->itut_t35[i];
520#else
521 const Dav1dITUTT35 *itut_t35 = p->itut_t35;
522#endif
517 GetByteContext gb;523 GetByteContext gb;
518 int provider_code;524 int provider_code;
519 525
520 bytestream2_init(&gb, p->itut_t35->payload, p->itut_t35->payload_size);526 bytestream2_init(&gb, itut_t35->payload, itut_t35->payload_size);
521 527
522 provider_code = bytestream2_get_be16(&gb);528 provider_code = bytestream2_get_be16(&gb);
523 switch (provider_code) {529 switch (provider_code) {
@@ -549,7 +555,7 @@ FF_ENABLE_DEPRECATION_WARNINGS · 25 unmodified lines
549 int provider_oriented_code = bytestream2_get_be16(&gb);555 int provider_oriented_code = bytestream2_get_be16(&gb);
550 int application_identifier = bytestream2_get_byte(&gb);556 int application_identifier = bytestream2_get_byte(&gb);
551 557
552 if (p->itut_t35->country_code != 0xB5 ||558 if (itut_t35->country_code != 0xB5 ||
553 provider_oriented_code != 1 || application_identifier != 4)559 provider_oriented_code != 1 || application_identifier != 4)
554 break;560 break;
555 561
@@ -568,6 +574,9 @@ FF_ENABLE_DEPRECATION_WARNINGS · 12 unmodified lines
568 default: // ignore unsupported provider codes574 default: // ignore unsupported provider codes
569 break;575 break;
570 }576 }
577#if FF_DAV1D_VERSION_AT_LEAST(6,9)
578 }
579#endif
571 }580 }
572 if (p->frame_hdr->film_grain.present && (!dav1d->apply_grain ||581 if (p->frame_hdr->film_grain.present && (!dav1d->apply_grain ||
573 (c->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN))) {582 (c->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN))) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t