1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

37297 Commits

Author SHA1 Message Date
Clément Bœsch
822f1a7913 Merge commit 'e9bfff1cc66c85b91b262c41e8aa5e8685606225'
* commit 'e9bfff1cc66c85b91b262c41e8aa5e8685606225':
  lavc: free buffer_frame/pkt on avcodec_open2() failure

This commit is a noop, see 27adf9f9cd.

Only reordered to reduce diff.

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-18 19:27:56 +01:00
Carl Eugen Hoyos
9e6b269fea lavc/avcodec: Constify AVBitStreamFilter* in AVBitStreamFilterContext struct.
Fixes a gcc warning:
libavcodec/bitstream_filter.c:71:20: warning: assignment discards 'const' qualifier from pointer target type
2017-03-17 23:46:47 +01:00
Tobias Rapp
205b8fd078 avcodec: estimate output bitrate for uncompressed video codecs
Allows to get a more realistic total bitrate (and estimated file size)
in avi_write_header. Previously a static default value of 200k was
assumed.

Adds an internal helper function for bitrate guessing.

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-17 11:55:16 +01:00
Konda Raju
2db5ab73d4 avcodec/nvenc: allow different const-qps for I, P and B frames
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-03-17 10:42:55 +01:00
wm4
b4b8ca24f6 avcodec: fix uninitialized variable read
This cna happen if the user tries to call the new decode API for
subtitles.

Fixes CID 1402071.
2017-03-17 00:29:03 +01:00
Carl Eugen Hoyos
5dd7ea9f56 lavc/internal: Constify AVPacket* in AVCodecInternal.
Fixes a gcc warning:
libavcodec/utils.c:2244:26: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
2017-03-16 21:14:34 +01:00
Carl Eugen Hoyos
0d34dbc272 lavc/avpacket: Make pkt parameter of av_packet_get_side_data() const.
Reflects the actual code and silences a gcc warning:
libavcodec/utils.c:2102:36: warning: passing argument 1 of 'av_packet_get_side_data' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
2017-03-16 21:09:41 +01:00
Clément Bœsch
8286c359ad Merge commit 'e99ecda55082cb9dde8fd349361e169dc383943a'
* commit 'e99ecda55082cb9dde8fd349361e169dc383943a':
  checkasm: add vp9 MC tests.
  vp9mc/x86: sse2 MC assembly.
  vp9mc/x86: add AVX and AVX2 MC
  vp9mc/x86: rename ff_* to ff_vp9_*
  vp9mc/x86: rename ff_avg[48]_sse to ff_avg[48]_mmxext
  vp9mc/x86: simplify a few inits.
  vp9mc/x86: add 16px functions (64bit only).

Noop (aside from a formatting comment in vp9mc.asm). We already have all
of this. We should consider making a final diff between the two projects
when the dust comes down.

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-16 20:25:39 +01:00
Clément Bœsch
a4f5e79f7c Merge commit '89466de4aeaf5e359489b81b8a9920a2bc7936d6'
* commit '89466de4aeaf5e359489b81b8a9920a2bc7936d6':
  vp9/x86: rename vp9dsp to vp9mc

File was already renamed, only the top description is updated.

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-16 20:10:47 +01:00
Michael Niedermayer
a3a4082599 avcodec/h264_cabac: Fix runtime error: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself
Fixes: 858/clusterfuzz-testcase-5168477042114560

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-16 16:16:05 +01:00
Michael Niedermayer
2898bc522d avcodec/h264idct_template: fix multiple runtime error: signed integer overflow
Fixes: 857/clusterfuzz-testcase-5319093760557056

Benchmark changes from 335->333 (so if its not a random fluctuation then it would be faster)

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-16 16:16:05 +01:00
Matthieu Bouron
0c6105dde0 lavc/tests/dct/aarch64: add ff_simple_idct_neon test 2017-03-16 12:00:41 +01:00
Matthieu Bouron
4c8e528d19 lavc/aarch64: add ff_simple_idct{,_add,_put}_neon functions 2017-03-16 12:00:41 +01:00
James Almer
6c4665deb4 Merge commit '89aebc5bcc6e23a0a79c3f51c3a55c3571692ba0'
* commit '89aebc5bcc6e23a0a79c3f51c3a55c3571692ba0':
  lavc: align the linesize to 32 when AVX is enabled

