[FFmpeg-devel] [PATCH 4/4] avcodec/flashsv2enc: factorize updating block dimensions
James Almer
jamrial at gmail.com
Wed Jan 27 03:13:55 EET 2021
On 1/23/2021 6:13 PM, Marton Balint wrote:
>
>
> On Tue, 19 Jan 2021, Anton Khirnov wrote:
>
>> Quoting Marton Balint (2021-01-18 21:53:30)
>>>
>>>
>>> On Mon, 18 Jan 2021, Anton Khirnov wrote:
>>>
>>> > Quoting Marton Balint (2021-01-10 02:20:45)
>>> >> Signed-off-by: Marton Balint <cus at passwd.hu>
>>> >> ---
>>> >> libavcodec/flashsv2enc.c | 76
>>> +++++++++++++++++-----------------------
>>> >> 1 file changed, 32 insertions(+), 44 deletions(-)
>>> >> >> diff --git a/libavcodec/flashsv2enc.c b/libavcodec/flashsv2enc.c
>>> >> index 6603d0ded1..5139b17a28 100644
>>> >> --- a/libavcodec/flashsv2enc.c
>>> >> +++ b/libavcodec/flashsv2enc.c
>>> >> @@ -252,7 +259,7 @@ static av_cold int
>>> flashsv2_encode_init(AVCodecContext * avctx)
>>> >> s->use_custom_palette = 0;
>>> >> s->palette_type = -1; // so that the palette
>>> will be generated in reconfigure_at_keyframe
>>> >> >> - return 0;
>>> >> + return update_block_dimensions(s, 64, 64);
>>> >
>>> > This looks different from the original value. Why the change?
>>>
>>> Block dimensions are recalculated on every keyframe, so it does not
>>> matter what the block width/height is after init. 64 is used because
>>> the current code always selects that (see the
>>> optimum_block_width/height functions).
>>
>> Okay, makes sense. You could mention it in the commit message, since
>> one would not expect a 'factorize' commit to change behaviour.
>
> OK, applied the series with the comment added.
>
> Thanks,
> Marton
Valgrind doesn't like this patch.
http://fate.ffmpeg.org/report.cgi?slot=x86_64-archlinux-gcc-valgrind&time=20210126180022
More information about the ffmpeg-devel
mailing list