[FFmpeg-devel] Using dsp.fdct()
Sun Apr 20 18:34:06 CEST 2008
Loren Merritt wrote:
> On Sat, 19 Apr 2008, Ramiro Polla wrote:
>> Michael Niedermayer wrote:
>>> PS: yes you do need to run a idct over it if you want to use it as reference
>>> frame otherwise decoder and encoder will have different reference frames.
>> And this leaves me in a spot where I have more doubts than before asking =)
>> The current code compares both frames with their original content (well,
>> besides that luma plane pre-processing, but I'm not sure how long I'll
>> keep that). I imagine this scenario where copying the idct over the
>> original content could be worse (untested, but sounds like a good scenario):
>> If I have a low quality encoding, the idct output will have lots of
>> differences from the original content. If I compare the current frame's
>> content with the idct output from the previous one, the differences
>> might be higher than the threshold, so it will encode the new image,
>> when it could have just used the previous one instead.
> The reconstructed content of the previous frame is what you'll get if
> you code a skip in the current frame. So either the reconstructed
> reference frame is too different from the current input, in which case you
> should code the block, or the reconstructed reference frame is good
> enough, in which case either it'll pass your threshold or you should fix
> your threshold.
> corollary: the skip threshold should be at least as large as the typical
> quantization error at your current quantizer.
Impressive... This got the output to have both a smaller file size and
greater quality, at the cost of taking much longer to encode.
More information about the ffmpeg-devel