summaryrefslogtreecommitdiff
path: root/libavcodec/bmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/bmp.c')
-rw-r--r--libavcodec/bmp.c24
1 files changed, 12 insertions, 12 deletions
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<<depth);
return -1;
@@ -196,7 +196,7 @@ static int bmp_decode_frame(AVCodecContext *avctx,
return -1;
}
- if(avctx->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);