From 716d413c13981da15323c7a3821860536eefdbbb Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 6 Oct 2012 12:10:34 +0200 Subject: Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat --- libavcodec/bmp.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'libavcodec/bmp.c') diff --git a/libavcodec/bmp.c b/libavcodec/bmp.c index 3af25cd333..b38e056315 100644 --- a/libavcodec/bmp.c +++ b/libavcodec/bmp.c @@ -136,7 +136,7 @@ static int bmp_decode_frame(AVCodecContext *avctx, avctx->width = width; avctx->height = height > 0? height: -height; - avctx->pix_fmt = PIX_FMT_NONE; + avctx->pix_fmt = AV_PIX_FMT_NONE; switch(depth){ case 32: @@ -155,21 +155,21 @@ static int bmp_decode_frame(AVCodecContext *avctx, rgb[2] = 0; } - avctx->pix_fmt = PIX_FMT_BGR24; + avctx->pix_fmt = AV_PIX_FMT_BGR24; break; case 24: - avctx->pix_fmt = PIX_FMT_BGR24; + avctx->pix_fmt = AV_PIX_FMT_BGR24; break; case 16: if(comp == BMP_RGB) - avctx->pix_fmt = PIX_FMT_RGB555; + avctx->pix_fmt = AV_PIX_FMT_RGB555; else if (comp == BMP_BITFIELDS) { if (rgb[0] == 0xF800 && rgb[1] == 0x07E0 && rgb[2] == 0x001F) - avctx->pix_fmt = PIX_FMT_RGB565; + avctx->pix_fmt = AV_PIX_FMT_RGB565; else if (rgb[0] == 0x7C00 && rgb[1] == 0x03E0 && rgb[2] == 0x001F) - avctx->pix_fmt = PIX_FMT_RGB555; + avctx->pix_fmt = AV_PIX_FMT_RGB555; else if (rgb[0] == 0x0F00 && rgb[1] == 0x00F0 && rgb[2] == 0x000F) - avctx->pix_fmt = PIX_FMT_RGB444; + avctx->pix_fmt = AV_PIX_FMT_RGB444; else { av_log(avctx, AV_LOG_ERROR, "Unknown bitfields %0X %0X %0X\n", rgb[0], rgb[1], rgb[2]); return AVERROR(EINVAL); @@ -178,14 +178,14 @@ static int bmp_decode_frame(AVCodecContext *avctx, break; case 8: if(hsize - ihsize - 14 > 0) - avctx->pix_fmt = PIX_FMT_PAL8; + avctx->pix_fmt = AV_PIX_FMT_PAL8; else - avctx->pix_fmt = PIX_FMT_GRAY8; + avctx->pix_fmt = AV_PIX_FMT_GRAY8; break; case 1: case 4: if(hsize - ihsize - 14 > 0){ - avctx->pix_fmt = PIX_FMT_PAL8; + avctx->pix_fmt = AV_PIX_FMT_PAL8; }else{ av_log(avctx, AV_LOG_ERROR, "Unknown palette for %d-colour BMP\n", 1<pix_fmt == PIX_FMT_NONE){ + if(avctx->pix_fmt == AV_PIX_FMT_NONE){ av_log(avctx, AV_LOG_ERROR, "unsupported pixel format\n"); return -1; } @@ -236,7 +236,7 @@ static int bmp_decode_frame(AVCodecContext *avctx, linesize = p->linesize[0]; } - if(avctx->pix_fmt == PIX_FMT_PAL8){ + if(avctx->pix_fmt == AV_PIX_FMT_PAL8){ int colors = 1 << depth; memset(p->data[1], 0, 1024); -- cgit v1.2.3