[FFmpeg-devel] [PATCH] RoQ Cosmetics - 1
Michael Niedermayer
michaelni
Mon Jul 2 11:57:00 CEST 2007
Hi
On Mon, Jul 02, 2007 at 08:19:03AM +0200, Vitor wrote:
> 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.
yes, theres no restriction on the linesize on the input AVFrame, OTOH
the ones allocated by get_buffer() should have the same stride
> 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.
patch looks ok
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070702/49caa31a/attachment.pgp>
More information about the ffmpeg-devel
mailing list