Merged-by: James Almer <jamrial@gmail.com>
2017-03-15 22:16:53 -03:00
James Almer
e632fe9bab Merge commit '3c504bc3599f00bfc5923adc114beef34bce11d0'
* commit '3c504bc3599f00bfc5923adc114beef34bce11d0':
  x86: deduplicate some constants

Merged-by: James Almer <jamrial@gmail.com>
2017-03-15 22:07:28 -03:00
James Almer
e298497f0c Merge commit '3ccec334b8502701e72ef13bed25913c3578022e'
* commit '3ccec334b8502701e72ef13bed25913c3578022e':
  sbrdsp: Move a misplaced #endif directive to the right spot

Merged-by: James Almer <jamrial@gmail.com>
2017-03-15 21:37:40 -03:00
Michael Niedermayer
cfa10e11be avcodec/tiff: Check palette shift
Fixes multiple  runtime error: shift exponent 792 is too large for 32-bit type 'unsigned int'

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-16 01:04:35 +01:00
Michael Niedermayer
58e9c7f4a2 avcodec/wavpack: Fix multiple integer overflows
Fixes: 839/clusterfuzz-testcase-4871084446842880

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-16 01:04:35 +01:00
Michael Niedermayer
45198477de avcodec/simple_idct_template: Fix several integer overflows
Benchmarks with START_TIMER indicate that the code is faster with unsigned, (that is
with the patch), there was quite some fluctuation in the numbers so this may be just
random

Fixes: 811/clusterfuzz-testcase-6465493076541440

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-16 01:04:35 +01:00
Clément Bœsch
d96f6df3a6 Merge commit '7ebdffc353f3f0827864e8e3461fdc00cc243b14'
* commit '7ebdffc353f3f0827864e8e3461fdc00cc243b14':
  dxv: Check to make sure we don't overrun buffers on corrupt inputs

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-15 23:26:10 +01:00
Clément Bœsch
aabe525734 Merge commit 'e328178da90f44690e0076f4dbfd16da9175f441'
* commit 'e328178da90f44690e0076f4dbfd16da9175f441':
  qsvdec: only access hwaccel_context is the pixel format is QSV

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-15 23:22:50 +01:00
Clément Bœsch
4ac44520e5 Merge commit '8495d84f0101464b15517860db33e8605586d87e'
* commit '8495d84f0101464b15517860db33e8605586d87e':
  ac3dec: Add some inline hints

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-15 21:58:13 +01:00
Clément Bœsch
151b5e4a53 Merge commit '3db51bf671defd47f2ec5ab67b11fb7730fb5e5a'
* commit '3db51bf671defd47f2ec5ab67b11fb7730fb5e5a':
  ac3dec: Simplify skipping

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-15 21:57:57 +01:00
Clément Bœsch
2e3221c303 Merge commit 'f0ccc65bc9ab9ddf1366066395564c71bcc825ee'
* commit 'f0ccc65bc9ab9ddf1366066395564c71bcc825ee':
  ac3dec: Split coupling-specific code from decode_audio_block()

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-15 21:56:47 +01:00
Clément Bœsch
7c4dbd1df9 Merge commit 'a5ebe5d1217942238c641c83b24ef1106e53934a'
* commit 'a5ebe5d1217942238c641c83b24ef1106e53934a':
  ac3dec: Split spx-specific code from decode_audio_block()

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-15 21:43:59 +01:00
Clément Bœsch
e40fd81809 Merge commit 'a115eb9e750543f1d8bf951414d291069bf396c2'
* commit 'a115eb9e750543f1d8bf951414d291069bf396c2':
  mimic: do not release the newly obsolete reference at the end of decoding

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-15 21:23:30 +01:00
Steven Liu
0052f3f527 avcodec/videotoolboxenc: add rc_max_bitrate control into videotoolbox
add kVTCompressionPropertyKey_DataRateLimits support by rc_max_bitrate

Reviewed-by: Rick Kern <kernrj@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-03-15 09:37:25 -04:00
Clément Bœsch
6426c58b1c Merge commit '48b80f8393d418ad35d73f5a36f5011de1928f3c'
* commit '48b80f8393d418ad35d73f5a36f5011de1928f3c':
  hpeldsp: Explain why put_no_rnd_pixels_tab is larger than necessary

Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-03-15 12:34:51 +01:00
Clément Bœsch
89a032634b Merge commit 'b183abfb5b6366b177cf44f244c66156257a6fd6'
* commit 'b183abfb5b6366b177cf44f244c66156257a6fd6':
  vpx: Support color range

