[FFmpeg-devel] [PATCH] swscale/input: silence warnings about incompatible pointer types

Paul B Mahol onemda at gmail.com
Thu Jul 19 18:08:19 CEST 2012


On 7/19/12, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Thu, Jul 19, 2012 at 01:17:28AM +0000, Paul B Mahol wrote:
>> Signed-off-by: Paul B Mahol <onemda at gmail.com>
>> ---
>>  libswscale/input.c |  117
>> +++++++++++++++++++++++++++++++--------------------
>>  1 files changed, 71 insertions(+), 46 deletions(-)
>>
>> diff --git a/libswscale/input.c b/libswscale/input.c
>> index 7363437..966d8ba 100644
>> --- a/libswscale/input.c
>> +++ b/libswscale/input.c
>> @@ -386,108 +386,120 @@ rgb16_32_wrapper(PIX_FMT_RGB565BE, rgb16be, 0, 0,
>> 0, 0,   0xF800, 0x07E0,   0x0
>>  rgb16_32_wrapper(PIX_FMT_RGB555BE, rgb15be, 0, 0,  0, 0,   0x7C00,
>> 0x03E0,   0x001F,  0, 5, 10, RGB2YUV_SHIFT + 7)
>>  rgb16_32_wrapper(PIX_FMT_RGB444BE, rgb12be, 0, 0,  0, 0,   0x0F00,
>> 0x00F0,   0x000F,  0, 4,  8, RGB2YUV_SHIFT + 4)
>>
>> -static void gbr24pToUV_half_c(uint16_t *dstU, uint16_t *dstV,
>> +static void gbr24pToUV_half_c(uint8_t *dstU, uint8_t *dstV,
>>                           const uint8_t *gsrc, const uint8_t *bsrc, const
>> uint8_t *rsrc,
>> -                         int width, enum PixelFormat origin)
>> +                         int width, uint32_t *unused)
>>  {
>> +    uint16_t *dU = (uint16_t *)dstU;
>> +    uint16_t *dV = (uint16_t *)dstV;
> [...]
>> +    int16_t *d = (int16_t *)dst;
>> +    uint16_t *s = (uint16_t *)src;
> [...]
>> +    int16_t *dest = (int16_t *)dst;
>
> existing code:
>     int32_t *dst        = (int32_t *) _dst;
>     const uint16_t *src = (const uint16_t *) _src;
>
>
> please use consistent variable names
>
> otherwise LGTM

Fixed and pushed.


More information about the ffmpeg-devel mailing list