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>
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
Reference in New Issue
Block a user