diff mbox series

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

Message ID 1638365954-29420-5-git-send-email-lance.lmwang@gmail.com
State Accepted
Commit b9f4c1231f8f07d8e62114b6d14f6aa064d19f43
Headers show
Series [FFmpeg-devel,1/5] avformat/rtsp: make use of avio_get_str() to load the sdp | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Limin Wang Dec. 1, 2021, 1:39 p.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
multi-thread is active, but I'm not sure why the performance isn't getting better.

 libavcodec/bitpacked_enc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Limin Wang Dec. 7, 2021, 1:22 p.m. UTC | #1
On Wed, Dec 01, 2021 at 09:39:14PM +0800, lance.lmwang@gmail.com wrote:
> From: Limin Wang <lance.lmwang@gmail.com>
> 
> Signed-off-by: Limin Wang <lance.lmwang@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
>
diff mbox series

Patch

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,