[FFmpeg-devel] [RFC] FFmpeg libavcodec/crystalhd.c: Optimize for reduced latency

thomas schorpp thomas.schorpp at gmail.com
Mon Feb 4 16:31:57 CET 2013

On 03.02.2013 03:54, thomas schorpp wrote:
> On 03.02.2013 02:59, Philip Langdale wrote:
>> On Sat, 02 Feb 2013 16:18:22 +0100
>> thomas schorpp <thomas.schorpp at gmail.com> wrote:
>>> I've got it sync'd to the driver and a stable pipeline control loop,
>>> the TX/RX- ringbuffers balanced with faster and more precise sync
>>> locking for now with patch #03:
>>> <SNIP>
>>> Why is a pixel format converter called "scaler" in FFmpeg?
>>> But I don't see the cause from the stream input in the stereo3d
>>> filter source code hitting this switch() case: [stereo3d] stereo
>>> format of input is not supported I try to excplicitely specify pixel
>>> format and scaler params.
>>> Comments on this crystalhd.c development patch?
>> The pixel format conversion is done by the scaler because it has to
>> support that anyway, so even when doing a 1:1 conversion it gets used;
>> that's just an ffmpeg implementation detail.
>> So, yeah - it certainly seems functional - with the big caveat that if
>> you try and seek in the video with mplayer, it will overflow the input
>> buffer and grind to a halt. The old code doesn't do that. It's fine
>> for a transcode run, but not good for interactive playback.
> Yes, first optimization target is transcoding, noted the mplayer seek break, too, and
> does not even work as good as your design for transcoding,
> every random minutes distorted picture and audio out of sync after 20min, fsck.
> I've trimmed some more and added an extra wait sleep to stop buffer overruns,

Bullshit, revert. Makes it worse. Useless to throttle decoded output with  throttled polling
of the input buffer to become free with I/O in the same thread.
Raised decode_wait up to 1s in a long transcoding run.
I'm too used to multithreaded luxury.
Next nice try attached.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: crystalhd-latencyopt-experimental.05.schorpp.patch
Type: text/x-diff
Size: 13473 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130204/fc60dd8e/attachment.bin>

More information about the ffmpeg-devel mailing list