Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2016-03-13 11:33:38 +0300
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2016-03-13 11:33:38 +0300
commitdb4786f1cf03a5ce4841412e5dad03404e5ade7a (patch)
treef1e07d38ea20e1f2907d0dab3c3d68e7163df2de /libavcodec/hevc_ps.c
parent58cb1fb1fe925c85161f23d5a368f126317cb292 (diff)
lavc/hevc_ps: Support GBR decoding.
Diffstat (limited to 'libavcodec/hevc_ps.c')
-rw-r--r--libavcodec/hevc_ps.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index bcb63a36d0..a36c6ee149 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -561,6 +561,19 @@ static void decode_vui(GetBitContext *gb, AVCodecContext *avctx,
vui->transfer_characteristic = AVCOL_TRC_UNSPECIFIED;
if (vui->matrix_coeffs >= AVCOL_SPC_NB)
vui->matrix_coeffs = AVCOL_SPC_UNSPECIFIED;
+ if (vui->matrix_coeffs == AVCOL_SPC_RGB) {
+ switch (sps->pix_fmt) {
+ case AV_PIX_FMT_YUV444P:
+ sps->pix_fmt = AV_PIX_FMT_GBRP;
+ break;
+ case AV_PIX_FMT_YUV444P10:
+ sps->pix_fmt = AV_PIX_FMT_GBRP10;
+ break;
+ case AV_PIX_FMT_YUV444P12:
+ sps->pix_fmt = AV_PIX_FMT_GBRP12;
+ break;
+ }
+ }
}
}