[FFmpeg-devel] [PATCH] [1/??] [2/3] Basic infrastructure
Michael Niedermayer
michaelni
Mon Feb 11 21:25:32 CET 2008
On Mon, Feb 11, 2008 at 08:07:10PM +0100, Vitor Sessak wrote:
[...]
>>> for(i = 0; i < 4; i ++) {
>>> if(!src[i]) continue;
>>>
>>> for(j = 0; j < h >> (i==0 ? 0 : vsub); j ++) {
>>> memcpy(dst[i], src[i], link->cur_pic->linesize[i]);
>> this should be width*pixel size or something like that ideally
>
> Well, that would mean duplicating a lot of code already in
> av_picture_copy(), unless I create a
> int av_get_plane_bytewidth(int pix_fmt, int width, int plane)
> to factorate this code (see attached patch). Are you ok with that?
Ok, but give pix_fmt its proper type not int.
> Do you think I should make it inline?
no
>
>>> src[i] += link->srcpic ->linesize[i];
>>> dst[i] += link->cur_pic->linesize[i];
>>> }
>>> }
>> [...]
>>> if(!link_dpad(link).draw_slice)
>>> return;
>>>
>>> link_dpad(link).draw_slice(link, y, h);
>>> }
>> if(link_dpad(link).draw_slice)
>> link_dpad(link).draw_slice(link, y, h);
>> [...]
>>> avpicture_alloc((AVPicture *)pic, pic->format,
>>> (ref->w + 15) & (~15), // make linesize a multiple of
>>> 16
>> wont work for chroma
>
> It's a bit complicated... I need either to duplicate code in
> avpicture_alloc, either rounding up to the next multiple of 16<<hsub. Any
> ideas?
see avcodec_default_get_buffer() if you figured out a way to clean it up
it also does something similar ...
>
> Also, do you think it is worth also rounding up the height to the next
> multiple of 16 as I've done? Thinking again, it don't look very useful...
Iam not sure, id leave it non rounded up for now ...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080211/9919608a/attachment.pgp>
More information about the ffmpeg-devel
mailing list