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

32854 Commits

Author SHA1 Message Date
Michael Niedermayer
d13fc98247 Merge commit '18156b53f9b642b71c182c5c9818175a61572d2b'
* commit '18156b53f9b642b71c182c5c9818175a61572d2b':
  hevc: do not pass an entire HEVCContext into export_stream_params()

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 16:31:10 +02:00
Michael Niedermayer
39bbdebb1e avcodec/sanm: Reset sizes in destroy_buffers()
Fixes crash in 1288a2fe8e9ae6b00ca40e089d08ca65_signal_sigsegv_7ffff71426a7_354_accident.san with allocation limit 65536

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 16:06:37 +02:00
Michael Niedermayer
f7068bf277 avcodec/alac: Clear pointers in allocate_buffers()
Fixes: 06a4edb39ad8a9883175f9bd428334a2_signal_sigsegv_7ffff713351a_706_mov__alac__ALAC_6ch.mov

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 15:47:49 +02:00
James Almer
1aab5d8ab1 avcodec/dxva2_hevc: unbreak compilation after recent sps/pps changes
Signed-off-by: James Almer <jamrial@gmail.com>
2015-07-13 00:06:02 -03:00
Philip Langdale
b11c3fce38 avcodec/vdpau_hevc: unbreak compilation after sps/pps changes
There was some reorganisation in the HEVC headers so the sps and pps
now live in a different place.
2015-07-12 19:56:54 -07:00
Michael Niedermayer
10d7d0880c avcodec/utils: Check that the sample rate is not negative when opening an encoder
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 03:51:33 +02:00
Michael Niedermayer
d6ff68ad85 Factor duplicated ff_fast_malloc() out into mem_internal.h
internal.h is difficult to use due to circular dependancies
mem.h is a public header ff_* is not public
Alternative solutions probably are possible too

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 02:41:43 +02:00
Michael Niedermayer
4496ccc724 avcodec/hevc_parser: Reenable the old parser under ADVANCED_PARSER define
Feel free to use either, they both work but the old one provides
more information but needs the hevc decoder

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 02:14:58 +02:00
Michael Niedermayer
9e810a98a2 Merge commit '650060dfb665552442ec11b456660e3e9a9d9016'
* commit '650060dfb665552442ec11b456660e3e9a9d9016':
  hevc_parser: parse and export some stream parameters

Conflicts:
	configure
	libavcodec/hevc_parser.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 01:28:57 +02:00
Michael Niedermayer
99558270ed avcodec/hevc: Simplify skipped_bytes_pos code further
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 01:09:21 +02:00
Michael Niedermayer
ad92410d90 avcodec/hevc: Move skipped_bytes_pos_nal to HEVCNAL, simplify code
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 00:43:25 +02:00
Michael Niedermayer
bcc6c7bb65 avcodec/hevc: Move skipped_bytes_pos_size_nal into HAVCNAL
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 00:38:15 +02:00
Michael Niedermayer
5620ed3557 avcodec/hevc: Remove skipped_bytes_nal, simplify code
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 00:03:45 +02:00
Michael Niedermayer
93aa84c1ea Merge commit '7f78155dc6b65be55efb5309b6dd2bb33925a8c4'
* commit '7f78155dc6b65be55efb5309b6dd2bb33925a8c4':
  hevc: improve a comment

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-12 23:45:56 +02:00
Michael Niedermayer
4690a63632 Merge commit 'd82e1adc2019135a2fc45372e0ed0b5ef107cdd0'
* commit 'd82e1adc2019135a2fc45372e0ed0b5ef107cdd0':
  hevc: move splitting the packet into NALUs into a separate function

Conflicts:
	libavcodec/hevc.c
	libavcodec/hevc.h
	libavcodec/hevc_parse.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-12 23:44:24 +02:00
Michael Niedermayer
4c42c66935 Merge commit 'ae05b4865514fd71b5e9431e93aa0d03d7ba7751'
* commit 'ae05b4865514fd71b5e9431e93aa0d03d7ba7751':
  hevc: eliminate the second call to hls_nal_unit()

Conflicts:
	libavcodec/hevc.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-12 22:55:47 +02:00
