[FFmpeg-devel] [PATCH] Revert removal of bytestream end checks in cabac decoder.
michaelni at gmx.at
Sun Sep 11 05:01:01 CEST 2011
On Sat, Sep 10, 2011 at 08:05:09PM +0200, Michael Niedermayer wrote:
> On Sat, Sep 10, 2011 at 01:10:52AM +0200, Laurent Aimar wrote:
> > I don't think that preventing overread in the cabac reader can be implemented
> > without checking the boundary when refilling the state (at least with the
> > current way of handling FF_INPUT_PADDING_SIZE).
> > See patch attached.
> I do think it can be prevented without changing the cabac reader.
> a patch doing so is attached, i will push it later today or tomorrow
> unless there are objections
> The advantage of my variant is also, its trivial to add support to
> disable it at runtime and thus prevent the tiny performance hit.
> someone (jason/loren ?) also might want to set MAX_MBPAIR_SIZE to a
> tigher limit. my limit is way larger than needed.
> Also the buffer memset(0) should force the cabac reader into reading
> MPS and this bounds the worst case bit per symbol tightly.
applied, flame me if i missed an issue
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The worst form of inequality is to try to make unequal things equal.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel