diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-10-06 12:10:34 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-10-08 07:13:26 +0200 |
commit | 716d413c13981da15323c7a3821860536eefdbbb (patch) | |
tree | b15ebcded50b8edaa5b9fc8f261774043138e1fa /libavcodec/bmpenc.c | |
parent | 78071a1420b425dfb787ac739048f523007b8139 (diff) | |
download | ffmpeg-716d413c13981da15323c7a3821860536eefdbbb.tar.gz |
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
Diffstat (limited to 'libavcodec/bmpenc.c')
-rw-r--r-- | libavcodec/bmpenc.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/libavcodec/bmpenc.c b/libavcodec/bmpenc.c index 37cf6e13e4..a798f34409 100644 --- a/libavcodec/bmpenc.c +++ b/libavcodec/bmpenc.c @@ -37,23 +37,23 @@ static av_cold int bmp_encode_init(AVCodecContext *avctx){ avctx->coded_frame = &s->picture; switch (avctx->pix_fmt) { - case PIX_FMT_BGR24: + case AV_PIX_FMT_BGR24: avctx->bits_per_coded_sample = 24; break; - case PIX_FMT_RGB555: - case PIX_FMT_RGB565: - case PIX_FMT_RGB444: + case AV_PIX_FMT_RGB555: + case AV_PIX_FMT_RGB565: + case AV_PIX_FMT_RGB444: avctx->bits_per_coded_sample = 16; break; - case PIX_FMT_RGB8: - case PIX_FMT_BGR8: - case PIX_FMT_RGB4_BYTE: - case PIX_FMT_BGR4_BYTE: - case PIX_FMT_GRAY8: - case PIX_FMT_PAL8: + case AV_PIX_FMT_RGB8: + case AV_PIX_FMT_BGR8: + case AV_PIX_FMT_RGB4_BYTE: + case AV_PIX_FMT_BGR4_BYTE: + case AV_PIX_FMT_GRAY8: + case AV_PIX_FMT_PAL8: avctx->bits_per_coded_sample = 8; break; - case PIX_FMT_MONOBLACK: + case AV_PIX_FMT_MONOBLACK: avctx->bits_per_coded_sample = 1; break; default: @@ -78,26 +78,26 @@ static int bmp_encode_frame(AVCodecContext *avctx, AVPacket *pkt, p->pict_type= AV_PICTURE_TYPE_I; p->key_frame= 1; switch (avctx->pix_fmt) { - case PIX_FMT_RGB444: + case AV_PIX_FMT_RGB444: compression = BMP_BITFIELDS; pal = rgb444_masks; // abuse pal to hold color masks pal_entries = 3; break; - case PIX_FMT_RGB565: + case AV_PIX_FMT_RGB565: compression = BMP_BITFIELDS; pal = rgb565_masks; // abuse pal to hold color masks pal_entries = 3; break; - case PIX_FMT_RGB8: - case PIX_FMT_BGR8: - case PIX_FMT_RGB4_BYTE: - case PIX_FMT_BGR4_BYTE: - case PIX_FMT_GRAY8: + case AV_PIX_FMT_RGB8: + case AV_PIX_FMT_BGR8: + case AV_PIX_FMT_RGB4_BYTE: + case AV_PIX_FMT_BGR4_BYTE: + case AV_PIX_FMT_GRAY8: ff_set_systematic_pal2((uint32_t*)p->data[1], avctx->pix_fmt); - case PIX_FMT_PAL8: + case AV_PIX_FMT_PAL8: pal = (uint32_t *)p->data[1]; break; - case PIX_FMT_MONOBLACK: + case AV_PIX_FMT_MONOBLACK: pal = monoblack_pal; break; } @@ -166,12 +166,12 @@ AVCodec ff_bmp_encoder = { .priv_data_size = sizeof(BMPContext), .init = bmp_encode_init, .encode2 = bmp_encode_frame, - .pix_fmts = (const enum PixelFormat[]){ - PIX_FMT_BGR24, - PIX_FMT_RGB555, PIX_FMT_RGB444, PIX_FMT_RGB565, - PIX_FMT_RGB8, PIX_FMT_BGR8, PIX_FMT_RGB4_BYTE, PIX_FMT_BGR4_BYTE, PIX_FMT_GRAY8, PIX_FMT_PAL8, - PIX_FMT_MONOBLACK, - PIX_FMT_NONE + .pix_fmts = (const enum AVPixelFormat[]){ + AV_PIX_FMT_BGR24, + AV_PIX_FMT_RGB555, AV_PIX_FMT_RGB444, AV_PIX_FMT_RGB565, + AV_PIX_FMT_RGB8, AV_PIX_FMT_BGR8, AV_PIX_FMT_RGB4_BYTE, AV_PIX_FMT_BGR4_BYTE, AV_PIX_FMT_GRAY8, AV_PIX_FMT_PAL8, + AV_PIX_FMT_MONOBLACK, + AV_PIX_FMT_NONE }, .long_name = NULL_IF_CONFIG_SMALL("BMP (Windows and OS/2 bitmap)"), }; |