Michael Niedermayer
760304e4c3 Merge commit 'd7bebe4805193783f0b6f292f9127a75709fb7d9'
* commit 'd7bebe4805193783f0b6f292f9127a75709fb7d9':
  hevc: skip invalid/ignored NALUs when splitting the packet

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-12 22:46:06 +02:00
Michael Niedermayer
d5fcca83b9 Merge commit 'b11acd57326db6c2cc1475dd0bea2a06fbc85aa2'
* commit 'b11acd57326db6c2cc1475dd0bea2a06fbc85aa2':
  hevc: remove HEVCContext usage from hevc_ps

Conflicts:
	libavcodec/hevc.c
	libavcodec/hevc_cabac.c
	libavcodec/hevc_filter.c
	libavcodec/hevc_mvs.c
	libavcodec/hevc_ps.c
	libavcodec/hevc_refs.c
	libavcodec/hevcpred_template.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-12 22:28:54 +02:00
Michael Niedermayer
ddd86e4747 Merge commit 'ab05ed4c322ed0488ac9b5d2ef5d4ffa55a946a7'
* commit 'ab05ed4c322ed0488ac9b5d2ef5d4ffa55a946a7':
  mpegvideo_parser: export pixel format and dimensions

Conflicts:
	libavcodec/mpegvideo_parser.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-12 21:34:59 +02:00
Michael Niedermayer
98c7f9741e Merge commit '86eee85daddb682fa072c2e2657c90a514b855e3'
* commit '86eee85daddb682fa072c2e2657c90a514b855e3':
  bytestream2: set the reader to the end when reading more than available

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-12 21:13:07 +02:00
Niklesh
774ceee17e movtextdec.c: Add support for highlight and hilightcolor box
Signed-off-by: Niklesh <niklesh.lalwani@iitb.ac.in>
2015-07-12 10:24:17 -07:00
Anton Khirnov
18156b53f9 hevc: do not pass an entire HEVCContext into export_stream_params()
It only needs the parameter sets.
2015-07-12 18:52:02 +02:00
James Almer
a3b721d10d avcodec/dcadec: silence request_channels deprecation warnings
This also prevents an eventual compilation failure once request_channels
is removed.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-07-12 13:32:22 -03:00
Anton Khirnov
650060dfb6 hevc_parser: parse and export some stream parameters
Particularly those that will be needed by the QSV decoder.
More can be added later as necessary.
2015-07-12 18:15:40 +02:00
Anton Khirnov
7f78155dc6 hevc: improve a comment
That loop does the actual full decoding, so 'parse' can be misleading.
2015-07-12 18:15:40 +02:00
Anton Khirnov
d82e1adc20 hevc: move splitting the packet into NALUs into a separate function
This function is independent of the decoding context, so we'll be able
to use it in the parser.
2015-07-12 18:15:39 +02:00
Anton Khirnov
ae05b48655 hevc: eliminate the second call to hls_nal_unit()
Also, make hls_nal_unit() work only on the provided NAL unit, without
requiring a whole decoding context.

This will allow splitting this code for reuse by the parser.
2015-07-12 18:15:39 +02:00
Anton Khirnov
d7bebe4805 hevc: skip invalid/ignored NALUs when splitting the packet
There is no need to wait until actually decoding the NALU. This will
allow to get rid of the second hls_nal_unit() call later.
2015-07-12 18:15:39 +02:00
Anton Khirnov
b11acd5732 hevc: remove HEVCContext usage from hevc_ps
Factor out the parameter sets into a separate struct and use it instead.

This will allow us to reuse this code in the parser.
2015-07-12 18:15:39 +02:00
Anton Khirnov
ab05ed4c32 mpegvideo_parser: export pixel format and dimensions 2015-07-12 18:15:39 +02:00
Anton Khirnov
86eee85dad bytestream2: set the reader to the end when reading more than available
This prevents possible infinite loops with the calling code along the
lines of while (bytestream2_get_bytes_left()) { ... }, where the reader
does not advance.

CC: libav-stable@libav.org
2015-07-12 18:15:39 +02:00
Andreas Cadhalpun
9f4c7397a2 hevc: check slice address length
It is used as get_bits argument and reading 0 bits doesn't make sense.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-07-12 18:15:39 +02:00
Michael Niedermayer
e72988d3f8 Merge commit '355864ef7a9548ee6491a25de1e0650bd983a667'
* commit '355864ef7a9548ee6491a25de1e0650bd983a667':
  g726: Do not crash on user mistake

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-12 15:08:30 +02:00
Michael Niedermayer
f8db81074a avcodec/utils: Assert that the pointer is set when size is in ff_fast_malloc()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-11 23:36:45 +02:00
Michael Niedermayer
59a07df067 avcodec/utils: Avoid undefined void casts in ff_fast_malloc()
based on code from libavutil/mem.c

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-11 23:24:16 +02:00
Michael Niedermayer
bc976e5793 avcodec/utils: Fix potential overflow in overallocation code
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-11 22:46:44 +02:00
Luca Barbato
355864ef7a g726: Do not crash on user mistake
Properly report the sample rate as invalid

