Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 917591 | Differences between
and this patch

Collapse All | Expand All

(-)a/libavcodec/av1dec.c (+25 lines)
Lines 734-739 static av_cold int av1_decode_free(AVCodecContext *avctx) Link Here
734
734
735
    ff_cbs_fragment_free(&s->current_obu);
735
    ff_cbs_fragment_free(&s->current_obu);
736
    ff_cbs_close(&s->cbc);
736
    ff_cbs_close(&s->cbc);
737
    ff_dovi_ctx_unref(&s->dovi);
737
738
738
    return 0;
739
    return 0;
739
}
740
}
Lines 828-833 static av_cold int av1_decode_init(AVCodecContext *avctx) Link Here
828
{
829
{
829
    AV1DecContext *s = avctx->priv_data;
830
    AV1DecContext *s = avctx->priv_data;
830
    AV1RawSequenceHeader *seq;
831
    AV1RawSequenceHeader *seq;
832
    const AVPacketSideData *sd;
831
    int ret;
833
    int ret;
832
834
833
    s->avctx = avctx;
835
    s->avctx = avctx;
Lines 883-888 static av_cold int av1_decode_init(AVCodecContext *avctx) Link Here
883
        ff_cbs_fragment_reset(&s->current_obu);
885
        ff_cbs_fragment_reset(&s->current_obu);
884
    }
886
    }
885
887
888
    s->dovi.logctx = avctx;
889
    s->dovi.dv_profile = 10; // default for AV1
890
    sd = ff_get_coded_side_data(avctx, AV_PKT_DATA_DOVI_CONF);
891
    if (sd && sd->size > 0)
892
        ff_dovi_update_cfg(&s->dovi, (AVDOVIDecoderConfigurationRecord *) sd->data);
893
886
    return ret;
894
    return ret;
887
}
895
}
888
896
Lines 936-941 static int export_itut_t35(AVCodecContext *avctx, AVFrame *frame, Link Here
936
                           const AV1RawMetadataITUTT35 *itut_t35)
944
                           const AV1RawMetadataITUTT35 *itut_t35)
937
{
945
{
938
    GetByteContext gb;
946
    GetByteContext gb;
947
    AV1DecContext *s = avctx->priv_data;
939
    int ret, provider_code;
948
    int ret, provider_code;
940
949
941
    bytestream2_init(&gb, itut_t35->payload, itut_t35->payload_size);
950
    bytestream2_init(&gb, itut_t35->payload, itut_t35->payload_size);
Lines 985-990 static int export_itut_t35(AVCodecContext *avctx, AVFrame *frame, Link Here
985
            return ret;
994
            return ret;
986
        break;
995
        break;
987
    }
996
    }
997
    case 0x3B: { // dolby_provider_code
998
        int provider_oriented_code = bytestream2_get_be32(&gb);
999
        if (itut_t35->itu_t_t35_country_code != 0xB5 || provider_oriented_code != 0x800)
1000
            break;
1001
1002
        ret = ff_dovi_rpu_parse(&s->dovi, gb.buffer, gb.buffer_end - gb.buffer);
1003
        if (ret < 0) {
1004
            av_log(avctx, AV_LOG_WARNING, "Error parsing DOVI OBU.\n");
1005
            break; // ignore
1006
        }
1007
1008
        ret = ff_dovi_attach_side_data(&s->dovi, frame);
1009
        if (ret < 0)
1010
            return ret;
1011
        break;
1012
    }
988
    default: // ignore unsupported provider codes
1013
    default: // ignore unsupported provider codes
989
        break;
1014
        break;
990
    }
1015
    }
(-)a/libavcodec/av1dec.h (-1 / +2 lines)
Lines 31-36 Link Here
31
#include "packet.h"
31
#include "packet.h"
32
#include "cbs.h"
32
#include "cbs.h"
33
#include "cbs_av1.h"
33
#include "cbs_av1.h"
34
#include "dovi_rpu.h"
34
35
35
typedef struct AV1Frame {
36
typedef struct AV1Frame {
36
    AVFrame *f;
37
    AVFrame *f;
Lines 81-86 typedef struct AV1DecContext { Link Here
81
    AV1RawMetadataHDRCLL *cll;
82
    AV1RawMetadataHDRCLL *cll;
82
    AV1RawOBU *mdcv_ref;   ///< RefStruct reference backing mdcv
83
    AV1RawOBU *mdcv_ref;   ///< RefStruct reference backing mdcv
83
    AV1RawMetadataHDRMDCV *mdcv;
84
    AV1RawMetadataHDRMDCV *mdcv;
85
    DOVIContext dovi;
84
    AVFifo *itut_t35_fifo;
86
    AVFifo *itut_t35_fifo;
85
87
86
    uint16_t tile_num;
88
    uint16_t tile_num;
87
- 

Return to bug 917591