diff options
author | James Almer <jamrial@gmail.com> | 2018-11-28 22:49:06 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2018-11-28 23:04:22 -0300 |
commit | 0fca2f60dac7a294719919ca32813e9fde19cc66 (patch) | |
tree | 2258da6b93cfba4b3a6ea458f49fcedd82194b61 /libavcodec/libdav1d.c | |
parent | 3cd275bcde5c0de509c239fff275e8277cece514 (diff) | |
download | ffmpeg-0fca2f60dac7a294719919ca32813e9fde19cc66.tar.gz |
avcodec/libdav1d: read profile from the sequence header referenced by the ouput picture
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/libdav1d.c')
-rw-r--r-- | libavcodec/libdav1d.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c index ed2262df7c..9a24a3e408 100644 --- a/libavcodec/libdav1d.c +++ b/libavcodec/libdav1d.c @@ -84,14 +84,6 @@ static const enum AVPixelFormat pix_fmt[][2] = { [DAV1D_PIXEL_LAYOUT_I444] = { AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV444P10 }, }; -// TODO: Update once 12bit support is added. -static const int profile[] = { - [DAV1D_PIXEL_LAYOUT_I400] = FF_PROFILE_AV1_MAIN, - [DAV1D_PIXEL_LAYOUT_I420] = FF_PROFILE_AV1_MAIN, - [DAV1D_PIXEL_LAYOUT_I422] = FF_PROFILE_AV1_PROFESSIONAL, - [DAV1D_PIXEL_LAYOUT_I444] = FF_PROFILE_AV1_HIGH, -}; - static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame) { Libdav1dContext *dav1d = c->priv_data; @@ -156,7 +148,7 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame) frame->linesize[1] = p.stride[1]; frame->linesize[2] = p.stride[1]; - c->profile = profile[p.p.layout]; + c->profile = p.seq_hdr->profile; frame->format = c->pix_fmt = pix_fmt[p.p.layout][p.p.bpc == 10]; frame->width = p.p.w; frame->height = p.p.h; |