[Ffmpeg-devel] [PATCH] pointer targets differ in signedness

Måns Rullgård mru
Tue Sep 12 21:50:01 CEST 2006


Michael Niedermayer <michaelni at gmx.at> writes:

> Hi
>
> On Sun, Sep 10, 2006 at 06:36:16PM +0100, M?ns Rullg?rd wrote:
>> This patch gets rid of many of the "pointer targets differ in
>> signedness" warnings generated by gcc4.
>> 
>> Please, can those with knowledge of the files listed below check that
>> I didn't do something stupid?  Needless to say, regression tests pass
>> with these changes.
> [...]
>
>>      int i;
>>  
>>      if(matrix){
>> Index: libavcodec/mpegvideo.h
>> ===================================================================
>> --- libavcodec/mpegvideo.h	(revision 6221)
>> +++ libavcodec/mpegvideo.h	(working copy)
>> @@ -344,8 +344,8 @@
>>      Picture *current_picture_ptr;  ///< pointer to the current picture
>>      uint8_t *visualization_buffer[3]; //< temporary buffer vor MV visualization
>>      int last_dc[3];                ///< last DC values for MPEG1
>> -    int16_t *dc_val_base;
>> -    int16_t *dc_val[3];            ///< used for mpeg4 DC prediction, all 3 arrays must be continuous
>> +    uint16_t *dc_val_base;
>> +    uint16_t *dc_val[3];           ///< used for mpeg4 DC prediction, all 3 arrays must be continuous
>
> iam not 100% sure if not maybe some msmpeg4 files had negative dc values
> maybe it was a bug somewhere else, but as all coeffs are signed 16bit id
> leave the dc stuff signed too just MHO

Those pointers are assigned to uint16_t * pointers, which are used for
actual computations, so I assumed that unsigned was correct.  How
would the dc values end up negative anyway?

-- 
M?ns Rullg?rd
mru at inprovide.com




More information about the ffmpeg-devel mailing list