diff options
author | Paul B Mahol <onemda@gmail.com> | 2016-09-04 01:56:02 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2016-09-04 01:57:50 +0200 |
commit | c62cb9bf5a50df416532afd8d5f79ebade174ac7 (patch) | |
tree | 6be1a2b14b3b5cb53bd43b7f1e730b80bed06d04 /libavcodec | |
parent | d2e74315e5be4da3e3b384fb7453296140fafd9b (diff) | |
download | ffmpeg-c62cb9bf5a50df416532afd8d5f79ebade174ac7.tar.gz |
avcodec/utvideodec: add support for ULY4 and ULH4
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/utvideodec.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/libavcodec/utvideodec.c b/libavcodec/utvideodec.c index 8798714f86..650c0ec67d 100644 --- a/libavcodec/utvideodec.c +++ b/libavcodec/utvideodec.c @@ -676,6 +676,26 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, } } break; + case AV_PIX_FMT_YUV444P: + for (i = 0; i < 3; i++) { + ret = decode_plane(c, i, frame.f->data[i], 1, frame.f->linesize[i], + avctx->width, avctx->height, + plane_start[i], c->frame_pred == PRED_LEFT); + if (ret) + return ret; + if (c->frame_pred == PRED_MEDIAN) { + if (!c->interlaced) { + restore_median(frame.f->data[i], 1, frame.f->linesize[i], + avctx->width, avctx->height, + c->slices, 0); + } else { + restore_median_il(frame.f->data[i], 1, frame.f->linesize[i], + avctx->width, avctx->height, + c->slices, 0); + } + } + } + break; case AV_PIX_FMT_YUV422P10: for (i = 0; i < 3; i++) { ret = decode_plane10(c, i, (uint16_t *)frame.f->data[i], 1, frame.f->linesize[i] / 2, @@ -757,6 +777,11 @@ static av_cold int decode_init(AVCodecContext *avctx) avctx->pix_fmt = AV_PIX_FMT_YUV422P; avctx->colorspace = AVCOL_SPC_BT470BG; break; + case MKTAG('U', 'L', 'Y', '4'): + c->planes = 3; + avctx->pix_fmt = AV_PIX_FMT_YUV444P; + avctx->colorspace = AVCOL_SPC_BT470BG; + break; case MKTAG('U', 'Q', 'Y', '2'): c->planes = 3; avctx->pix_fmt = AV_PIX_FMT_YUV422P10; @@ -779,6 +804,11 @@ static av_cold int decode_init(AVCodecContext *avctx) avctx->pix_fmt = AV_PIX_FMT_YUV422P; avctx->colorspace = AVCOL_SPC_BT709; break; + case MKTAG('U', 'L', 'H', '4'): + c->planes = 3; + avctx->pix_fmt = AV_PIX_FMT_YUV444P; + avctx->colorspace = AVCOL_SPC_BT709; + break; default: av_log(avctx, AV_LOG_ERROR, "Unknown Ut Video FOURCC provided (%08X)\n", avctx->codec_tag); |