diff mbox series

[FFmpeg-devel] avcodec/decode: stop trying to initialize palette values in avcodec_default_get_buffer2()

Message ID 20210502175934.54111-1-jamrial@gmail.com
State Accepted
Commit 3575a495f6dcc395656343380e13c57d48b9f976
Headers show
Series [FFmpeg-devel] avcodec/decode: stop trying to initialize palette values in avcodec_default_get_buffer2() | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

James Almer May 2, 2021, 5:59 p.m. UTC
avpriv_set_systematic_pal2() is meant to fill fixed vales for formats that
until recently were marked as "pseudo pal". It's not being called for them
anymore in here, and it's a no-op when used on real PAL formats.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/decode.c | 2 --
 1 file changed, 2 deletions(-)

Comments

James Almer May 5, 2021, 3:08 p.m. UTC | #1
On 5/2/2021 2:59 PM, James Almer wrote:
> avpriv_set_systematic_pal2() is meant to fill fixed vales for formats that
> until recently were marked as "pseudo pal". It's not being called for them
> anymore in here, and it's a no-op when used on real PAL formats.
> 
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
>   libavcodec/decode.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/libavcodec/decode.c b/libavcodec/decode.c
> index cd98c98a97..75bc7ad98e 100644
> --- a/libavcodec/decode.c
> +++ b/libavcodec/decode.c
> @@ -1425,8 +1425,6 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic)
>           pic->data[i] = NULL;
>           pic->linesize[i] = 0;
>       }
> -    if (desc->flags & AV_PIX_FMT_FLAG_PAL)
> -        avpriv_set_systematic_pal2((uint32_t *)pic->data[1], pic->format);
>   
>       if (s->debug & FF_DEBUG_BUFFERS)
>           av_log(s, AV_LOG_DEBUG, "default_get_buffer called on pic %p\n", pic);

Will apply.
diff mbox series

Patch

diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index cd98c98a97..75bc7ad98e 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -1425,8 +1425,6 @@  static int video_get_buffer(AVCodecContext *s, AVFrame *pic)
         pic->data[i] = NULL;
         pic->linesize[i] = 0;
     }
-    if (desc->flags & AV_PIX_FMT_FLAG_PAL)
-        avpriv_set_systematic_pal2((uint32_t *)pic->data[1], pic->format);
 
     if (s->debug & FF_DEBUG_BUFFERS)
         av_log(s, AV_LOG_DEBUG, "default_get_buffer called on pic %p\n", pic);