Re: [FFmpeg-devel] [PATCH 1/3] avcodec/webp: Use uint8_t for code lengths

2020-10-26 Thread Andreas Rheinhardt
"zhilizhao(赵志立)": > > >> On Oct 26, 2020, at 3:24 PM, Andreas Rheinhardt >> wrote: >> >> Andreas Rheinhardt: >>> They are always in the range 0..15, so using an int is not necessary. >>> Furthermore, using an int would not work if sizeof(int) == 4 as > > You mean if sizeof(int) != 4 ? > Good

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/webp: Use uint8_t for code lengths

2020-10-26 Thread zhilizhao(赵志立)
> On Oct 26, 2020, at 3:24 PM, Andreas Rheinhardt > wrote: > > Andreas Rheinhardt: >> They are always in the range 0..15, so using an int is not necessary. >> Furthermore, using an int would not work if sizeof(int) == 4 as You mean if sizeof(int) != 4 ? >> ff_init_vlc_sparse() can only handl

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/webp: Use uint8_t for code lengths

2020-10-26 Thread Andreas Rheinhardt
Andreas Rheinhardt: > They are always in the range 0..15, so using an int is not necessary. > Furthermore, using an int would not work if sizeof(int) == 4 as > ff_init_vlc_sparse() can only handle uint8_t, uint16_t and uint32_t > lengths. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/

[FFmpeg-devel] [PATCH 1/3] avcodec/webp: Use uint8_t for code lengths

2020-10-22 Thread Andreas Rheinhardt
They are always in the range 0..15, so using an int is not necessary. Furthermore, using an int would not work if sizeof(int) == 4 as ff_init_vlc_sparse() can only handle uint8_t, uint16_t and uint32_t lengths. Signed-off-by: Andreas Rheinhardt --- libavcodec/webp.c | 8 1 file changed,