[Ffmpeg-devel] Video stutter in decoder

Michael Niedermayer michaelni
Fri Mar 16 01:46:13 CET 2007


Hi

On Thu, Mar 15, 2007 at 08:17:54PM -0400, Cyril Zorin wrote:
> >well why dont you use get_buffer() every multithreaded player will
> >have to copy your frame, every player using xv will have to copy
> >your frame, ... if you dont use get_buffer()
> 
> Hmm the problem with using get_buffer() is that the pitch is  
> different from the source image, so it complicates the code (e.g.  
> with RLE routines that have to be pitch-sensitive, etc.) Another  
> problem with giving ffmpeg my own buffer is that the source pixels  
> are all little-endian, so it would make the code more complicated to  
> convert each source pixel on the fly to native, and so on.
> 
> Can I just use my own buffer and then copy it to ffmpeg inside  
> decode_frame?

you can do whatever is fastest and cleanest, converting x-endian
to native endian during rle decompression for example should be
faster than doing conversation over all pixels

also doing a simple dumb x-endian to native endian conversation over all
pixels very significantly increases the chances that the patch will be
rejected as this does not belong into a codec but rather into libswscale

now copy or not well i dont know, how hard it is to avoid the copy,
its not my intent to make the codec overly complex and obfuscated
so if its really a problem then a simple copy into the buffer from
get_buffer() is fine, also simply returning your own buffer should
work if CODEC_CAP_DR1 is not set ... there might be a bug in ffplay
if it doesnt work

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- 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/20070316/339bb3c0/attachment.pgp>



More information about the ffmpeg-devel mailing list