[FFmpeg-cvslog] avcodec/utvideodec: add support for UQY0
Paul B Mahol
git at videolan.org
Tue Feb 25 14:10:44 EET 2020
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Feb 25 13:09:20 2020 +0100| [022796c82f5dde0079d5cfdb7fd8ead3e8bc446d] | committer: Paul B Mahol
avcodec/utvideodec: add support for UQY0
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=022796c82f5dde0079d5cfdb7fd8ead3e8bc446d
---
libavcodec/utvideodec.c | 14 ++++++++++++++
libavformat/riff.c | 1 +
2 files changed, 15 insertions(+)
diff --git a/libavcodec/utvideodec.c b/libavcodec/utvideodec.c
index d5af9d53a8..4da257fc61 100644
--- a/libavcodec/utvideodec.c
+++ b/libavcodec/utvideodec.c
@@ -890,6 +890,15 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
}
}
break;
+ case AV_PIX_FMT_YUV420P10:
+ for (i = 0; i < 3; i++) {
+ ret = decode_plane10(c, i, (uint16_t *)frame.f->data[i], frame.f->linesize[i] / 2,
+ avctx->width >> !!i, avctx->height >> !!i,
+ plane_start[i], plane_start[i + 1] - 1024, c->frame_pred == PRED_LEFT);
+ if (ret)
+ return ret;
+ }
+ break;
case AV_PIX_FMT_YUV422P10:
for (i = 0; i < 3; i++) {
ret = decode_plane10(c, i, (uint16_t *)frame.f->data[i], frame.f->linesize[i] / 2,
@@ -948,6 +957,11 @@ static av_cold int decode_init(AVCodecContext *avctx)
avctx->pix_fmt = AV_PIX_FMT_YUV444P;
avctx->colorspace = AVCOL_SPC_BT470BG;
break;
+ case MKTAG('U', 'Q', 'Y', '0'):
+ c->planes = 3;
+ c->pro = 1;
+ avctx->pix_fmt = AV_PIX_FMT_YUV420P10;
+ break;
case MKTAG('U', 'Q', 'Y', '2'):
c->planes = 3;
c->pro = 1;
diff --git a/libavformat/riff.c b/libavformat/riff.c
index b15d5e9753..3679b181df 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -403,6 +403,7 @@ const AVCodecTag ff_codec_bmp_tags[] = {
{ AV_CODEC_ID_UTVIDEO, MKTAG('U', 'L', 'H', '0') },
{ AV_CODEC_ID_UTVIDEO, MKTAG('U', 'L', 'H', '2') },
{ AV_CODEC_ID_UTVIDEO, MKTAG('U', 'L', 'H', '4') },
+ { AV_CODEC_ID_UTVIDEO, MKTAG('U', 'Q', 'Y', '0') },
{ AV_CODEC_ID_UTVIDEO, MKTAG('U', 'Q', 'Y', '2') },
{ AV_CODEC_ID_UTVIDEO, MKTAG('U', 'Q', 'R', 'A') },
{ AV_CODEC_ID_UTVIDEO, MKTAG('U', 'Q', 'R', 'G') },
More information about the ffmpeg-cvslog
mailing list