summaryrefslogtreecommitdiffstats
path: root/libavcodec/xwddec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/xwddec.c')
-rw-r--r--libavcodec/xwddec.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/libavcodec/xwddec.c b/libavcodec/xwddec.c
index ea7da84..ef99a6b 100644
--- a/libavcodec/xwddec.c
+++ b/libavcodec/xwddec.c
@@ -153,22 +153,22 @@ static int xwd_decode_frame(AVCodecContext *avctx, void *data,
return AVERROR_PATCHWELCOME;
}
- avctx->pix_fmt = PIX_FMT_NONE;
+ avctx->pix_fmt = AV_PIX_FMT_NONE;
switch (vclass) {
case XWD_STATIC_GRAY:
case XWD_GRAY_SCALE:
if (bpp != 1 && bpp != 8)
return AVERROR_INVALIDDATA;
if (pixdepth == 1) {
- avctx->pix_fmt = PIX_FMT_MONOWHITE;
+ avctx->pix_fmt = AV_PIX_FMT_MONOWHITE;
} else if (pixdepth == 8) {
- avctx->pix_fmt = PIX_FMT_GRAY8;
+ avctx->pix_fmt = AV_PIX_FMT_GRAY8;
}
break;
case XWD_STATIC_COLOR:
case XWD_PSEUDO_COLOR:
if (bpp == 8)
- avctx->pix_fmt = PIX_FMT_PAL8;
+ avctx->pix_fmt = AV_PIX_FMT_PAL8;
break;
case XWD_TRUE_COLOR:
case XWD_DIRECT_COLOR:
@@ -176,24 +176,24 @@ static int xwd_decode_frame(AVCodecContext *avctx, void *data,
return AVERROR_INVALIDDATA;
if (bpp == 16 && pixdepth == 15) {
if (rgb[0] == 0x7C00 && rgb[1] == 0x3E0 && rgb[2] == 0x1F)
- avctx->pix_fmt = be ? PIX_FMT_RGB555BE : PIX_FMT_RGB555LE;
+ avctx->pix_fmt = be ? AV_PIX_FMT_RGB555BE : AV_PIX_FMT_RGB555LE;
else if (rgb[0] == 0x1F && rgb[1] == 0x3E0 && rgb[2] == 0x7C00)
- avctx->pix_fmt = be ? PIX_FMT_BGR555BE : PIX_FMT_BGR555LE;
+ avctx->pix_fmt = be ? AV_PIX_FMT_BGR555BE : AV_PIX_FMT_BGR555LE;
} else if (bpp == 16 && pixdepth == 16) {
if (rgb[0] == 0xF800 && rgb[1] == 0x7E0 && rgb[2] == 0x1F)
- avctx->pix_fmt = be ? PIX_FMT_RGB565BE : PIX_FMT_RGB565LE;
+ avctx->pix_fmt = be ? AV_PIX_FMT_RGB565BE : AV_PIX_FMT_RGB565LE;
else if (rgb[0] == 0x1F && rgb[1] == 0x7E0 && rgb[2] == 0xF800)
- avctx->pix_fmt = be ? PIX_FMT_BGR565BE : PIX_FMT_BGR565LE;
+ avctx->pix_fmt = be ? AV_PIX_FMT_BGR565BE : AV_PIX_FMT_BGR565LE;
} else if (bpp == 24) {
if (rgb[0] == 0xFF0000 && rgb[1] == 0xFF00 && rgb[2] == 0xFF)
- avctx->pix_fmt = be ? PIX_FMT_RGB24 : PIX_FMT_BGR24;
+ avctx->pix_fmt = be ? AV_PIX_FMT_RGB24 : AV_PIX_FMT_BGR24;
else if (rgb[0] == 0xFF && rgb[1] == 0xFF00 && rgb[2] == 0xFF0000)
- avctx->pix_fmt = be ? PIX_FMT_BGR24 : PIX_FMT_RGB24;
+ avctx->pix_fmt = be ? AV_PIX_FMT_BGR24 : AV_PIX_FMT_RGB24;
} else if (bpp == 32) {
if (rgb[0] == 0xFF0000 && rgb[1] == 0xFF00 && rgb[2] == 0xFF)
- avctx->pix_fmt = be ? PIX_FMT_ARGB : PIX_FMT_BGRA;
+ avctx->pix_fmt = be ? AV_PIX_FMT_ARGB : AV_PIX_FMT_BGRA;
else if (rgb[0] == 0xFF && rgb[1] == 0xFF00 && rgb[2] == 0xFF0000)
- avctx->pix_fmt = be ? PIX_FMT_ABGR : PIX_FMT_RGBA;
+ avctx->pix_fmt = be ? AV_PIX_FMT_ABGR : AV_PIX_FMT_RGBA;
}
bytestream2_skipu(&gb, ncolors * XWD_CMAP_SIZE);
break;
@@ -202,7 +202,7 @@ static int xwd_decode_frame(AVCodecContext *avctx, void *data,
return AVERROR_INVALIDDATA;
}
- if (avctx->pix_fmt == PIX_FMT_NONE) {
+ if (avctx->pix_fmt == AV_PIX_FMT_NONE) {
av_log_ask_for_sample(avctx, "unknown file: bpp %d, pixdepth %d, vclass %d\n", bpp, pixdepth, vclass);
return AVERROR_PATCHWELCOME;
}
@@ -219,7 +219,7 @@ static int xwd_decode_frame(AVCodecContext *avctx, void *data,
p->key_frame = 1;
p->pict_type = AV_PICTURE_TYPE_I;
- if (avctx->pix_fmt == PIX_FMT_PAL8) {
+ if (avctx->pix_fmt == AV_PIX_FMT_PAL8) {
uint32_t *dst = (uint32_t *)p->data[1];
uint8_t red, green, blue;
OpenPOWER on IntegriCloud