[Ffmpeg-devel] DVD compliance, limited vertical range of motion vectors
Wed Jul 27 15:20:47 CEST 2005
On Wednesday 27 July 2005 12:32, Sven Over wrote:
> DVD players have to be able to decode MP at ML (main profile at main level)
> MPEG2 streams. The MPEG2 standard defines the vertical vector range for
> main level streams to be within -128 and 127.5 for frame pictures and -64
> and 63.5 for field pictures. [ISO/IEC 13818-2, clause 8 "Profiles and
> Levels", table 8]. It says "this restriction applies to the final
> reconstructed motion vector. In case of dual prime motion vectors it
> applies before scaling is performed, after scaling is performed and after
> the small differential motion vector has been added." Whatever that means!
> As Mean was saying, those Pioneer players are well suited to act as
> debugging machines, because they follow the standards that strict. My
> problem was, that every ffmpeg generated video did not properly play on
> that player (while it worked on any other player). Video streams from other
> sources (DVD, DVB) worked fine. Finally, I was able to get ffmpeg generated
> video running on that Pioneer player, by adding the "-me_range" option to
> the command line. So I guess, that it really is the part of the standard I
> just referred to, with which the ffmpeg generated video conflicts (if no
> "-me_range" is given).
> I don't know what value I have to set "-me_range" to in order to be fully
> standards compliant. How do the numbers from the standard translate to the
> me_range option?
well me_range is in subpel units (1/2 for mpeg1/2) the numbers in the standard
are in fullpell units, and we dont support field pictures so 256 seems to be
the correct limit if not iam sure someone will complain and we now know what
to try first if someones poineer dvd player dislikes ffmpeg ...
> Also, as it looks to me when browsing the ffmpeg sources,
> me_range does not only constrain the vertical range of motion vectors but
> both vertical and horizontal. So maybe a new option could be introduced to
> limit only the vertical range.
yes, patch welcome, but 256 is already quite large so i wouldnt expect much
improvement from a higher limit for the horizontal component
> So, maybe the MPEG experts here can have a quick look on this issue. I
> suggest, that the "-target dvd" switch (or maybe a "-strict" setting)
> should activate a limitation of the vertical vector ranges that is fully
> conformant to the standard, such that the video plays on *all* compliant
> DVD players.
well the limitation is not a dvd limit but a mpeg2 one so its on by default
now and can be disabled with -strict -1 (all just theory nothingt tested as
no dvd writer or dvd player here ...)
More information about the ffmpeg-devel