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/jpeglsenc.c | |
parent | 78071a1420b425dfb787ac739048f523007b8139 (diff) | |
download | ffmpeg-716d413c13981da15323c7a3821860536eefdbbb.tar.gz |
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
Diffstat (limited to 'libavcodec/jpeglsenc.c')
-rw-r--r-- | libavcodec/jpeglsenc.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/libavcodec/jpeglsenc.c b/libavcodec/jpeglsenc.c index 15e0d111ec..fea2a5baef 100644 --- a/libavcodec/jpeglsenc.c +++ b/libavcodec/jpeglsenc.c @@ -244,7 +244,7 @@ static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt, p->pict_type= AV_PICTURE_TYPE_I; p->key_frame= 1; - if(avctx->pix_fmt == PIX_FMT_GRAY8 || avctx->pix_fmt == PIX_FMT_GRAY16) + if(avctx->pix_fmt == AV_PIX_FMT_GRAY8 || avctx->pix_fmt == AV_PIX_FMT_GRAY16) comps = 1; else comps = 3; @@ -264,7 +264,7 @@ static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt, put_marker(&pb, SOI); put_marker(&pb, SOF48); put_bits(&pb, 16, 8 + comps * 3); // header size depends on components - put_bits(&pb, 8, (avctx->pix_fmt == PIX_FMT_GRAY16) ? 16 : 8); // bpp + put_bits(&pb, 8, (avctx->pix_fmt == AV_PIX_FMT_GRAY16) ? 16 : 8); // bpp put_bits(&pb, 16, avctx->height); put_bits(&pb, 16, avctx->width); put_bits(&pb, 8, comps); // components @@ -288,7 +288,7 @@ static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt, state = av_mallocz(sizeof(JLSState)); /* initialize JPEG-LS state from JPEG parameters */ state->near = near; - state->bpp = (avctx->pix_fmt == PIX_FMT_GRAY16) ? 16 : 8; + state->bpp = (avctx->pix_fmt == AV_PIX_FMT_GRAY16) ? 16 : 8; ff_jpegls_reset_coding_parameters(state, 0); ff_jpegls_init_state(state); @@ -297,7 +297,7 @@ static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt, zero = av_mallocz(p->linesize[0]); last = zero; cur = p->data[0]; - if(avctx->pix_fmt == PIX_FMT_GRAY8){ + if(avctx->pix_fmt == AV_PIX_FMT_GRAY8){ int t = 0; for(i = 0; i < avctx->height; i++) { @@ -306,7 +306,7 @@ static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt, last = cur; cur += p->linesize[0]; } - }else if(avctx->pix_fmt == PIX_FMT_GRAY16){ + }else if(avctx->pix_fmt == AV_PIX_FMT_GRAY16){ int t = 0; for(i = 0; i < avctx->height; i++) { @@ -315,7 +315,7 @@ static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt, last = cur; cur += p->linesize[0]; } - }else if(avctx->pix_fmt == PIX_FMT_RGB24){ + }else if(avctx->pix_fmt == AV_PIX_FMT_RGB24){ int j, width; int Rc[3] = {0, 0, 0}; @@ -328,7 +328,7 @@ static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt, last = cur; cur += s->picture.linesize[0]; } - }else if(avctx->pix_fmt == PIX_FMT_BGR24){ + }else if(avctx->pix_fmt == AV_PIX_FMT_BGR24){ int j, width; int Rc[3] = {0, 0, 0}; @@ -385,7 +385,7 @@ static av_cold int encode_init_ls(AVCodecContext *ctx) { c->avctx = ctx; ctx->coded_frame = &c->picture; - if(ctx->pix_fmt != PIX_FMT_GRAY8 && ctx->pix_fmt != PIX_FMT_GRAY16 && ctx->pix_fmt != PIX_FMT_RGB24 && ctx->pix_fmt != PIX_FMT_BGR24){ + if(ctx->pix_fmt != AV_PIX_FMT_GRAY8 && ctx->pix_fmt != AV_PIX_FMT_GRAY16 && ctx->pix_fmt != AV_PIX_FMT_RGB24 && ctx->pix_fmt != AV_PIX_FMT_BGR24){ av_log(ctx, AV_LOG_ERROR, "Only grayscale and RGB24/BGR24 images are supported\n"); return -1; } @@ -399,9 +399,9 @@ AVCodec ff_jpegls_encoder = { //FIXME avoid MPV_* lossless JPEG should not need .priv_data_size = sizeof(JpeglsContext), .init = encode_init_ls, .encode2 = encode_picture_ls, - .pix_fmts = (const enum PixelFormat[]){ - PIX_FMT_BGR24, PIX_FMT_RGB24, PIX_FMT_GRAY8, PIX_FMT_GRAY16, - PIX_FMT_NONE + .pix_fmts = (const enum AVPixelFormat[]){ + AV_PIX_FMT_BGR24, AV_PIX_FMT_RGB24, AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY16, + AV_PIX_FMT_NONE }, .long_name = NULL_IF_CONFIG_SMALL("JPEG-LS"), }; |