[FFmpeg-devel] [PATCH] RoQ Cosmetics - 1

Vitor vitor1001
Mon Jul 2 08:19:03 CEST 2007


Hi

Vitor wrote:
> 
> Michael Niedermayer wrote:
>> Hi
>>
>> [...]
>>>  
>>> -    for(cp = 0; cp < 3; cp++)
>>> -        block_copy(ri->current_frame->data[cp] + (y * ri->y_stride) 
>>> + x,
>>> -                   ri->last_frame->data[cp] + (my * ri->y_stride) + mx,
>>> -                   ri->y_stride, ri->y_stride, sz);
>>> +    for(cp = 0; cp < 3; cp++) {
>>> +        stride = cp==0 ? ri->y_stride : ri->c_stride;
>>
>> ri->current_frame.linesize[cp] seems like the more natural solution
> 
> I agree, patch attached.

I've just seen that this change broke subtly the encoder, since 
current_frame->linesize is not always the same as 
y_stride=frame_to_enc->linesize. It seems that two AVFrames with the 
same dimensions can have different strides. In this context, having the 
vars y_stride/c_stride is just confusing. I'm sending a patch to remove 
them and use properly AVFrame.linesize.

Decoder first.

-Vitor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dec_stride.diff
Type: text/x-patch
Size: 2487 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070702/99540b88/attachment.bin>



More information about the ffmpeg-devel mailing list