diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-05-12 15:41:49 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-05-15 07:46:51 +0200 |
commit | e6c4ac7b5f038be56dfbb0171f5dd0cb850d9b28 (patch) | |
tree | f9d632e93ffd3b2fb7973da19bf1af63b1e33889 /libavcodec | |
parent | 7c57a582a03fb473091a88737ab92b9f2a5bb87a (diff) | |
download | ffmpeg-e6c4ac7b5f038be56dfbb0171f5dd0cb850d9b28.tar.gz |
pixdesc: rename PIX_FMT_* flags to AV_PIX_FMT_FLAG_*
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/avpicture.c | 4 | ||||
-rw-r--r-- | libavcodec/ffv1dec.c | 2 | ||||
-rw-r--r-- | libavcodec/ffv1enc.c | 2 | ||||
-rw-r--r-- | libavcodec/imgconvert.c | 12 | ||||
-rw-r--r-- | libavcodec/pnm.c | 2 | ||||
-rw-r--r-- | libavcodec/rawdec.c | 6 | ||||
-rw-r--r-- | libavcodec/tiffenc.c | 4 | ||||
-rw-r--r-- | libavcodec/utils.c | 4 | ||||
-rw-r--r-- | libavcodec/xwdenc.c | 2 |
9 files changed, 19 insertions, 19 deletions
diff --git a/libavcodec/avpicture.c b/libavcodec/avpicture.c index 259fd8e690..a50bbc497f 100644 --- a/libavcodec/avpicture.c +++ b/libavcodec/avpicture.c @@ -75,7 +75,7 @@ int avpicture_layout(const AVPicture* src, enum AVPixelFormat pix_fmt, } } - if (desc->flags & PIX_FMT_PAL) + if (desc->flags & AV_PIX_FMT_FLAG_PAL) memcpy((unsigned char *)(((size_t)dest + 3) & ~3), src->data[1], 256 * 4); @@ -92,7 +92,7 @@ int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height) return AVERROR(EINVAL); if ((ret = av_image_check_size(width, height, 0, NULL)) < 0) return ret; - if (desc->flags & PIX_FMT_PSEUDOPAL) + if (desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL) // do not include palette for these pseudo-paletted formats return width * height; return avpicture_fill(&dummy_pict, NULL, pix_fmt, width, height); diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index c4f73c726e..499407ead2 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -335,7 +335,7 @@ static int decode_slice(AVCodecContext *c, void *arg) FFV1Context *fs = *(void **)arg; FFV1Context *f = fs->avctx->priv_data; int width, height, x, y, ret; - const int ps = (av_pix_fmt_desc_get(c->pix_fmt)->flags & PIX_FMT_PLANAR) + const int ps = (av_pix_fmt_desc_get(c->pix_fmt)->flags & AV_PIX_FMT_FLAG_PLANAR) ? (c->bits_per_raw_sample > 8) + 1 : 4; AVFrame *const p = f->cur; diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c index b7a2b22e1e..b0c79b932f 100644 --- a/libavcodec/ffv1enc.c +++ b/libavcodec/ffv1enc.c @@ -875,7 +875,7 @@ static int encode_slice(AVCodecContext *c, void *arg) int x = fs->slice_x; int y = fs->slice_y; AVFrame *const p = &f->picture; - const int ps = (av_pix_fmt_desc_get(c->pix_fmt)->flags & PIX_FMT_PLANAR) + const int ps = (av_pix_fmt_desc_get(c->pix_fmt)->flags & AV_PIX_FMT_FLAG_PLANAR) ? (f->bits_per_raw_sample > 8) + 1 : 4; diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c index 52a6e3f54e..4eb049f1a9 100644 --- a/libavcodec/imgconvert.c +++ b/libavcodec/imgconvert.c @@ -60,7 +60,7 @@ void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int static int is_gray(const AVPixFmtDescriptor *desc) { - return desc->nb_components - (desc->flags & PIX_FMT_ALPHA) == 1; + return desc->nb_components - (desc->flags & AV_PIX_FMT_FLAG_ALPHA) == 1; } int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, @@ -86,11 +86,11 @@ int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, dst_desc->log2_chroma_h > src_desc->log2_chroma_h) loss |= FF_LOSS_RESOLUTION; - if ((src_desc->flags & PIX_FMT_RGB) != (dst_desc->flags & PIX_FMT_RGB)) + if ((src_desc->flags & AV_PIX_FMT_FLAG_RGB) != (dst_desc->flags & AV_PIX_FMT_FLAG_RGB)) loss |= FF_LOSS_COLORSPACE; - if (has_alpha && !(dst_desc->flags & PIX_FMT_ALPHA) && - (dst_desc->flags & PIX_FMT_ALPHA)) + if (has_alpha && !(dst_desc->flags & AV_PIX_FMT_FLAG_ALPHA) && + (dst_desc->flags & AV_PIX_FMT_FLAG_ALPHA)) loss |= FF_LOSS_ALPHA; if (dst_pix_fmt == AV_PIX_FMT_PAL8 && !is_gray(src_desc)) @@ -260,8 +260,8 @@ void ff_shrink88(uint8_t *dst, int dst_wrap, /* return true if yuv planar */ static inline int is_yuv_planar(const AVPixFmtDescriptor *desc) { - return (!(desc->flags & PIX_FMT_RGB) && - (desc->flags & PIX_FMT_PLANAR)); + return (!(desc->flags & AV_PIX_FMT_FLAG_RGB) && + (desc->flags & AV_PIX_FMT_FLAG_PLANAR)); } int av_picture_crop(AVPicture *dst, const AVPicture *src, diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c index 9d7c68dc64..eea30e8621 100644 --- a/libavcodec/pnm.c +++ b/libavcodec/pnm.c @@ -173,7 +173,7 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) }else s->maxval=1; /* more check if YUV420 */ - if (av_pix_fmt_desc_get(avctx->pix_fmt)->flags & PIX_FMT_PLANAR) { + if (av_pix_fmt_desc_get(avctx->pix_fmt)->flags & AV_PIX_FMT_FLAG_PLANAR) { if ((avctx->width & 1) != 0) return AVERROR_INVALIDDATA; h = (avctx->height * 2); diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c index 0a76e4d383..66265ced50 100644 --- a/libavcodec/rawdec.c +++ b/libavcodec/rawdec.c @@ -98,11 +98,11 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx) return AVERROR(EINVAL); } - if (desc->flags & (PIX_FMT_PAL | PIX_FMT_PSEUDOPAL)) { + if (desc->flags & (AV_PIX_FMT_FLAG_PAL | AV_PIX_FMT_FLAG_PSEUDOPAL)) { context->palette = av_buffer_alloc(AVPALETTE_SIZE); if (!context->palette) return AVERROR(ENOMEM); - if (desc->flags & PIX_FMT_PSEUDOPAL) + if (desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL) avpriv_set_systematic_pal2((uint32_t*)context->palette->data, avctx->pix_fmt); else memset(context->palette->data, 0, AVPALETTE_SIZE); @@ -210,7 +210,7 @@ static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame, } if ((avctx->pix_fmt == AV_PIX_FMT_PAL8 && buf_size < context->frame_size) || - (desc->flags & PIX_FMT_PSEUDOPAL)) { + (desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL)) { frame->buf[1] = av_buffer_ref(context->palette); if (!frame->buf[1]) return AVERROR(ENOMEM); diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c index 8162c407d6..fc777ebae7 100644 --- a/libavcodec/tiffenc.c +++ b/libavcodec/tiffenc.c @@ -242,9 +242,9 @@ static int encode_frame(AVCodecContext * avctx, AVPacket *pkt, case AV_PIX_FMT_PAL8: pfd = av_pix_fmt_desc_get(avctx->pix_fmt); s->bpp = av_get_bits_per_pixel(pfd); - if (pfd->flags & PIX_FMT_PAL) { + if (pfd->flags & AV_PIX_FMT_FLAG_PAL) { s->photometric_interpretation = 3; - } else if (pfd->flags & PIX_FMT_RGB) { + } else if (pfd->flags & AV_PIX_FMT_FLAG_RGB) { s->photometric_interpretation = 2; } else { s->photometric_interpretation = 1; diff --git a/libavcodec/utils.c b/libavcodec/utils.c index e2e12e27f3..c54af670e4 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -663,7 +663,7 @@ do { \ planes = av_pix_fmt_count_planes(frame->format); /* workaround for AVHWAccel plane count of 0, buf[0] is used as check for allocated buffers: make libavcodec happy */ - if (desc && desc->flags & PIX_FMT_HWACCEL) + if (desc && desc->flags & AV_PIX_FMT_FLAG_HWACCEL) planes = 1; if (!desc || planes <= 0) { ret = AVERROR(EINVAL); @@ -793,7 +793,7 @@ int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, static int is_hwaccel_pix_fmt(enum AVPixelFormat pix_fmt) { const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); - return desc->flags & PIX_FMT_HWACCEL; + return desc->flags & AV_PIX_FMT_FLAG_HWACCEL; } enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat *fmt) diff --git a/libavcodec/xwdenc.c b/libavcodec/xwdenc.c index c9a2a5628f..c10146384b 100644 --- a/libavcodec/xwdenc.c +++ b/libavcodec/xwdenc.c @@ -51,7 +51,7 @@ static int xwd_encode_frame(AVCodecContext *avctx, AVPacket *pkt, uint8_t *ptr, *buf; pixdepth = av_get_bits_per_pixel(desc); - if (desc->flags & PIX_FMT_BE) + if (desc->flags & AV_PIX_FMT_FLAG_BE) be = 1; switch (pix_fmt) { case AV_PIX_FMT_ARGB: |