diff mbox series

[FFmpeg-devel,4/5] avcodec/rawenc: suppport frame thread for rawvideo

Message ID 1639012783-32766-4-git-send-email-lance.lmwang@gmail.com
State New
Headers show
Series [FFmpeg-devel,1/5] avformat/rtpdec_rfc4175: cosmetic changes | expand

Checks

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

Commit Message

Limin Wang Dec. 9, 2021, 1:19 a.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 libavcodec/rawenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Limin Wang Dec. 9, 2021, 2:08 a.m. UTC | #1
On Thu, Dec 09, 2021 at 09:19:42AM +0800, lance.lmwang@gmail.com wrote:
> From: Limin Wang <lance.lmwang@gmail.com>
> 
> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> ---
>  libavcodec/rawenc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/rawenc.c b/libavcodec/rawenc.c
> index 7e15084..561d992 100644
> --- a/libavcodec/rawenc.c
> +++ b/libavcodec/rawenc.c
> @@ -85,7 +85,7 @@ const AVCodec ff_rawvideo_encoder = {
>      .long_name      = NULL_IF_CONFIG_SMALL("raw video"),
>      .type           = AVMEDIA_TYPE_VIDEO,
>      .id             = AV_CODEC_ID_RAWVIDEO,
> -    .capabilities   = AV_CODEC_CAP_DR1,
> +    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
>      .init           = raw_encode_init,
>      .encode2        = raw_encode,
>      .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE,
> -- 
> 1.8.3.1
> 

In fact, I want to keep default thread to 1 which can keep same behavior as
before. I'm not sure where is better place to set it?  Or I had to change
some test case for rawvideo in fate to threads 1.
diff mbox series

Patch

diff --git a/libavcodec/rawenc.c b/libavcodec/rawenc.c
index 7e15084..561d992 100644
--- a/libavcodec/rawenc.c
+++ b/libavcodec/rawenc.c
@@ -85,7 +85,7 @@  const AVCodec ff_rawvideo_encoder = {
     .long_name      = NULL_IF_CONFIG_SMALL("raw video"),
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_RAWVIDEO,
-    .capabilities   = AV_CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
     .init           = raw_encode_init,
     .encode2        = raw_encode,
     .caps_internal  = FF_CODEC_CAP_INIT_THREADSAFE,