diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-08 20:54:00 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-08 21:06:57 +0200 |
commit | ac627b3d38d370027406c93c2dcaac0b1712a7d4 (patch) | |
tree | d2d1f39e96a75d864681349c4fbd37692e558683 /libavcodec/utils.c | |
parent | 89715a3cf187c271f7cf4c230b23cd6f6d638e32 (diff) | |
parent | 716d413c13981da15323c7a3821860536eefdbbb (diff) | |
download | ffmpeg-ac627b3d38d370027406c93c2dcaac0b1712a7d4.tar.gz |
Merge commit '716d413c13981da15323c7a3821860536eefdbbb'
* commit '716d413c13981da15323c7a3821860536eefdbbb':
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
Conflicts:
doc/examples/muxing.c
ffmpeg.h
ffmpeg_filter.c
ffmpeg_opt.c
ffplay.c
ffprobe.c
libavcodec/8bps.c
libavcodec/aasc.c
libavcodec/aura.c
libavcodec/avcodec.h
libavcodec/avs.c
libavcodec/bfi.c
libavcodec/bmp.c
libavcodec/bmpenc.c
libavcodec/c93.c
libavcodec/cscd.c
libavcodec/cyuv.c
libavcodec/dpx.c
libavcodec/dpxenc.c
libavcodec/eatgv.c
libavcodec/escape124.c
libavcodec/ffv1.c
libavcodec/flashsv.c
libavcodec/fraps.c
libavcodec/h264.c
libavcodec/huffyuv.c
libavcodec/iff.c
libavcodec/imgconvert.c
libavcodec/indeo3.c
libavcodec/kmvc.c
libavcodec/libopenjpegdec.c
libavcodec/libopenjpegenc.c
libavcodec/libx264.c
libavcodec/ljpegenc.c
libavcodec/mjpegdec.c
libavcodec/mjpegenc.c
libavcodec/motionpixels.c
libavcodec/mpeg12.c
libavcodec/mpeg12enc.c
libavcodec/mpeg4videodec.c
libavcodec/mpegvideo_enc.c
libavcodec/pamenc.c
libavcodec/pcxenc.c
libavcodec/pgssubdec.c
libavcodec/pngdec.c
libavcodec/pngenc.c
libavcodec/pnm.c
libavcodec/pnmdec.c
libavcodec/pnmenc.c
libavcodec/ptx.c
libavcodec/qdrw.c
libavcodec/qpeg.c
libavcodec/qtrleenc.c
libavcodec/raw.c
libavcodec/rawdec.c
libavcodec/rl2.c
libavcodec/sgidec.c
libavcodec/sgienc.c
libavcodec/snowdec.c
libavcodec/snowenc.c
libavcodec/sunrast.c
libavcodec/targa.c
libavcodec/targaenc.c
libavcodec/tiff.c
libavcodec/tiffenc.c
libavcodec/tmv.c
libavcodec/truemotion2.c
libavcodec/utils.c
libavcodec/vb.c
libavcodec/vp3.c
libavcodec/wnv1.c
libavcodec/xl.c
libavcodec/xwddec.c
libavcodec/xwdenc.c
libavcodec/yop.c
libavdevice/v4l2.c
libavdevice/x11grab.c
libavfilter/avfilter.c
libavfilter/avfilter.h
libavfilter/buffersrc.c
libavfilter/drawutils.c
libavfilter/formats.c
libavfilter/src_movie.c
libavfilter/vf_ass.c
libavfilter/vf_drawtext.c
libavfilter/vf_fade.c
libavfilter/vf_format.c
libavfilter/vf_hflip.c
libavfilter/vf_lut.c
libavfilter/vf_overlay.c
libavfilter/vf_pad.c
libavfilter/vf_scale.c
libavfilter/vf_transpose.c
libavfilter/vf_yadif.c
libavfilter/video.c
libavfilter/vsrc_testsrc.c
libavformat/movenc.c
libavformat/mxf.h
libavformat/utils.c
libavformat/yuv4mpeg.c
libavutil/imgutils.c
libavutil/pixdesc.c
libswscale/input.c
libswscale/output.c
libswscale/swscale_internal.h
libswscale/swscale_unscaled.c
libswscale/utils.c
libswscale/x86/swscale_template.c
libswscale/x86/yuv2rgb.c
libswscale/x86/yuv2rgb_template.c
libswscale/yuv2rgb.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 128 |
1 files changed, 64 insertions, 64 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index be86fa0a6f..97d48cd1c3 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -184,82 +184,82 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, int h_align = 1; switch (s->pix_fmt) { - case PIX_FMT_YUV420P: - case PIX_FMT_YUYV422: - case PIX_FMT_UYVY422: - case PIX_FMT_YUV422P: - case PIX_FMT_YUV440P: - case PIX_FMT_YUV444P: - case PIX_FMT_GBRP: - case PIX_FMT_GRAY8: - case PIX_FMT_GRAY16BE: - case PIX_FMT_GRAY16LE: - case PIX_FMT_YUVJ420P: - case PIX_FMT_YUVJ422P: - case PIX_FMT_YUVJ440P: - case PIX_FMT_YUVJ444P: - case PIX_FMT_YUVA420P: - case PIX_FMT_YUVA422P: - case PIX_FMT_YUVA444P: - case PIX_FMT_YUV420P9LE: - case PIX_FMT_YUV420P9BE: - case PIX_FMT_YUV420P10LE: - case PIX_FMT_YUV420P10BE: - case PIX_FMT_YUV420P12LE: - case PIX_FMT_YUV420P12BE: - case PIX_FMT_YUV420P14LE: - case PIX_FMT_YUV420P14BE: - case PIX_FMT_YUV422P9LE: - case PIX_FMT_YUV422P9BE: - case PIX_FMT_YUV422P10LE: - case PIX_FMT_YUV422P10BE: - case PIX_FMT_YUV422P12LE: - case PIX_FMT_YUV422P12BE: - case PIX_FMT_YUV422P14LE: - case PIX_FMT_YUV422P14BE: - case PIX_FMT_YUV444P9LE: - case PIX_FMT_YUV444P9BE: - case PIX_FMT_YUV444P10LE: - case PIX_FMT_YUV444P10BE: - case PIX_FMT_YUV444P12LE: - case PIX_FMT_YUV444P12BE: - case PIX_FMT_YUV444P14LE: - case PIX_FMT_YUV444P14BE: - case PIX_FMT_GBRP9LE: - case PIX_FMT_GBRP9BE: - case PIX_FMT_GBRP10LE: - case PIX_FMT_GBRP10BE: - case PIX_FMT_GBRP12LE: - case PIX_FMT_GBRP12BE: - case PIX_FMT_GBRP14LE: - case PIX_FMT_GBRP14BE: + case AV_PIX_FMT_YUV420P: + case AV_PIX_FMT_YUYV422: + case AV_PIX_FMT_UYVY422: + case AV_PIX_FMT_YUV422P: + case AV_PIX_FMT_YUV440P: + case AV_PIX_FMT_YUV444P: + case AV_PIX_FMT_GBRP: + case AV_PIX_FMT_GRAY8: + case AV_PIX_FMT_GRAY16BE: + case AV_PIX_FMT_GRAY16LE: + case AV_PIX_FMT_YUVJ420P: + case AV_PIX_FMT_YUVJ422P: + case AV_PIX_FMT_YUVJ440P: + case AV_PIX_FMT_YUVJ444P: + case AV_PIX_FMT_YUVA420P: + case AV_PIX_FMT_YUVA422P: + case AV_PIX_FMT_YUVA444P: + case AV_PIX_FMT_YUV420P9LE: + case AV_PIX_FMT_YUV420P9BE: + case AV_PIX_FMT_YUV420P10LE: + case AV_PIX_FMT_YUV420P10BE: + case AV_PIX_FMT_YUV420P12LE: + case AV_PIX_FMT_YUV420P12BE: + case AV_PIX_FMT_YUV420P14LE: + case AV_PIX_FMT_YUV420P14BE: + case AV_PIX_FMT_YUV422P9LE: + case AV_PIX_FMT_YUV422P9BE: + case AV_PIX_FMT_YUV422P10LE: + case AV_PIX_FMT_YUV422P10BE: + case AV_PIX_FMT_YUV422P12LE: + case AV_PIX_FMT_YUV422P12BE: + case AV_PIX_FMT_YUV422P14LE: + case AV_PIX_FMT_YUV422P14BE: + case AV_PIX_FMT_YUV444P9LE: + case AV_PIX_FMT_YUV444P9BE: + case AV_PIX_FMT_YUV444P10LE: + case AV_PIX_FMT_YUV444P10BE: + case AV_PIX_FMT_YUV444P12LE: + case AV_PIX_FMT_YUV444P12BE: + case AV_PIX_FMT_YUV444P14LE: + case AV_PIX_FMT_YUV444P14BE: + case AV_PIX_FMT_GBRP9LE: + case AV_PIX_FMT_GBRP9BE: + case AV_PIX_FMT_GBRP10LE: + case AV_PIX_FMT_GBRP10BE: + case AV_PIX_FMT_GBRP12LE: + case AV_PIX_FMT_GBRP12BE: + case AV_PIX_FMT_GBRP14LE: + case AV_PIX_FMT_GBRP14BE: w_align = 16; //FIXME assume 16 pixel per macroblock h_align = 16 * 2; // interlaced needs 2 macroblocks height break; - case PIX_FMT_YUV411P: - case PIX_FMT_UYYVYY411: + case AV_PIX_FMT_YUV411P: + case AV_PIX_FMT_UYYVYY411: w_align = 32; h_align = 8; break; - case PIX_FMT_YUV410P: + case AV_PIX_FMT_YUV410P: if (s->codec_id == AV_CODEC_ID_SVQ1) { w_align = 64; h_align = 64; } - case PIX_FMT_RGB555: + case AV_PIX_FMT_RGB555: if (s->codec_id == AV_CODEC_ID_RPZA) { w_align = 4; h_align = 4; } - case PIX_FMT_PAL8: - case PIX_FMT_BGR8: - case PIX_FMT_RGB8: + case AV_PIX_FMT_PAL8: + case AV_PIX_FMT_BGR8: + case AV_PIX_FMT_RGB8: if (s->codec_id == AV_CODEC_ID_SMC) { w_align = 4; h_align = 4; } break; - case PIX_FMT_BGR24: + case AV_PIX_FMT_BGR24: if ((s->codec_id == AV_CODEC_ID_MSZH) || (s->codec_id == AV_CODEC_ID_ZLIB)) { w_align = 4; @@ -686,9 +686,9 @@ int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, return 0; } -enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum PixelFormat *fmt) +enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat *fmt) { - while (*fmt != PIX_FMT_NONE && ff_is_hwaccel_pix_fmt(*fmt)) + while (*fmt != AV_PIX_FMT_NONE && ff_is_hwaccel_pix_fmt(*fmt)) ++fmt; return fmt[0]; } @@ -964,10 +964,10 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code } } if (avctx->codec->pix_fmts) { - for (i = 0; avctx->codec->pix_fmts[i] != PIX_FMT_NONE; i++) + for (i = 0; avctx->codec->pix_fmts[i] != AV_PIX_FMT_NONE; i++) if (avctx->pix_fmt == avctx->codec->pix_fmts[i]) break; - if (avctx->codec->pix_fmts[i] == PIX_FMT_NONE + if (avctx->codec->pix_fmts[i] == AV_PIX_FMT_NONE && !((avctx->codec_id == AV_CODEC_ID_MJPEG || avctx->codec_id == AV_CODEC_ID_LJPEG) && avctx->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL)) { av_log(avctx, AV_LOG_ERROR, "Specified pix_fmt is not supported\n"); @@ -1585,7 +1585,7 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi if (!picture->sample_aspect_ratio.num) picture->sample_aspect_ratio = avctx->sample_aspect_ratio; if (!picture->width) picture->width = avctx->width; if (!picture->height) picture->height = avctx->height; - if (picture->format == PIX_FMT_NONE) picture->format = avctx->pix_fmt; + if (picture->format == AV_PIX_FMT_NONE) picture->format = avctx->pix_fmt; } emms_c(); //needed to avoid an emms_c() call before every return; @@ -2002,7 +2002,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) switch (enc->codec_type) { case AVMEDIA_TYPE_VIDEO: - if (enc->pix_fmt != PIX_FMT_NONE) { + if (enc->pix_fmt != AV_PIX_FMT_NONE) { snprintf(buf + strlen(buf), buf_size - strlen(buf), ", %s", av_get_pix_fmt_name(enc->pix_fmt)); @@ -2468,7 +2468,7 @@ AVHWAccel *av_hwaccel_next(AVHWAccel *hwaccel) return hwaccel ? hwaccel->next : first_hwaccel; } -AVHWAccel *ff_find_hwaccel(enum AVCodecID codec_id, enum PixelFormat pix_fmt) +AVHWAccel *ff_find_hwaccel(enum AVCodecID codec_id, enum AVPixelFormat pix_fmt) { AVHWAccel *hwaccel = NULL; |