aboutsummaryrefslogtreecommitdiff
path: root/libavcodec/huffyuv.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/huffyuv.c')
-rw-r--r--libavcodec/huffyuv.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c
index e3787e757b..3da1de8fc5 100644
--- a/libavcodec/huffyuv.c
+++ b/libavcodec/huffyuv.c
@@ -456,21 +456,21 @@ static av_cold int decode_init(AVCodecContext *avctx)
switch (s->bitstream_bpp) {
case 12:
- avctx->pix_fmt = PIX_FMT_YUV420P;
+ avctx->pix_fmt = AV_PIX_FMT_YUV420P;
break;
case 16:
if (s->yuy2) {
- avctx->pix_fmt = PIX_FMT_YUYV422;
+ avctx->pix_fmt = AV_PIX_FMT_YUYV422;
} else {
- avctx->pix_fmt = PIX_FMT_YUV422P;
+ avctx->pix_fmt = AV_PIX_FMT_YUV422P;
}
break;
case 24:
case 32:
if (s->bgr32) {
- avctx->pix_fmt = PIX_FMT_RGB32;
+ avctx->pix_fmt = AV_PIX_FMT_RGB32;
} else {
- avctx->pix_fmt = PIX_FMT_BGR24;
+ avctx->pix_fmt = AV_PIX_FMT_BGR24;
}
break;
default:
@@ -545,13 +545,13 @@ static av_cold int encode_init(AVCodecContext *avctx)
avctx->coded_frame = &s->picture;
switch (avctx->pix_fmt) {
- case PIX_FMT_YUV420P:
+ case AV_PIX_FMT_YUV420P:
s->bitstream_bpp = 12;
break;
- case PIX_FMT_YUV422P:
+ case AV_PIX_FMT_YUV422P:
s->bitstream_bpp = 16;
break;
- case PIX_FMT_RGB32:
+ case AV_PIX_FMT_RGB32:
s->bitstream_bpp = 24;
break;
default:
@@ -573,7 +573,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
}else s->context= 0;
if (avctx->codec->id == AV_CODEC_ID_HUFFYUV) {
- if (avctx->pix_fmt == PIX_FMT_YUV420P) {
+ if (avctx->pix_fmt == AV_PIX_FMT_YUV420P) {
av_log(avctx, AV_LOG_ERROR,
"Error: YV12 is not supported by huffyuv; use "
"vcodec=ffvhuff or format=422p\n");
@@ -1256,8 +1256,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
init_put_bits(&s->pb, pkt->data + size, pkt->size - size);
- if (avctx->pix_fmt == PIX_FMT_YUV422P ||
- avctx->pix_fmt == PIX_FMT_YUV420P) {
+ if (avctx->pix_fmt == AV_PIX_FMT_YUV422P ||
+ avctx->pix_fmt == AV_PIX_FMT_YUV420P) {
int lefty, leftu, leftv, y, cy;
put_bits(&s->pb, 8, leftv = p->data[2][0]);
@@ -1361,7 +1361,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
encode_422_bitstream(s, 0, width);
}
}
- } else if(avctx->pix_fmt == PIX_FMT_RGB32) {
+ } else if(avctx->pix_fmt == AV_PIX_FMT_RGB32) {
uint8_t *data = p->data[0] + (height - 1) * p->linesize[0];
const int stride = -p->linesize[0];
const int fake_stride = -fake_ystride;
@@ -1479,8 +1479,8 @@ AVCodec ff_huffyuv_encoder = {
.init = encode_init,
.encode2 = encode_frame,
.close = encode_end,
- .pix_fmts = (const enum PixelFormat[]){
- PIX_FMT_YUV422P, PIX_FMT_RGB32, PIX_FMT_NONE
+ .pix_fmts = (const enum AVPixelFormat[]){
+ AV_PIX_FMT_YUV422P, AV_PIX_FMT_RGB32, AV_PIX_FMT_NONE
},
.long_name = NULL_IF_CONFIG_SMALL("Huffyuv / HuffYUV"),
};
@@ -1495,8 +1495,8 @@ AVCodec ff_ffvhuff_encoder = {
.init = encode_init,
.encode2 = encode_frame,
.close = encode_end,
- .pix_fmts = (const enum PixelFormat[]){
- PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_RGB32, PIX_FMT_NONE
+ .pix_fmts = (const enum AVPixelFormat[]){
+ AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_RGB32, AV_PIX_FMT_NONE
},
.long_name = NULL_IF_CONFIG_SMALL("Huffyuv FFmpeg variant"),
};