[vlc-devel] [PATCH] vpx: Simplify table enumeration
Vittorio Giovara
vittorio.giovara at gmail.com
Tue Sep 27 16:45:19 CEST 2016
On Tue, Sep 27, 2016 at 8:53 AM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> Le lundi 26 septembre 2016, 23:55:22 Vittorio Giovara a écrit :
>> ---
>> modules/codec/vpx.c | 4 +---
>> 1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/modules/codec/vpx.c b/modules/codec/vpx.c
>> index 3149943..454e405 100644
>> --- a/modules/codec/vpx.c
>> +++ b/modules/codec/vpx.c
>> @@ -142,8 +142,6 @@ static const struct
>> { VLC_CODEC_I444_12L, VPX_IMG_FMT_I44416, 12, 0 },
>>
>> { VLC_CODEC_I444_16L, VPX_IMG_FMT_I44416, 16, 0 },
>> -
>> - { 0, 0, 0, 0 },
>> };
>>
>> static vlc_fourcc_t FindVlcChroma( struct vpx_image *img, vpx_codec_caps_t
>> codec_caps ) @@ -153,7 +151,7 @@ static vlc_fourcc_t FindVlcChroma( struct
>> vpx_image *img, vpx_codec_caps_t codec if( img->bit_depth > 8 &&
>> !(codec_caps & VPX_CODEC_CAP_HIGHBITDEPTH) ) return 0;
>>
>> - for( int i = 0; chroma_table[i].i_chroma != 0; i++ )
>> + for( int i = 0; i < ARRAY_SIZE(chroma_table); i++ )
>> if( chroma_table[i].i_chroma_id == img->fmt &&
>> chroma_table[i].i_bitdepth == img->bit_depth &&
>> chroma_table[i].i_needs_hack == hack )
>
> For the last time, DO NOT post second-order differential patches. It's usually
> (not here) too difficult to follow and it's always hard to merge.
The original patch was merged, so I had no choice...
(also "last time"? i don't recall being told in the first time)
Anyway patch ok I assume?
--
Vittorio
More information about the vlc-devel
mailing list