Commit Graph

32829 Commits

Author SHA1 Message Date
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
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 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
Michael Niedermayer b160fc290c avcodec/mpegvideo: Clear pointers in ff_mpv_common_init()
This ensures that no stale pointers leak through on any path

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 <michaelni@gmx.at>
2015-07-09 22:47:16 +02:00
Vittorio Giovara 67c884eb07 libvpx: Add the library header
Unbreak make checkheaders
2015-07-09 21:36:19 +02:00
Luca Barbato 461b45efd0 lavc: Add nvenc.h to the skipheader
Unbreak make checkheaders
2015-07-09 21:34:57 +02:00
Ivan Uskov dbf8352a2e libavcodec/qsvenc.c: Fix for too agressive height alignment during frame encoding which may be reason of superflous frame copying.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 17:46:18 +02:00
Michael Niedermayer 7ee935ba5c avcodec/qsvenc_hevc: Attempt to fix error: too few arguments to function ff_hevc_extract_rbsp
Found-by: Ivan Uskov
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 16:51:51 +02:00
Jovan Zelincevic f21b4472ef libavcodec: Implementation of AAC_fixed_decoder (LC-module) [4/4]
Build system modified

There are several warnings occurring during build after this patch is
applied. The cause of most of these warnings is in that some definitions
needed here are logical part of sbr module and are added in later patches.
When this patches are applied these warnings stop occurring.

The only warning that is added here and is not fixed with later patches
is warning that warns that type mismatch for table ff_aac_eld_window_480.

The reason for this warning is in that ER AAC ELD 480 is not integrated in
to the fixed point implementation at this moment and there is no fixed point
version of this table.

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 14:41:41 +02:00
Djordje Pesut b04f46cb4b libavcodec: Implementation of AAC_fixed_decoder (LC-module) [3/4]
Add fixed point implementation

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 14:41:31 +02:00
Jovan Zelincevic 08be74ac81 libavcodec: Implementation of AAC_fixed_decoder (LC-module) [2/4]
Add fixed point implementation of functions for generating tables

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 14:41:19 +02:00
Jovan Zelincevic f497a9e84e libavcodec: Implementation of AAC_fixed_decoder (LC-module) [1/4]
Move existing code to the new template files

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 14:35:44 +02:00
Michael Niedermayer 15893adbdb avcodec/hevc_ps: Remove gotos from ff_hevc_parse_sps()
They are currently unnecessary

Found-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 13:02:07 +02:00
Michael Niedermayer 7871eb4361 Merge commit '66acb76bb0492b263215ca9b4d927a7be39ace02'
* commit '66acb76bb0492b263215ca9b4d927a7be39ace02':
  lavc: add Intel libmfx-based HEVC encoder

Conflicts:
	Changelog
	configure
	libavcodec/Makefile
	libavcodec/allcodecs.c
	libavcodec/qsv.c
	libavcodec/qsvenc.c
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 11:53:14 +02:00
Michael Niedermayer 96ee6b9962 Merge commit '3a85397e8bb477eb34678d9edc52893f57003226'
* commit '3a85397e8bb477eb34678d9edc52893f57003226':
  lavc: add Intel libmfx-based MPEG2 encoder

Conflicts:
	Changelog
	configure
	libavcodec/allcodecs.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 11:17:12 +02:00
Michael Niedermayer 07ae8fa20e Merge commit '69ab9f53f901eac6a649e22d28cf093357870627'
* commit '69ab9f53f901eac6a649e22d28cf093357870627':
  hevc: split bitstream unescaping to a separate file

Conflicts:
	libavcodec/Makefile
	libavcodec/hevc.c

See: afa93d198a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 05:06:48 +02:00
Michael Niedermayer 1dacf26964 avcodec/hevc_ps: Do not return success on failures in ff_hevc_parse_sps()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 04:50:05 +02:00
Michael Niedermayer 1d4194e696 Merge commit 'fd124d8357b1becfde3ac8d5e3320127cf97a5b7'
* commit 'fd124d8357b1becfde3ac8d5e3320127cf97a5b7':
  hevc_ps: split the code for parsing the SPS and exporting it into the context

Conflicts:
	libavcodec/hevc.c
	libavcodec/hevc_ps.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 04:50:00 +02:00
James Almer c118101662 avcodev/libdcadec: implement request_channel_layout
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-07-08 23:04:17 -03:00
Ivan Uskov b409748bc4 libavcodec/qsvenc.c: fix incorrect loop condition.
For example, the encoder may return MFX_WRN_INCOMPATIBLE_VIDEO_PARAM warning
i.e. ret==5 old loop implementation will repeat several times until output buffer
overflow. New implementation explicitly uses loop only for device busy case.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 02:25:39 +02:00
Michael Niedermayer 4a2bcdb28b Merge commit '1761ab838c75223a6b97d8c0720d09275374c53d'
* commit '1761ab838c75223a6b97d8c0720d09275374c53d':
  lavc: Deprecate avctx.rc_strategy

Conflicts:
	libavcodec/mpegvideo.h
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 01:17:49 +02:00
Michael Niedermayer edfcbf7c83 Merge commit '02b7c630875c0bc63cee5ec597aa33baf9bf4e20'
* commit '02b7c630875c0bc63cee5ec597aa33baf9bf4e20':
  h261: Signal freeze picture release for intra frames

Conflicts:
	tests/ref/vsynth/vsynth1-h261
	tests/ref/vsynth/vsynth2-h261

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 00:49:20 +02:00
Michael Niedermayer a137e50ee5 Merge commit 'dc1de0b958836545339611e9c050a1d4fdded263'
* commit 'dc1de0b958836545339611e9c050a1d4fdded263':
  h261: Set 'still image mode off' in picture header

Conflicts:
	tests/ref/vsynth/vsynth1-h261
	tests/ref/vsynth/vsynth2-h261

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 00:33:52 +02:00
Anton Khirnov 66acb76bb0 lavc: add Intel libmfx-based HEVC encoder 2015-07-08 23:40:11 +02:00
Anton Khirnov 3a85397e8b lavc: add Intel libmfx-based MPEG2 encoder 2015-07-08 23:39:28 +02:00
Anton Khirnov 69ab9f53f9 hevc: split bitstream unescaping to a separate file
It will be useful in the QSV HEVC encoder.
2015-07-08 23:38:32 +02:00
Anton Khirnov fd124d8357 hevc_ps: split the code for parsing the SPS and exporting it into the context
This will be useful in the later commits, where we want to parse an SPS
without having a whole decoding context.
2015-07-08 23:36:22 +02:00
Michael Niedermayer 3c63d06d81 avcodec/h264_slice: Fix container cropping
Fixes out of array read
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 <michaelni@gmx.at>
2015-07-08 17:50:05 +02:00