diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-14 11:22:40 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-14 11:59:20 +0100 |
commit | e13d5e9a4b5b4de065b00b1caea850cd47fd4b18 (patch) | |
tree | 13bf2f01763823c4e4da6374acadc95b3f8bc121 /libavcodec/utils.c | |
parent | 26afdbcfc0ecd646c6d829b781e0a53d6b289186 (diff) | |
parent | 5e9c6ef8f3beb9ed7b271654a82349ac90fe43f2 (diff) | |
download | ffmpeg-streaming-e13d5e9a4b5b4de065b00b1caea850cd47fd4b18.zip ffmpeg-streaming-e13d5e9a4b5b4de065b00b1caea850cd47fd4b18.tar.gz |
Merge commit '5e9c6ef8f3beb9ed7b271654a82349ac90fe43f2'
* commit '5e9c6ef8f3beb9ed7b271654a82349ac90fe43f2':
x86: h264_weight_10bit: port to cpuflags
libtheoraenc: add missing pixdesc.h header
avcodec: remove ff_is_hwaccel_pix_fmt
pixdesc: add av_pix_fmt_get_chroma_sub_sample
hlsenc: stand alone hls segmenter
Conflicts:
doc/muxers.texi
libavcodec/ffv1enc.c
libavcodec/imgconvert.c
libavcodec/mpegvideo_enc.c
libavcodec/tiffenc.c
libavformat/Makefile
libavformat/allformats.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 0d3cb81..364ce0f 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -491,7 +491,8 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic) const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->pix_fmt); const int pixel_size = desc->comp[0].step_minus1 + 1; - avcodec_get_chroma_sub_sample(s->pix_fmt, &h_chroma_shift, &v_chroma_shift); + av_pix_fmt_get_chroma_sub_sample(s->pix_fmt, &h_chroma_shift, + &v_chroma_shift); avcodec_align_dimensions2(s, &w, &h, stride_align); @@ -689,9 +690,15 @@ int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, return 0; } +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; +} + enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat *fmt) { - while (*fmt != AV_PIX_FMT_NONE && ff_is_hwaccel_pix_fmt(*fmt)) + while (*fmt != AV_PIX_FMT_NONE && is_hwaccel_pix_fmt(*fmt)) ++fmt; return fmt[0]; } |