Andreas Cadhalpun
da3c3c446c
avpacket: fix size check in packet_alloc
...
The previous check only caught sizes from -AV_INPUT_BUFFER_PADDING_SIZE
to -1.
This fixes ubsan runtime error: signed integer overflow: 2147483647 + 32
cannot be represented in type 'int'
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-05 22:30:50 +01:00
Andreas Cadhalpun
fa74cdc60d
parser: add av_assert1 to make sure the codec matches
...
Otherwise this can have some surprising effects (crashes), so let's
better not allow it.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-05 22:30:32 +01:00
Michael Niedermayer
5b4da8a38a
avcodec/motion_est: Fix mv_penalty table size
...
Fixes out of array read
Found-by: Tyson Smith <twsmith@mozilla.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-05 18:10:34 +01:00
Aman Gupta
e7271e6d07
libavcodec/ccaption_dec: remove unnecessary include
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-05 18:10:34 +01:00
Michael Niedermayer
68eb20801d
avcodec/dxv: Check idx in dxv_decompress_dxt5()
...
Fixes potential out of array read
No testcase available
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-05 03:08:09 +01:00
Michael Niedermayer
eb8a67de75
avcodec/dxv: Check idx in CHECKPOINT()
...
Fixes out of array read
Fixes Ticket5098
Fixes Ticket5099
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-05 02:55:49 +01:00
Ganesh Ajjanagadde
43624a669b
lavc/pcm_tablegen: slight speedup of table generation
...
This gets rid of some branches to speed up table generation slightly
(impact higher on mulaw than alaw). Tables are identical to before,
tested with FATE.
Sample benchmark (Haswell, GNU/Linux+gcc):
old:
313494 decicycles in build_alaw_table, 4094 runs, 2 skips
315959 decicycles in build_alaw_table, 8190 runs, 2 skips
323599 decicycles in build_ulaw_table, 4095 runs, 1 skips
318849 decicycles in build_ulaw_table, 8188 runs, 4 skips
new:
261902 decicycles in build_alaw_table, 4096 runs, 0 skips
266519 decicycles in build_alaw_table, 8192 runs, 0 skips
209657 decicycles in build_ulaw_table, 4096 runs, 0 skips
232656 decicycles in build_ulaw_table, 8192 runs, 0 skips
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2016-01-04 17:23:24 -08:00
Michael Niedermayer
7cc01c2572
avcodec/h264_slice: Fix integer overflow in implicit weight computation
...
Fixes mozilla bug 1230423
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-05 01:12:42 +01:00
Michael Niedermayer
9434ec5f76
avcodec/h264_refs: Fix and add back trace code removed in e1c5170c63
2016-01-04 21:33:13 +01:00
Andreas Cadhalpun
e7a7b3135a
vorbisdec: reject rangebits 0 with non-0 partitions
...
This causes non-unique elements in floor_setup->data.t1.list, which
makes the stream undecodable according to the specification.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-04 13:07:28 +01:00
Hendrik Leppkes
e1c5170c63
Merge commit ' 2080bea4a7'
...
* commit '2080bea4a7 ':
h264_refs: Remove broken trace debug code
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-04 11:40:34 +01:00
Hendrik Leppkes
3e337f0e40
Merge commit ' 58170b0271'
...
* commit '58170b0271 ':
lavc: Add missing #includes for ff_dlog()
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-04 11:32:11 +01:00
Hendrik Leppkes
9507f68deb
Merge commit ' 3b6473b43e'
...
* commit '3b6473b43e ':
qsvdec: properly handle the warning from MFXVideoCORE_SyncOperation
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-04 11:31:43 +01:00
Hendrik Leppkes
ad53c94d8f
Merge commit ' a43905f4ae'
...
* commit 'a43905f4ae ':
qsvenc_hevc: improve the default settings
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-04 11:31:33 +01:00
Mats Peterson
bf42a7ef6d
lavc/qtrle: Use AV_PIX_FMT_PAL8 for 1-bit video
...
This commit fixes the lack of palettized display of 1-bit video
in the qtrle decoder. It is related to my commit of
lavf/qtpalette, which added 1-bit video to the "palettized video"
category. As far as I can see, everything works fine, but comments are
of course welcome.
Below are links to sample files, which should now be displayed properly
with bluish colors, but which were previously displayed in black &
white.
Matroska:
https://drive.google.com/open?id=0B3_pEBoLs0faNjI0cHBMWDhYY2c
Earth Spin 1-bit qtrle.mkv
QuickTime (mov):
https://drive.google.com/open?id=0B3_pEBoLs0faUlItWm9KaGJSTEE
Earth Spin 1-bit qtrle.mov
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-04 03:31:35 +01:00
Michael Niedermayer
4da2ac5c7a
avcodec/h264: Fix regression caused by removial of default_ref_list
...
This fixes a regression of the sample from Ticket 2371
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-04 02:30:48 +01:00
Andreas Cadhalpun
b4b13848de
vorbisdec: reject channel mapping with less than two channels
...
It causes the angle channel number to equal the magnitude channel
number, which makes the stream undecodable according to the
specification.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-03 23:44:47 +01:00
Diego Biurrun
2080bea4a7
h264_refs: Remove broken trace debug code
2016-01-03 22:49:56 +01:00
Diego Biurrun
58170b0271
lavc: Add missing #includes for ff_dlog()
2016-01-03 22:49:55 +01:00
Andreas Cadhalpun
43ff4aed26
lavc: use get_bitsz to simplify the code
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-03 21:12:53 +01:00
Andreas Cadhalpun
713654d9d3
get_bits: add get_bitsz for reading 0-25 bits
...
This can be used to simplify code in a couple of places.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-03 21:12:43 +01:00
Michael Niedermayer
cccb0ffccc
avcodec/put_bits: Always check buffer end before writing
...
This causes a overall slowdown of 0.1 % (tested with mpeg4 single thread encoding of matrixbench at QP=3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-02 19:23:10 +01:00
Hendrik Leppkes
b95cba7b3c
avcodec/dca: remove unused float quant table
2016-01-02 19:06:40 +01:00
Hendrik Leppkes
51da00e24c
dca: adjust decoding of the XBR extension for integer core decoding
2016-01-02 19:01:42 +01:00
Hendrik Leppkes
7fe77aa62e
Merge commit ' 40d9496773'
...
* commit '40d9496773 ':
dca: use defines for subband related constants
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-02 17:52:34 +01:00
Hendrik Leppkes
2214207d04
Merge commit ' 8563f98871'
...
* commit '8563f98871 ':
x86: use emms after ff_int32_to_float_fmul_scalar_sse
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-02 13:27:11 +01:00
Hendrik Leppkes
a9cd11b212
Merge commit ' f4f27e4cf1'
...
* commit 'f4f27e4cf1 ':
x86: zero extend the 32-bit length in int32_to_float_fmul_scalar implicitly
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-02 13:23:25 +01:00
Hendrik Leppkes
95a2b883e3
Merge commit ' 69a68593ce'
...
* commit '69a68593ce ':
Remove stray line breaks from avpriv_{report_missing_feature|request_samples}
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-02 13:20:13 +01:00
Hendrik Leppkes
d03da3e240
Merge commit ' 2008f76054'
...
* commit '2008f76054 ':
dca: remove unused decode_hf function and quant_d tables
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-02 13:17:48 +01:00
Hendrik Leppkes
af1238f863
Merge commit ' aebf07075f'
...
* commit 'aebf07075f ':
dca: change the core to work with integer coefficients.
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-02 13:08:29 +01:00
Hendrik Leppkes
a51c2fcdc1
Merge commit ' 85990140e7'
...
* commit '85990140e7 ':
dca: Add math helpers.
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-02 12:53:14 +01:00
Hendrik Leppkes
e23c3a13e3
Merge commit ' 90b1b9350c'
...
* commit '90b1b9350c ':
arm: add ff_int32_to_float_fmul_array8_neon
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-02 11:21:36 +01:00
Hendrik Leppkes
e97e2588ca
Merge commit ' a0fc780a20'
...
* commit 'a0fc780a20 ':
arm64: int32_to_float_fmul neon asm
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-02 11:21:16 +01:00
Hendrik Leppkes
10e075c138
Merge commit ' 705f5e5e15'
...
* commit '705f5e5e15 ':
arm64: port synth_filter_float_neon from arm
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-02 11:14:28 +01:00
Hendrik Leppkes
de3a33784c
Merge commit ' c33c1fa8af'
...
* commit 'c33c1fa8af ':
arm64: convert dcadsp neon asm from arm
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-02 11:10:24 +01:00
Hendrik Leppkes
e754c8e8ca
Merge commit ' e2710e790c'
...
* commit 'e2710e790c ':
arm: add a cpu flag for the VFPv2 vector mode
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-02 11:01:29 +01:00
Hendrik Leppkes
00e91d0676
Merge commit ' 5dfe4edad6'
...
* commit '5dfe4edad6 ':
x86_64: int32_to_float_fmul_scalar sign extend integer length
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-02 10:46:18 +01:00
Hendrik Leppkes
92fe2adc1b
Merge commit ' de9e199a03'
...
* commit 'de9e199a03 ':
lavc: make avpriv_mpa_decode_header private on next bump
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-01 17:05:37 +01:00
Hendrik Leppkes
42ff56e362
lavc: fix profile declarations for vdpau decoders
2016-01-01 16:48:47 +01:00
Hendrik Leppkes
1e96b151fa
Merge commit ' 955aec3c7c'
...
* commit '955aec3c7c ':
mpegaudiodecheader: check the header in avpriv_mpegaudio_decode_header
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-01 16:47:27 +01:00
Hendrik Leppkes
15c60c8af2
Merge commit ' cea1eef25c'
...
* commit 'cea1eef25c ':
lavc: get the profile name through the codec descriptor in avcodec_string()
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-01 16:29:28 +01:00
Hendrik Leppkes
e760641720
lavc: add vp9 profiles to AVCodecDescriptor
2016-01-01 16:25:50 +01:00
Hendrik Leppkes
5e8b053452
Merge commit ' 2c6811397b'
...
* commit '2c6811397b ':
lavc: add profiles to AVCodecDescriptor
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-01 16:20:39 +01:00
Maxym Dmytrychenko
3b6473b43e
qsvdec: properly handle the warning from MFXVideoCORE_SyncOperation
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-01 16:09:14 +01:00
Maxym Dmytrychenko
a43905f4ae
qsvenc_hevc: improve the default settings
...
Use 8 B-frames and modify the GOP size to be a multiple of the B-frame
count.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-01 16:09:14 +01:00
Anton Khirnov
9d74012761
h264: improve behaviour with invalid reference lists
...
Before 741b494fa8 , when the reference list
modification description was invalid, the code would substitute the
corresponding reference from the initial ("default") reference list.
After that commit, it will just return an error.
Since there are apparently invalid samples in the wild that used to play
fine with the old code, it is a good idea to re-add some sort of error
resilience here. So, when the reference list modification results in a
missing frame, substitute a previous reference frame for it. The
relevant sample again decodes fine with the same output as previously.
2016-01-01 16:09:14 +01:00
Michael Niedermayer
3843e52cb4
avcodec/ffv1enc: Support AV_PIX_FMT_YA8
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-01 01:32:07 +01:00
Michael Niedermayer
48985576b1
avcodec/ffv1dec: Support AV_PIX_FMT_YA8
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-01 01:32:06 +01:00
Andreas Cadhalpun
7ea2db6eaf
mjpegdec: extend check for incompatible values of s->rgb and s->ls
...
This can happen if s->ls changes from 0 to 1, but picture allocation is
skipped due to s->interlaced.
In that case ff_jpegls_decode_picture could be called even though the
s->picture_ptr frame has the wrong pixel format and thus a wrong
linesize, which results in a too small zero buffer being allocated.
This fixes an out-of-bounds read in ls_decode_line.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-12-31 17:30:25 +01:00
Alexandra Hájková
40d9496773
dca: use defines for subband related constants
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2015-12-31 11:40:32 +01:00