[FFmpeg-devel] [PATCH] do not fail if aspect ratio is forbidden in mpeg-2

Michael Niedermayer michaelni
Fri Mar 14 12:30:58 CET 2008


On Fri, Mar 14, 2008 at 10:45:27AM -0000, M?ns Rullg?rd wrote:
> 
> Baptiste Coudurier wrote:
> > Hi,
> >
> > Michael Niedermayer wrote:
> >> On Thu, Mar 13, 2008 at 10:08:49PM +0200, Ivan Kalvachev wrote:
> >>> On Thu, Mar 13, 2008 at 8:27 PM, Baptiste Coudurier
> >>> <baptiste.coudurier at smartjog.com> wrote:
> >>>> Michael Niedermayer wrote:
> >>>>  > On Thu, Mar 13, 2008 at 07:09:51PM +0100, Baptiste Coudurier wrote:
> >>>>  >> Hi,
> >>>>  >>
> >>>>  >> $subject.
> >>>>  >>
> >>>>  >> Yes, value 0 is forbidden in the specs (ISO 13818-2), however IMHO it is
> >>>>  >> a bit harsh to fail badly (libmpeg2 does not fail)
> >>>>  >>
> >>>>  >> This fixes issue 369.
> >>>>  >
> >>>>  > ok
> >>>>  >
> >>>>
> >>>>  Applied.
> >>> That commit was quick.
> >>>
> >>> However I'm not happy with it. The value of zero is not reserved, it
> >>> is forbidden. In theory forbidden values are values that could lead to
> >>> startcode emulation.
> >>>
> >>> The sample doesn't seem to contain another sequence header so there is
> >>> no way to check if this sample is accidentally or systematically
> >>> broken.
> >>>
> >>> I guess that libmpeg2 accepting broken codes is bug, that library is
> >>> known to have error resilience issues.
> >>>
> >>> Anyway, as Michael accepted it so I won't request this to be reverted.
> >>> I'd however request this "broken" behavior to be bound to
> >>> "error_resilience" or "strict_std_compliance" .
> >>
> >> Iam fine with that, we could also add a warning so the user knows that
> >> the file is not ok and why.
> >>
> >
> > Added a message, and code fail is error_resilience is >= FF_ER_COMPLIANT.
> 
> I think that's backwards.  Higher error_resilience values mean lavc should
> try harder to decode damaged streams.  The test should be <= FF_ER_COMPLIANT.

The error_resilience variable is used to select how picky lavc is to detect
errors. For error concealment it is important to detect errors, and detecting
them earlier is more effective as the first error position within a slice
is more accurately known.

error_resilience == FF_ER_COMPLIANT means "I know my stream is compliant and
everything which is not IS damaged and should be treate as such"
while < FF_ER_COMPLIANT means "The stream might not be exactly compliant and
small derivations from the spec might be from a broken encoder instead of
bit/byte/packet errors"

PS: yes i know the name error_resilience is bad, it should be renamed per
#ifdef LAVC_VERSION

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

The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080314/d75cf065/attachment.pgp>



More information about the ffmpeg-devel mailing list