Data is appended in fill_buffer() when there is sufficient space left
and the data pointer only reset when needed.
Previously the data pointer was more often reset, loosing more seekback
space than otherwise needed.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
The aix header math.h defines "extern int class()" for C.
This fixes compilation on aix with external libraries enabled.
Signed-off-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
When operating on subsampled chroma planes, some rounding is taking
place. The left and top borders are rounded down while the width and
height are rounded up, so all rounding is done outward to guarantee the
logo area is fully covered.
The problem is that the width and height are counted from the
unrounded left and top borders, respectively. So if the left or top
border position has indeed been rounded down, and the width or height
needs no rounding (up), the position of the the right or bottom border
will be effectively rounded down, i.e. inward.
The issue can easily be seen with a yuv240p input and
-vf delogo=45:45:60:40:show=1 -vframes 1 delogo-bug.png
(or virtually any logo area with odd x and y and even width and
height.) The right and bottom chroma borders (in green) are clearly
off.
In order to fix this, the width and height must be adjusted to include
the bits lost in the rounding of the left and top border positions,
respectively, prior to being themselves rounded up.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
When interpolating, weights are based on relative distances, which
assume square pixels. If a non-1:1 sample aspect ratio is used, it
should be taken into account when comparing distances, because the
human eye and brain care about the picture as it is displayed, not
stored.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* qatar/master:
jpeg2000: Use the matching coding style struct for transform selection
jpeg2000: Merge rescaling with interleaving in 9/7 IDWT
No change, all commits & hunks where already in.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '22e18ea39e371030cc78973d1b46aae45a7ea215':
jpeg2000: Optimize output sample conversion
jpeg2000: Reset s->numX/Ytiles on tile deallocation
jpeg2000: Optimize dequantization
jpeg2000: Do not assume a single tile
jpeg2000: Speed up jpeg2000_decode_tile()
jpeg2000: Use EBCOT's CAUSAL and BYPASS mode in decode_cblk()
Conflicts:
libavcodec/jpeg2000dec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'd57c737ac30cf079a342fa649fd4888c2d059dd9':
jpeg2000: Simplify jpeg2000_decode_packets()
jpeg2000: Do not crash on NULL node in tag_tree_decode
jpeg2000: Refactor SOT marker parsing
Conflicts:
libavcodec/jpeg2000dec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '589e5b52f634f6b2d307a167a19eef7e7328cb08':
jpeg2000: Use the correct sizeof in memset for T1 data
jpeg2000: Simplify init_tile()
jpeg2000: Update pixel format support
Conflicts:
libavcodec/jpeg2000dec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '5bf208f659703895df7926238dcfa8a8175de36b':
jpeg2000: Use separate fields for int and float codepaths
jpeg2000: Split int/float codepaths depending on the DWT
Conflicts:
libavcodec/jpeg2000.c
libavcodec/jpeg2000dec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '4cbd5ed11b0161a6a192174934b241e0cc0599a9':
jpeg2000: Fix compute precedence error in lut_gain index
jpeg2000: Initialize code blocks structures in precincts to 0
jpeg2000: Check that we have enough components for MCT
Conflicts:
libavcodec/jpeg2000.c
libavcodec/jpeg2000dec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'b564784a207b1395d2b5a41e580539df04651096':
jpeg2000: Check that there is a SOT before SOD
jpeg2000: Remove unneeded returns
Conflicts:
libavcodec/jpeg2000.c
libavcodec/jpeg2000dec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'ef35d6dbc6c3b7ba6b13ac13fc8e797cc1268c8f':
jpeg2000: Propagate error code from get_cox()
jpeg2000: Check that nreslevels2decode has been initialized before use
Conflicts:
libavcodec/jpeg2000dec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'fd54dd028bc9f7bfb80ebf823a533dc84b73f936':
jpeg2000: check len before parsing header
jpeg2000: Check component number in get_coc() and get_qcc()
Conflicts:
libavcodec/jpeg2000dec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '278a923c51187d37445d88a6b21082036ec9568d':
jpeg2000: Validate SIZ parsing
Conflicts:
libavcodec/jpeg2000dec.c
This commit is not exactly merged due to bugs in it
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Add function avfilter_graph_parse_ptr() and favor it in place of
avfilter_graph_parse(), which will be restored with the old/Libav
signature at the next bump.
If HAVE_INCOMPATIBLE_LIBAV_API is enabled it will use the
Libav-compatible signature for avfilter_graph_parse().
At the next major bump the current implementation of
avfilter_graph_parse() should be dropped in favor of the Libav/old
implementation.
Should address trac ticket #2672.
"Fork" is an ambiguous term, since there may be more than one fork, also
"fork" could be confused with the corresponding function. Also it seems
important to point the name of the referenced fork in the symbol.
Note: the old --enable-incompatible-fork-abi command is retained for
compatibility, although it should be considered deprecated.
* commit '57bc64e':
jpeg2000: Use bytestream2
jpeg2000: Clean up return paths and error messages
jpeg2000: Define the maximum decomposition levels
jpeg2000: Check code-block size
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'be3271009ef893fbed9640e8edbd771685fd957b':
jpeg2000: Define the maximum decomposition levels
Conflicts:
libavcodec/jpeg2000.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>