summaryrefslogtreecommitdiff
path: root/libavcodec/xwddec.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-10-06 12:10:34 +0200
committerAnton Khirnov <anton@khirnov.net>2012-10-08 07:13:26 +0200
commit716d413c13981da15323c7a3821860536eefdbbb (patch)
treeb15ebcded50b8edaa5b9fc8f261774043138e1fa /libavcodec/xwddec.c
parent78071a1420b425dfb787ac739048f523007b8139 (diff)
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
Diffstat (limited to 'libavcodec/xwddec.c')
-rw-r--r--libavcodec/xwddec.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/libavcodec/xwddec.c b/libavcodec/xwddec.c
index bb38a1ebac..4cec6152c5 100644
--- a/libavcodec/xwddec.c
+++ b/libavcodec/xwddec.c
@@ -153,19 +153,19 @@ 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)
return AVERROR_INVALIDDATA;
if (pixdepth == 1)
- avctx->pix_fmt = PIX_FMT_MONOWHITE;
+ avctx->pix_fmt = AV_PIX_FMT_MONOWHITE;
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:
@@ -173,24 +173,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;
@@ -199,7 +199,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;
}
@@ -216,7 +216,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;