CC: libav-stable@libav.org
2015-07-11 18:45:44 +02:00
Michael Niedermayer
c06e556274 avcodec/mpeg4videodec: Check P cbpy
Fixes undefined behavior
Fixes: signal_sigsegv_c3097a_991_xtrem_e2_m64q15_a32sxx.3gp

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-11 00:22:29 +02:00
Andreas Cadhalpun
75fd5ce4c1 imc: use correct position for flcoeffs2 calculation
flcoeffs2[pos] should be the log2 of flcoeffs1[pos].
flcoeffs1[0] can be 0 here, thus flcoeffs2[pos] gets set to -inf,
causing problems further down.

This seems to have been copied from imc_decode_level_coefficients in
commit 4eb4bb3 without updating the position.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-07-11 00:00:36 +02:00
Michael Niedermayer
d759f7f1d0 avcodec/j2kenc: remove unused variable
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-10 23:24:20 +02:00
Andreas Cadhalpun
1410eeb6ea imc: Use correct position for flcoeffs2 calculation
flcoeffs2[pos] should be the log2 of flcoeffs1[pos].
flcoeffs1[0] can be 0 here, thus flcoeffs2[pos] gets set to -inf,
causing problems further down.

This seems to have been copied from imc_decode_level_coefficients in
commit 4eb4bb3 without updating the position.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-07-10 23:13:30 +02:00
Andreas Cadhalpun
05cc8c8e4b hevc: check slice address length
It is used as get_bits argument and reading 0 bits isn't supported.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-07-10 21:28:56 +02:00
Michael Niedermayer
47d077337a avcodec/utils: Document 32 min for h264 width
Suggested-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-10 18:31:42 +02:00
Michael Niedermayer
b1e242bc56 avcodec/g2meet: Check R/G/B values in epic_decode_pixel_pred()
Fixes: asan_double-free_d34593_861_smp3.wmv

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-10 18:11:28 +02:00
Andreas Cadhalpun
3526a120f9 snow: remove an obsolete av_assert2
It asserts that the frame linesize is larger than 37, but it can be
smaller and decoding such frames works.

Before commit cc884a35 src_stride > 7*MB_SIZE was necessary, because the
blocks were interleaved in the tmp buffer and the last block was added
with an offset of 6*MB_SIZE.
It was changed for src_stride <= 7*MB_SIZE to write the blocks
sequentially, hence the larger tmp_step.
After that the assert was only necessary to make sure that the buffer
remained large enough.
Since commit bd2b6b33 s->scratchbuf is used as tmp buffer.
As part of commit 86e107a7 the minimal scratchbuf size was increased to
256*7*MB_SIZE, which is enough for any src_stride <= 7*MB_SIZE.

Also add a comment explaining the tmp_step calculation.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-07-10 16:21:50 +02:00
Michael Niedermayer
7ef6656b1e avcodec/utils: use a minimum 32pixel width in avcodec_align_dimensions2() for H.264
Fixes Assertion failure
Found-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-10 15:18:41 +02:00
Michael Niedermayer
e71ca21f30 avcodec/motion_est_template: Fix undefined behavior in small_diamond_search()
Fixes: asan_heap-oob_394322e_138_cov_4265020547_CVPCMNL1_SVA_C.264

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-10 13:42:41 +02:00
Michael Niedermayer
7b404c94f3 avcodec/libopenh264enc: Do not truncate frame rate
Suggested-by: Gregory J Wolfe <gregory.wolfe@kodakalaris.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-10 04:19:07 +02:00
Michael Niedermayer
033dc39c56 Merge commit '67c884eb07c7e9f2cb72bb8d447d945e5ac8cac7'
* commit '67c884eb07c7e9f2cb72bb8d447d945e5ac8cac7':
  libvpx: Add the library header

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-10 02:32:08 +02:00
Ivan Uskov
5985316fba libavcodec/qsvenc.c: improving handling for return codes of MFXVideoENCODE_EncodeFrameAsync
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-10 01:26:16 +02:00