summaryrefslogtreecommitdiff
path: root/libavcodec/pnmenc.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/pnmenc.c
parent78071a1420b425dfb787ac739048f523007b8139 (diff)
downloadffmpeg-716d413c13981da15323c7a3821860536eefdbbb.tar.gz
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
Diffstat (limited to 'libavcodec/pnmenc.c')
-rw-r--r--libavcodec/pnmenc.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/libavcodec/pnmenc.c b/libavcodec/pnmenc.c
index b4194b68c8..2863db7566 100644
--- a/libavcodec/pnmenc.c
+++ b/libavcodec/pnmenc.c
@@ -51,27 +51,27 @@ static int pnm_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
h = avctx->height;
h1 = h;
switch (avctx->pix_fmt) {
- case PIX_FMT_MONOWHITE:
+ case AV_PIX_FMT_MONOWHITE:
c = '4';
n = (avctx->width + 7) >> 3;
break;
- case PIX_FMT_GRAY8:
+ case AV_PIX_FMT_GRAY8:
c = '5';
n = avctx->width;
break;
- case PIX_FMT_GRAY16BE:
+ case AV_PIX_FMT_GRAY16BE:
c = '5';
n = avctx->width * 2;
break;
- case PIX_FMT_RGB24:
+ case AV_PIX_FMT_RGB24:
c = '6';
n = avctx->width * 3;
break;
- case PIX_FMT_RGB48BE:
+ case AV_PIX_FMT_RGB48BE:
c = '6';
n = avctx->width * 6;
break;
- case PIX_FMT_YUV420P:
+ case AV_PIX_FMT_YUV420P:
c = '5';
n = avctx->width;
h1 = (h * 3) / 2;
@@ -82,9 +82,9 @@ static int pnm_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
snprintf(s->bytestream, s->bytestream_end - s->bytestream,
"P%c\n%d %d\n", c, avctx->width, h1);
s->bytestream += strlen(s->bytestream);
- if (avctx->pix_fmt != PIX_FMT_MONOWHITE) {
+ if (avctx->pix_fmt != AV_PIX_FMT_MONOWHITE) {
snprintf(s->bytestream, s->bytestream_end - s->bytestream,
- "%d\n", (avctx->pix_fmt != PIX_FMT_GRAY16BE && avctx->pix_fmt != PIX_FMT_RGB48BE) ? 255 : 65535);
+ "%d\n", (avctx->pix_fmt != AV_PIX_FMT_GRAY16BE && avctx->pix_fmt != AV_PIX_FMT_RGB48BE) ? 255 : 65535);
s->bytestream += strlen(s->bytestream);
}
@@ -96,7 +96,7 @@ static int pnm_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
ptr += linesize;
}
- if (avctx->pix_fmt == PIX_FMT_YUV420P) {
+ if (avctx->pix_fmt == AV_PIX_FMT_YUV420P) {
h >>= 1;
n >>= 1;
ptr1 = p->data[1];
@@ -126,8 +126,8 @@ AVCodec ff_pgm_encoder = {
.priv_data_size = sizeof(PNMContext),
.init = ff_pnm_init,
.encode2 = pnm_encode_frame,
- .pix_fmts = (const enum PixelFormat[]){
- PIX_FMT_GRAY8, PIX_FMT_GRAY16BE, PIX_FMT_NONE
+ .pix_fmts = (const enum AVPixelFormat[]){
+ AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY16BE, AV_PIX_FMT_NONE
},
.long_name = NULL_IF_CONFIG_SMALL("PGM (Portable GrayMap) image"),
};
@@ -141,7 +141,7 @@ AVCodec ff_pgmyuv_encoder = {
.priv_data_size = sizeof(PNMContext),
.init = ff_pnm_init,
.encode2 = pnm_encode_frame,
- .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV420P, PIX_FMT_NONE },
+ .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
.long_name = NULL_IF_CONFIG_SMALL("PGMYUV (Portable GrayMap YUV) image"),
};
#endif
@@ -154,8 +154,8 @@ AVCodec ff_ppm_encoder = {
.priv_data_size = sizeof(PNMContext),
.init = ff_pnm_init,
.encode2 = pnm_encode_frame,
- .pix_fmts = (const enum PixelFormat[]){
- PIX_FMT_RGB24, PIX_FMT_RGB48BE, PIX_FMT_NONE
+ .pix_fmts = (const enum AVPixelFormat[]){
+ AV_PIX_FMT_RGB24, AV_PIX_FMT_RGB48BE, AV_PIX_FMT_NONE
},
.long_name = NULL_IF_CONFIG_SMALL("PPM (Portable PixelMap) image"),
};
@@ -169,8 +169,8 @@ AVCodec ff_pbm_encoder = {
.priv_data_size = sizeof(PNMContext),
.init = ff_pnm_init,
.encode2 = pnm_encode_frame,
- .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_MONOWHITE,
- PIX_FMT_NONE },
+ .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_MONOWHITE,
+ AV_PIX_FMT_NONE },
.long_name = NULL_IF_CONFIG_SMALL("PBM (Portable BitMap) image"),
};
#endif