[Ffmpeg-devel] Differences between mencoder andffmpegwhenencoding using x264

Måns Rullgård mru
Mon Feb 20 16:28:28 CET 2006


Luca Abeni said:
> Hi all,
>
> On Mon, 2006-02-20 at 09:53 +0100, Luca Abeni wrote:
> [...]
>> > My recommendation for anyone using x264 in FFmpeg would be to check the
>> x264
>> > command line defaults and explicitly specify all parameters to FFmpeg
>> using
>> > the defaults from the x264 CLI and whatever alterations one may want to
>> make.
>> I tried to do that, but I got lost :(
>> I think the problem could be related to the rate control settings, but I
>> am not sure.
> Ok, I think I tracked down part of the problem: it seems that the
> deblocking filter is involved (in ffmpeg, it is disabled by default. In
> mencoder and in the x264 CLI, it is enabled). Adding the "-loop" option
> to ffmpeg, the quality improves a lot (BTW: are "loop filter" and
> "deblocking filter" the same thing?).

Loop filter is short for in-loop deblocking filter.  This means that the
reconstructed frames are deblocked being used as reference for motion
estimation.  This has two effects.  Firstly, the blockyness is, naturally,
reduced.  Secondly, the residuals after motion estimation tend to be smaller,
giving more a more efficient encoding.

As you have seen, the loop filter is not enabled by default in lavc.  The
setting has been there for a long time, and is used by (IIRC) H.263+.  I
assume that defaulting to disabled made sense with that codec.

Generally speaking, a deblocking filter is simply a filter that can be
applied to any image to reduce blockyness.  MPEG4 (part 2) does not
include an in-loop filter, but does suggest a deblocking to be applied
after decoding.

-- 
M?ns Rullg?rd
mru at inprovide.com





More information about the ffmpeg-devel mailing list