[FFmpeg-devel] [PATCH 5/5] avcodec/bitpacked_enc: suppport for frame thread encode

lance.lmwang at gmail.com lance.lmwang at gmail.com
Tue Dec 7 15:22:33 EET 2021


On Wed, Dec 01, 2021 at 09:39:14PM +0800, lance.lmwang at gmail.com wrote:
> From: Limin Wang <lance.lmwang at gmail.com>
> 
> Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> ---
> multi-thread is active, but I'm not sure why the performance isn't getting better.

plan to push the patchset in the next two day unless there are objection. About
performance, it's caused by the testsrc is single thread in fact. After using
real input for testing, the multi-thread performance will be better.

> 
>  libavcodec/bitpacked_enc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/bitpacked_enc.c b/libavcodec/bitpacked_enc.c
> index 3e0ba00..6f540f1 100644
> --- a/libavcodec/bitpacked_enc.c
> +++ b/libavcodec/bitpacked_enc.c
> @@ -109,7 +109,7 @@ const AVCodec ff_bitpacked_encoder = {
>      .type           = AVMEDIA_TYPE_VIDEO,
>      .id             = AV_CODEC_ID_BITPACKED,
>      .priv_data_size = sizeof(struct BitpackedContext),
> -    .capabilities   = AV_CODEC_CAP_DR1,
> +    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
>      .init           = encode_init,
>      .encode2        = encode_frame,
>      .pix_fmts       = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV422P10,
> -- 
> 1.8.3.1
> 

-- 
Thanks,
Limin Wang


More information about the ffmpeg-devel mailing list