summaryrefslogtreecommitdiff
path: root/libavcodec/libutvideodec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/libutvideodec.cpp')
-rw-r--r--libavcodec/libutvideodec.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/libavcodec/libutvideodec.cpp b/libavcodec/libutvideodec.cpp
index 4f5b91f02e..f4ba8b3bda 100644
--- a/libavcodec/libutvideodec.cpp
+++ b/libavcodec/libutvideodec.cpp
@@ -52,19 +52,19 @@ static av_cold int utvideo_decode_init(AVCodecContext *avctx)
/* Pick format based on FOURCC */
switch (avctx->codec_tag) {
case MKTAG('U', 'L', 'Y', '0'):
- avctx->pix_fmt = PIX_FMT_YUV420P;
+ avctx->pix_fmt = AV_PIX_FMT_YUV420P;
format = UTVF_YV12;
break;
case MKTAG('U', 'L', 'Y', '2'):
- avctx->pix_fmt = PIX_FMT_YUYV422;
+ avctx->pix_fmt = AV_PIX_FMT_YUYV422;
format = UTVF_YUY2;
break;
case MKTAG('U', 'L', 'R', 'G'):
- avctx->pix_fmt = PIX_FMT_BGR24;
+ avctx->pix_fmt = AV_PIX_FMT_BGR24;
format = UTVF_RGB24_WIN;
break;
case MKTAG('U', 'L', 'R', 'A'):
- avctx->pix_fmt = PIX_FMT_RGB32;
+ avctx->pix_fmt = AV_PIX_FMT_RGB32;
format = UTVF_RGB32_WIN;
break;
default:
@@ -131,21 +131,21 @@ static int utvideo_decode_frame(AVCodecContext *avctx, void *data,
/* Set the output data depending on the colorspace */
switch (avctx->pix_fmt) {
- case PIX_FMT_YUV420P:
+ case AV_PIX_FMT_YUV420P:
pic->linesize[0] = w;
pic->linesize[1] = pic->linesize[2] = w / 2;
pic->data[0] = utv->buffer;
pic->data[2] = utv->buffer + (w * h);
pic->data[1] = pic->data[2] + (w * h / 4);
break;
- case PIX_FMT_YUYV422:
+ case AV_PIX_FMT_YUYV422:
pic->linesize[0] = w * 2;
pic->data[0] = utv->buffer;
break;
- case PIX_FMT_BGR24:
- case PIX_FMT_RGB32:
+ case AV_PIX_FMT_BGR24:
+ case AV_PIX_FMT_RGB32:
/* Make the linesize negative, since Ut Video uses bottom-up BGR */
- pic->linesize[0] = -1 * w * (avctx->pix_fmt == PIX_FMT_BGR24 ? 3 : 4);
+ pic->linesize[0] = -1 * w * (avctx->pix_fmt == AV_PIX_FMT_BGR24 ? 3 : 4);
pic->data[0] = utv->buffer + utv->buf_size + pic->linesize[0];
break;
}