aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/hevc_ps.c
diff options
context:
space:
mode:
authorYusuke Nakamura <muken.the.vfrmaniac@gmail.com>2013-11-03 18:47:31 +0000
committerVittorio Giovara <vittorio.giovara@gmail.com>2013-11-04 16:19:53 +0100
commit3ef9b7ab95cc703b67a8b658dca45c80df0aaa66 (patch)
tree5076ba8bf24bc3d79aadf6d520d56323621b4262 /libavcodec/hevc_ps.c
parent885ec9242554ad25922258a595ec5e317922a412 (diff)
downloadffmpeg-3ef9b7ab95cc703b67a8b658dca45c80df0aaa66.tar.gz
hevc_ps: Use AV_PIX_FMT_YUVJ420P if YUV 4:2:0 8-bit full scale
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavcodec/hevc_ps.c')
-rw-r--r--libavcodec/hevc_ps.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index 9c0d0ee753..402c16fef8 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -449,6 +449,8 @@ static void decode_vui(HEVCContext *s, HEVCSPS *sps)
vui->video_format = get_bits(gb, 3);
vui->video_full_range_flag = get_bits1(gb);
vui->colour_description_present_flag = get_bits1(gb);
+ if (vui->video_full_range_flag && sps->pix_fmt == AV_PIX_FMT_YUV420P)
+ sps->pix_fmt = AV_PIX_FMT_YUVJ420P;
if (vui->colour_description_present_flag) {
vui->colour_primaries = get_bits(gb, 8);
vui->transfer_characteristic = get_bits(gb, 8);