Lines 37-42
Link Here
|
37 |
#include "decode.h" |
37 |
#include "decode.h" |
38 |
#include "dovi_rpu.h" |
38 |
#include "dovi_rpu.h" |
39 |
#include "internal.h" |
39 |
#include "internal.h" |
|
|
40 |
#include "itut35.h" |
40 |
|
41 |
|
41 |
#define FF_DAV1D_VERSION_AT_LEAST(x,y) \ |
42 |
#define FF_DAV1D_VERSION_AT_LEAST(x,y) \ |
42 |
(DAV1D_API_VERSION_MAJOR > (x) || DAV1D_API_VERSION_MAJOR == (x) && DAV1D_API_VERSION_MINOR >= (y)) |
43 |
(DAV1D_API_VERSION_MAJOR > (x) || DAV1D_API_VERSION_MAJOR == (x) && DAV1D_API_VERSION_MINOR >= (y)) |
Lines 542-548
static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame)
Link Here
|
542 |
|
543 |
|
543 |
provider_code = bytestream2_get_be16(&gb); |
544 |
provider_code = bytestream2_get_be16(&gb); |
544 |
switch (provider_code) { |
545 |
switch (provider_code) { |
545 |
case 0x31: { // atsc_provider_code |
546 |
case ITU_T_T35_PROVIDER_CODE_ATSC: { |
546 |
uint32_t user_identifier = bytestream2_get_be32(&gb); |
547 |
uint32_t user_identifier = bytestream2_get_be32(&gb); |
547 |
switch (user_identifier) { |
548 |
switch (user_identifier) { |
548 |
case MKBETAG('G', 'A', '9', '4'): { // closed captions |
549 |
case MKBETAG('G', 'A', '9', '4'): { // closed captions |
Lines 566-577
static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame)
Link Here
|
566 |
} |
567 |
} |
567 |
break; |
568 |
break; |
568 |
} |
569 |
} |
569 |
case 0x3C: { // smpte_provider_code |
570 |
case ITU_T_T35_PROVIDER_CODE_SMTPE: { |
570 |
AVDynamicHDRPlus *hdrplus; |
571 |
AVDynamicHDRPlus *hdrplus; |
571 |
int provider_oriented_code = bytestream2_get_be16(&gb); |
572 |
int provider_oriented_code = bytestream2_get_be16(&gb); |
572 |
int application_identifier = bytestream2_get_byte(&gb); |
573 |
int application_identifier = bytestream2_get_byte(&gb); |
573 |
|
574 |
|
574 |
if (itut_t35->country_code != 0xB5 || |
575 |
if (itut_t35->country_code != ITU_T_T35_COUNTRY_CODE_US || |
575 |
provider_oriented_code != 1 || application_identifier != 4) |
576 |
provider_oriented_code != 1 || application_identifier != 4) |
576 |
break; |
577 |
break; |
577 |
|
578 |
|
Lines 587-595
static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame)
Link Here
|
587 |
goto fail; |
588 |
goto fail; |
588 |
break; |
589 |
break; |
589 |
} |
590 |
} |
590 |
case 0x3B: { // dolby_provider_code |
591 |
case ITU_T_T35_PROVIDER_CODE_DOLBY: { |
591 |
int provider_oriented_code = bytestream2_get_be32(&gb); |
592 |
int provider_oriented_code = bytestream2_get_be32(&gb); |
592 |
if (itut_t35->country_code != 0xB5 || provider_oriented_code != 0x800) |
593 |
if (itut_t35->country_code != ITU_T_T35_COUNTRY_CODE_US || |
|
|
594 |
provider_oriented_code != 0x800) |
593 |
break; |
595 |
break; |
594 |
|
596 |
|
595 |
res = ff_dovi_rpu_parse(&dav1d->dovi, gb.buffer, gb.buffer_end - gb.buffer); |
597 |
res = ff_dovi_rpu_parse(&dav1d->dovi, gb.buffer, gb.buffer_end - gb.buffer); |
596 |
- |
|
|