[FFmpeg-devel] Indeo3 maintainer?

Maxim max_pole
Mon Jul 6 11:31:56 CEST 2009


Reimar D?ffinger schrieb:
> On Mon, Jul 06, 2009 at 05:26:05AM +0200, Michael Niedermayer wrote:
>   
>> On Sun, Jul 05, 2009 at 02:28:41PM +0200, Reimar D?ffinger wrote:
>>     
>>> am I right that we have no maintainer for indeo3 (only Michael in his
>>> "fallback" role)?
>>>       
>> too much is falling back on me, iam failing misserably to maintain code
>> that is mine to maintain let alone suff like the obfuscated indeo3 ...
>>     
>
> I sure wasn't trying to push this on you!
>
>   
>>> The problem seems to me that the code lacks buffer boundary checks all
>>>       
>> i remembr that .... 
>> if you think there are missing checks on writng instead of just reading then
>> iam fine with disabling indeo3 until maxim or someone else can maintain it
>> properly
>>     
>
> Well, reading the code I concluded the issue is mostly (only?) with reference
> frames, in which case it should only be reads.
> Unfortunately valgrind says otherwise, which is no surprise with code
> like that:
>                 cp2 = s->ModPred + ((lv - 8) << 7);
>                 cp = ref_frm_pos;
>                 for(i = 0; i < blks_width << 2; i++) {
>                     int v = *cp >> 1;
>                     *(cp++) = cp2[v];
>                 }
>
> I assumed that ref_frm_pos would be reference frame, but here it is
> written into.
>   

The problem is that this code was obtained using RE. It's not always
possible to understand the underlaying algorithm just by looking at the
reconstructed C code. That's why the variable names don't match their
actual meaning...
The code above does requantization of the predicted line in order to
avoid overflows (all pixel values should be lay in the range 0...127).
The variable "ref_frm_pos" need to be renamed to "pred_block" in order
to reflect its meaning.
Here a snippet from my private indeo3 source for the same code place.
Hopefully it brings some clarification:

/* requantize the prediction if VQ index of this cell differs from VQ index
/* of the predicted cell in order to avoid overflows. */

if (index >= 8) {
    for (x = 0; x < pCell->width*4; x++)
        pPredBlock[x] = ctx->modpred[(index & 7)*128 + pPredBlock[x]];
}

Regards
Maxim



More information about the ffmpeg-devel mailing list