| @@ -211,6 +211,24 @@ static int decode_registered_user_data(H2645SEI *h, GetByteContext *gb, · 210 unmodified lines |
| 211 | 211 | } |
| 212 | 212 | break; |
| 213 | 213 | } |
| 214 | + case 0x5890: { // aom_provider_code |
| 215 | + const uint16_t aom_grain_provider_oriented_code = 0x0001; |
| 216 | + uint16_t provider_oriented_code; |
| 217 | + |
| 218 | + if (!IS_HEVC(codec_id)) |
| 219 | + goto unsupported_provider_code; |
| 220 | + |
| 221 | + if (bytestream2_get_bytes_left(gb) < 2) |
| 222 | + return AVERROR_INVALIDDATA; |
| 223 | + |
| 224 | + provider_oriented_code = bytestream2_get_byteu(gb); |
| 225 | + if (provider_oriented_code == aom_grain_provider_oriented_code) { |
| 226 | + return ff_aom_parse_film_grain_sets(&h->aom_film_grain, |
| 227 | + gb->buffer, |
| 228 | + bytestream2_get_bytes_left(gb)); |
| 229 | + } |
| 230 | + break; |
| 231 | + } |
| 214 | 232 | unsupported_provider_code: |
| 215 | 233 | #endif |
| 216 | 234 | default: |
| @@ -704,6 +722,12 @@ FF_ENABLE_DEPRECATION_WARNINGS · 487 unmodified lines |
| 704 | 722 | avctx->properties |= FF_CODEC_PROPERTY_FILM_GRAIN; |
| 705 | 723 | } |
| 706 | 724 | |
| 725 | +#if CONFIG_HEVC_SEI |
| 726 | + ret = ff_aom_attach_film_grain_sets(&sei->aom_film_grain, frame); |
| 727 | + if (ret < 0) |
| 728 | + return ret; |
| 729 | +#endif |
| 730 | + |
| 707 | 731 | if (sei->ambient_viewing_environment.present) { |
| 708 | 732 | H2645SEIAmbientViewingEnvironment *env = |
| 709 | 733 | &sei->ambient_viewing_environment; |
| @@ -800,4 +824,5 @@ void ff_h2645_sei_reset(H2645SEI *s) · 90 unmodified lines |
| 800 | 824 | s->ambient_viewing_environment.present = 0; |
| 801 | 825 | s->mastering_display.present = 0; |
| 802 | 826 | s->content_light.present = 0; |
| 827 | + s->aom_film_grain.enable = 0; |
| 803 | 828 | } |