[Libav-user] How to speed up h264 decoding

朱伟滔 15018405735 at 163.com
Mon Sep 19 08:44:18 EEST 2016


Hi,Sorry to trouble you,
I want to know about speed up decoding h264,

AVCodec* codec = avcodec_find_decoder(AV_CODEC_ID_H264);
AVCodecContext* ctx = avcodec_alloc_context3(codec);
ctx->thread_count = 3;
ctx->pix_fmt = AV_PIX_FMT_YUV420P;
ctx->codec_type = AVMEDIA_TYPE_VIDEO;
AVDictionary * opts = NULL;
av_dict_set(&opts, "threads", "auto", 0);
ret = avcodec_open2(zh->avContext,zh->avCodec,&opts);

am I right?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20160919/50bcaecb/attachment.html>


More information about the Libav-user mailing list