Decoder chunk not merged as the framework automatically copies avctx
color range to the frame color range. And we already set the avctx field
since cbcc88c039.

Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-03-15 12:23:18 +01:00
Matthieu Bouron
1ade4d87ba lavc/h264dec: use OFFSET macro 2017-03-15 11:46:15 +01:00
Michael Niedermayer
8ebed703f1 avcodec/mpegaudiodec_template: Make l3_unscale() work with e=0
Fixes undefined behavior
Fixes: 830/clusterfuzz-testcase-6253175327686656

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-14 22:48:49 +01:00
Michael Niedermayer
108b02e547 avcodec/tiff: Check for multiple geo key directories
Fixes memleak
Fixes: 826/clusterfuzz-testcase-5316921379520512

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-14 22:48:49 +01:00
Michael Niedermayer
0728d9a281 avcodec/pictordec: Fix runtime error: left shift of 805306368 by 2 places cannot be represented in type 'int'
Fixes: 823/clusterfuzz-testcase-6727060074528768

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-14 22:48:49 +01:00
Michael Niedermayer
7cebc5a9cc avcodec/wavpack: Fix runtime error: shift exponent 32 is too large for 32-bit type 'int'
Fixes: 822/clusterfuzz-testcase-4873433189974016

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-14 02:23:50 +01:00
Michael Niedermayer
acdacb108d avcodec/targa: Skip hflip on blank images
Fixes: timeout with 810/clusterfuzz-testcase-5249282825256960

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-14 02:23:50 +01:00
Michael Niedermayer
1467143a6e avcodec/wavpack: Fix runtime error: shift exponent 137 is too large for 32-bit type 'int'
Fixes: 808/clusterfuzz-testcase-4715513349406720

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-14 02:23:50 +01:00
Michael Niedermayer
a557ae8d52 avcodec/h264_direct: Fix runtime error: signed integer overflow: 2147483647 - -14133 cannot be represented in type 'int'
Fixes: 755/clusterfuzz-testcase-5369072516595712

See: [FFmpeg-devel] [PATCH 1/2] avcodec/h264_direct: Fix runtime error: signed integer overflow: 2147483647 - -14133 cannot be represented in type 'int'

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-14 02:23:50 +01:00
Paul B Mahol
fbfbd97be2 avcodec/xpmdec: there are XPM files with dos line endings
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-03-13 20:40:41 +01:00
Michael Niedermayer
967feea5eb avcodec/vp6: clear dimensions on failed resolution change in vp6_parse_header()
Fixes: 807/clusterfuzz-testcase-6470061042696192
Fixes null pointer dereference

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-13 04:48:43 +01:00
Michael Niedermayer
a66c6e28b5 avcodec/rv34: Fix runtime error: signed integer overflow: 36880 * 66288 cannot be represented in type 'int'
Fixes: 768/clusterfuzz-testcase-4807444305805312

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-13 04:48:43 +01:00
Michael Niedermayer
a720b854b0 avcodec/mpeg12dec: Fix runtime error: left shift of negative value -1
Fixes: 764/clusterfuzz-testcase-6273034652483584

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-13 04:48:43 +01:00
Paul B Mahol
58f0bbc1ea avcodec/xpmdec: avoid "magic" numbers in function hex_char_to_number()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-03-12 23:03:02 +01:00
Paul B Mahol
dd0090eb21 avcodec/xpmdec: fix colors values which are different for X11
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-03-12 23:03:02 +01:00
Paul B Mahol
2b790b1c9e avcodec/xpmdec: do not allow number of colors to be higher than allocated
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-03-12 23:03:02 +01:00
Paul B Mahol
fbc1f323db avcodec/xpmdec: rename yet another function
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-03-12 23:03:02 +01:00
Paul B Mahol
9d7e71a233 avcodec/xpmdec: rename convert to hex_char_to_number
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-03-12 23:03:02 +01:00
Paul B Mahol
7133ab435a avcodec/xpmdec: improve comment for one function and also fix 2 identation issues
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-03-12 23:03:02 +01:00
Paul B Mahol
e73325b971 avcodec/xpmdec: skip everything before signature
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-03-12 18:24:49 +01:00
Paul B Mahol
01b069c1b8 avcodec/codec_desc: add mime type for X-BitMap
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-03-12 18:24:49 +01:00
Paul B Mahol
404d2b977f avcodec/codec_desc: add mime type for X-PixMap
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-03-12 18:24:49 +01:00