Michael Niedermayer
5dfcb4f74d
avcodec/flacenc: Simplify md5 calculation code by using AV_WL24()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
7786a91b47
avcodec/flacenc: Move udata and sums to FlacSubframe
...
This significantly reduces the amount of stack space needed and
also permits to simply copy the rice context again without speed
penalty
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
80f9d6e0ab
avcodec/flacenc: Support calculating rice parameters exactly
...
Some files benefit by about 0.3% from this, and speedwise its ok
other files do not benefit and encode to the same size
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
d3dcd28812
avcodec/flacenc: Do not copy unused udata array -> 5x faster calc_rice_params()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
d0ac2f59aa
avcodec/golomb: Remove disabled and broken code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
8ea9334b31
avcodec/mss2: use < 0 instead of != 0 to check for error of vlc initialization
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Steve Borho
b012bd5068
libavcodec/x265: detect csps in libx265_encode_init_csp()
...
Without this change, if you link with an 8bit libx265 and try to specify
a 10bit input color space via:
ffmpeg -i in.mov -c:v libx265 -pix_fmt yuv420p10le out.mp4
It will error with:
Incompatible pixel format 'yuv420p10le' for codec 'libx265',
auto-selecting format 'yuv420p'
With this fix, it will learn if a 10bit libx265 is available at startup,
and thus allow 10bit input color spaces.
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
10 years ago
Michael Niedermayer
4b0f78ad1f
avcodec/snow_dwt: Remove ff_ prefix from ff_spatial_idwt_init() and ff_spatial_idwt_slice()
...
They are only used once in the file in which they are defined
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
c6bf27d59b
avcodec/hevc_cabac: Rename ff_hevc_transform_skip_flag_decode() to hevc_transform_skip_flag_decode()
...
The function is static and used once in the file its defined in
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
14c4b25158
avcodec/golomb: fix reading huge signed rice golomb values
...
No testcase is known, nor any case where such huge values would occur
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
c720b9ce98
avcodec/golomb: get_ur_golomb_jpegls: Fix reading huge k values
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
b6fcb2bb6d
avcodec/flacdec: Attempt to auto-detect old buggy flac
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Carl Eugen Hoyos
83356cf6cc
lavc/vc1: Never decode vc1 as gray if gray decoding was not enabled.
10 years ago
Carl Eugen Hoyos
70c0433525
lavc: Print a warning if gray decoding was requested but not enabled.
10 years ago
Carl Eugen Hoyos
101f26e758
lavc/h263: Set color_range for gray decoding.
10 years ago
Carl Eugen Hoyos
4d8bd60ac6
lavc/vc1: Set color_range for gray decoding.
10 years ago
Carl Eugen Hoyos
1eda55510a
lavc/qdrw: Fix overwrite when reading invalid Quickdraw images.
10 years ago
Carl Eugen Hoyos
e609cfd697
lavc/flac: Fix encoding and decoding with high lpc.
...
Based on an analysis by trac user lvqcl.
Fixes ticket #4421 , reported by Chase Walker.
10 years ago
Carl Eugen Hoyos
38f5a266ee
lavc/flacdec: Sanitize FLACSTREAMINFO usage.
10 years ago
Michael Niedermayer
3fb726c6b4
avcodec/aacenc: use < 0 instead of != 0 for error checks
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
2580bae54a
avcodec/j2kenc: Use ret < 0 instead of ret != 0 for error checks
...
This is how most code in FFmpeg checks for failures
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Ronald S. Bultje
900e3af857
vp9: match another find_ref_mvs() bug in libvpx.
...
If we find a second non-sub8x8 motion vector for a non-first sub8x8
block, and the clamped value is identical to the first non-sub8x8
motion vector, then the resulting nearmv motion vector is forced to
zero.
10 years ago
Ronald S. Bultje
ccfb03ecc4
vp9: fix scaled motion vector clipping for sub8x8 blocks.
...
To match the obscure clipping bug behaviour in libvpx.
10 years ago
Ronald S. Bultje
68c1e91316
vp9: improve signbias check.
...
Otherwise it will still scale motion vectors, which leads to corrupted
prediction.
10 years ago
Michael Niedermayer
3051e7fa71
avcodec/hevc: Fix typo in num_entry_point_offsets check
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
c64b2d480b
avcodec/libtheoraenc: Check for av_malloc failure
...
Fixes CID1257799
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Ronald S. Bultje
32b6d31ef3
vp9: don't allow compound references if error_resilience is enabled.
...
libvpx (probably accidentally) clears the bits if error_res is set,
along with keyframe/intraonly. This probably wasn't the intention
(since it's local data), but it's behaviour we have to copy...
10 years ago
Ronald S. Bultje
5de142d316
vp9: clamp segmented lflvl before applying ref/mode deltas.
10 years ago
Ronald S. Bultje
c81677e9b7
vp9: reset loopfilter mode/ref deltas on keyframe.
10 years ago
Ronald S. Bultje
88126916c8
vp9: fix crash when playing back 440/440 content with width%64<56.
10 years ago
Ronald S. Bultje
3e634e3e98
vp9: extend loopfilter workaround for vp9 h/v mix-up to work for 422.
10 years ago
Michael Niedermayer
ff1d85b0ed
avcodec/svq1dec: Remove duplicate buf_size check
...
Fixes CID1297573
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
fc624ec9ba
avcodec/dcadec: Check active_bands
...
Fixes CID1297594 part2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
0f3e6959bf
avcodec/dcadec: Check scale table index
...
Fixes CID1297594 part 1
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
ade8a46154
avcodec/sonic: More completely check sample_rate_index and channels
...
Fixes CID1271783
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
c131a9fead
avcodec/sonic: check memory allocations
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
cdd25f9a3d
avcodec/smvjpegdec: check avcodec_decode_video2() return code
...
Fixes CID1271810
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
294469416d
avcodec/shorten: More complete pred_order check
...
Fixes CID1239055
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
2d15588124
avcodec/shorten: Fix code depending on signed overflow behavior
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
d201becfc0
avcodec/shorten: Check skip_bytes()
...
Fixes CID1210526
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
c347f75d6b
avcodec/put_bits: Remove dead code in put_bits()
...
Fixes CID1297574
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
c4c6aea397
avcodec/proresdec2: Reset slice_count on deallocation
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
5e1d530f91
avcodec/vp9: Use separate memset for counts.eob
...
Makes no real difference, but maybe scares coverity less (CID1297578)
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
3793caa5e2
avcodec/acelp_vectors: Assert that x is within the array in ff_set_fixed_vector()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
dc4a621e9c
avcodec/vp3: Cleanup order of operations for current_run check
...
This shouldnt make a difference
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Ronald S. Bultje
29045fbfd4
vp9: clip motion vectors in the same way as libvpx does.
...
The practical effect of this is that the scaling will wrongly not be
applied to the interpolation edge (the 3/4 constants in this patch).
In other words, we clip to the pre-scaling interpolation, even though
these should be clipped post-scaling. The resulting out-of-frame MVs
are thus automatically clipped within the visible portion of the frame,
which is probably not the intention, but is unfortunately what libvpx
does, so we need to copy that behaviour.
10 years ago
Ronald S. Bultje
96a58a8daa
vp9: set skip flag if the block had no coded coefficients.
...
This reproduces libvpx behaviour. It seems like it originally only
targeted loopfilter behaviour, but this unfortunately effects following
block contexting and thus directs bitstream sync.
10 years ago
Michael Niedermayer
47cbcf20d6
avcodec/h264_slice: Fix ranges in assert
...
Fixes CID1297592, CID1297593
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
9f0b898e82
avcodec/dvbsubdec: Clear w/h/size on region buffer allocation failure
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
8f1afde11d
avcodec/diracdec: Make data_unit_size unsigned
...
Fixes CID1271788
with this change the value is more explicitly checked, it was fully checked
before though
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago