Commit Graph

32421 Commits

Author SHA1 Message Date
Michael Niedermayer
513673a84d Merge commit '7ca603f96f93d988e01d161d611f69a4ecaa3f02'
* commit '7ca603f96f93d988e01d161d611f69a4ecaa3f02':
  jpegls: Check memory allocation

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 01:58:44 +02:00
Michael Niedermayer
73e150fff7 Merge commit '7d2a6826912b629f17f3b0c5268e334fa123c4c9'
* commit '7d2a6826912b629f17f3b0c5268e334fa123c4c9':
  huffyuv: Check memory allocation

See: 4a722a5cab
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 01:57:29 +02:00
Michael Niedermayer
10531d48a0 Merge commit '7fccc96dc3c0bb2fa2079cbf4e4cf1aff2db46c8'
* commit '7fccc96dc3c0bb2fa2079cbf4e4cf1aff2db46c8':
  eatgv: Check memory allocation

Conflicts:
	libavcodec/eatgv.c

See: a5615b82eb
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 01:45:39 +02:00
Michael Niedermayer
3a8b16f78e Merge commit '69277069dd225f5ae02f0215e877a06522d834d3'
* commit '69277069dd225f5ae02f0215e877a06522d834d3':
  dct: Check memory allocation

Conflicts:
	libavcodec/dct.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 01:42:13 +02:00
Michael Niedermayer
7110b024a9 Merge commit 'e524f37356156893cae50fc46451bd4a6198703d'
* commit 'e524f37356156893cae50fc46451bd4a6198703d':
  asv: Check memory allocation

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 01:41:21 +02:00
Michael Niedermayer
e7a65142b9 avcodec/aacpsy: Clear the correct pointer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 01:32:24 +02:00
Michael Niedermayer
63fdedc794 Merge commit '074a1b37325bf6d1483fc23ebf1255e78d998339'
* commit '074a1b37325bf6d1483fc23ebf1255e78d998339':
  aacpsy: Check memory allocation

Conflicts:
	libavcodec/aacpsy.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 01:32:12 +02:00
Michael Niedermayer
0f69f02eb7 Merge commit '149fa0b7ac180fe1df48a2e379c560813555bf57'
* commit '149fa0b7ac180fe1df48a2e379c560813555bf57':
  mpegvideo: Move MotionEstContext and function declarations to a separate header

Conflicts:
	libavcodec/mpegvideo.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 01:30:01 +02:00
Michael Niedermayer
0aba7192e1 Merge commit 'b2b766914a49c4e3537df3a585e97b98d432edd2'
* commit 'b2b766914a49c4e3537df3a585e97b98d432edd2':
  mpegvideo: mpeg12: Move function declarations

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 01:27:02 +02:00
Michael Niedermayer
fd116b8dfa Merge commit '378a00087fdadcc9b34165c05cd10a1a15f3fe61'
* commit '378a00087fdadcc9b34165c05cd10a1a15f3fe61':
  mpegvideo: Move tables to a separate file

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 01:26:36 +02:00
Michael Niedermayer
eb5a308d0e Merge commit '31a117a0e6d6eafdf997bfe0843f3e3d39cc0332'
* commit '31a117a0e6d6eafdf997bfe0843f3e3d39cc0332':
  mpegvideo: msmpeg4: Move function declarations

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 01:17:26 +02:00
Michael Niedermayer
f5ee10c16a Merge commit '2f15846ad7ad57beb0bca99c624affa0facf284b'
* commit '2f15846ad7ad57beb0bca99c624affa0facf284b':
  mpegvideo: wmv2: Move function declarations

Conflicts:
	libavcodec/wmv2.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 01:09:38 +02:00
James Almer
c16e99e3b3 x86: check for AV_CPU_FLAG_AVXSLOW where useful
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 00:15:35 +02:00
Michael Niedermayer
1ff47770ca Merge commit 'd0bf20a4f25ac5de021c860a0c8ad05638ee2078'
* commit 'd0bf20a4f25ac5de021c860a0c8ad05638ee2078':
  ppc: vsx: Implement diff_pixels and get_pixels

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-31 23:55:32 +02:00
Michael Niedermayer
08f229d81e Merge commit '7014b65995b1fe6188fb53447bf61b08e3963355'
* commit '7014b65995b1fe6188fb53447bf61b08e3963355':
  ppc: pixblockdsp: Use the abriged vector types

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-31 21:48:16 +02:00
Luca Barbato
b08caa87c3 nvenc: H264 and HEVC encoders
Partially based on the work of Timo Rothenpieler <timo@rothenpieler.org>

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-31 15:17:22 +02:00
Vittorio Giovara
522d971c7f xsub: Check memory allocation 2015-05-31 15:03:31 +02:00
Vittorio Giovara
e1ea365f7e truemotion2: Check memory allocation 2015-05-31 15:03:31 +02:00
Vittorio Giovara
28fb80dcbf svq1: Check memory allocation 2015-05-31 15:03:31 +02:00
Vittorio Giovara
42df71d9bb ratecontrol: Check memory allocation 2015-05-31 15:03:31 +02:00
Vittorio Giovara
0994e14213 pthread: Check memory allocation 2015-05-31 15:03:31 +02:00
Vittorio Giovara
03927cb733 psymodel: Check memory allocation 2015-05-31 15:03:31 +02:00
Vittorio Giovara
7ca603f96f jpegls: Check memory allocation 2015-05-31 15:03:31 +02:00
Vittorio Giovara
7d2a682691 huffyuv: Check memory allocation 2015-05-31 15:03:31 +02:00
Vittorio Giovara
7fccc96dc3 eatgv: Check memory allocation 2015-05-31 15:03:31 +02:00
Vittorio Giovara
83797da6e3 wma: Check memory allocation 2015-05-31 15:03:31 +02:00
Vittorio Giovara
fef2f4722b xvid: Check memory allocation 2015-05-31 15:03:31 +02:00
Vittorio Giovara
9fb483fede x264: Check memory allocation 2015-05-31 15:03:31 +02:00
Vittorio Giovara
41658bc885 libtheora: Check memory allocation 2015-05-31 15:03:31 +02:00
Vittorio Giovara
8df5fbf0b0 lcl: Check memory allocation 2015-05-31 15:03:31 +02:00
Vittorio Giovara
69277069dd dct: Check memory allocation 2015-05-31 15:03:30 +02:00
Vittorio Giovara
e524f37356 asv: Check memory allocation 2015-05-31 15:03:30 +02:00
Vittorio Giovara
074a1b3732 aacpsy: Check memory allocation 2015-05-31 15:03:30 +02:00
Vittorio Giovara
149fa0b7ac mpegvideo: Move MotionEstContext and function declarations to a separate header 2015-05-31 13:06:19 +02:00
Vittorio Giovara
b2b766914a mpegvideo: mpeg12: Move function declarations 2015-05-31 13:06:19 +02:00
Vittorio Giovara
378a00087f mpegvideo: Move tables to a separate file 2015-05-31 13:06:19 +02:00
Vittorio Giovara
31a117a0e6 mpegvideo: msmpeg4: Move function declarations 2015-05-31 13:06:19 +02:00
Vittorio Giovara
2f15846ad7 mpegvideo: wmv2: Move function declarations 2015-05-31 13:06:19 +02:00
Hendrik Leppkes
902a55f716 dxva2_hevc: re-write reference frame handling
The old logic required an explicit clearing of the lists first and was
prone to overflow the DXVA2 struct in some circumstances.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-31 13:05:13 +02:00
Hendrik Leppkes
35818b8aaf dxva2_hevc: fix 32x32 scaling lists
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-31 13:05:13 +02:00
Vittorio Giovara
3f38d4b816 vp9: Parse subsampling and report missing feature 2015-05-31 12:19:19 +02:00
Luca Barbato
d0bf20a4f2 ppc: vsx: Implement diff_pixels and get_pixels
Use a macro to abstract the endianness.
2015-05-31 12:07:11 +02:00
James Almer
d68c05380c x86: check for AV_CPU_FLAG_AVXSLOW where useful
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-31 12:07:11 +02:00
Luca Barbato
da60b99a88 ppc: Restrict some Altivec implementations to Big Endian
In Little Endian the vec_ld/vec_st operations work as
expected only for byte-vectors.
2015-05-31 12:07:11 +02:00
Luca Barbato
7014b65995 ppc: pixblockdsp: Use the abriged vector types 2015-05-31 12:07:10 +02:00
Michael Niedermayer
11aa050a25 avcodec/parser: Print an error in case of reallocation fails in ff_combine_frame()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-31 02:59:06 +02:00
Michael Niedermayer
e9d646f44c Merge commit '0181ae9af2de1526464d23209b82e6674d362f5d'
* commit '0181ae9af2de1526464d23209b82e6674d362f5d':
  h264: Make sure reinit failures mark the context as not initialized

Conflicts:
	libavcodec/h264_slice.c

See: e8714f6f93
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-30 21:33:00 +02:00
Andreas Cadhalpun
3ef5702926 libopenjpegdec: check existence of image component data
libopenjpeg can return images with components without data.

This fixes segmentation faults.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-05-30 20:58:55 +02:00
Luca Barbato
0181ae9af2 h264: Make sure reinit failures mark the context as not initialized
Bug-Id: CVE-2015-3417
CC: libav-stable@libav.org
2015-05-30 16:28:32 +02:00
Luca Barbato
5ecabd3c54 msrle: Use FFABS to determine the frame size in msrle_decode_pal4
As done in msrle_decode_8_16_24_32.

Bug-Id: CVE-2015-3395
CC: libav-stable@libav.org
2015-05-30 16:28:32 +02:00
banastasov
debf4d6e67 avcodec/dvbsubdec: Fix buf_size check in dvbsub_parse_display_definition_segment()
Fixes Ticket4326

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-30 04:29:58 +02:00
Michael Niedermayer
403940de24 avcodec/mpegvideo: Use FFSWAP to exchange pointers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-29 14:03:52 +02:00
Michael Niedermayer
f86e7c5d00 avcodec/ac3_parser: Avoid floats in bitrate computation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-29 12:59:35 +02:00
Hendrik Leppkes
c7bd6a54af dxva2_hevc: re-write reference frame handling
The old logic required and explicit clearing of the lists first and was
prone to overflow the DXVA2 struct in some circumstances.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-29 03:26:23 +02:00
Hendrik Leppkes
b7a0b303d9 dxva2_hevc: fix 32x32 scaling lists
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-29 01:37:06 +02:00
Michael Niedermayer
d860084c50 avcodec/mpegvideo: Reset bitstream_buffer_size on allocation failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-29 00:33:18 +02:00
Roman Savchenko
e5d1152ccc avcodec/mpegvideo: Check pointer when allocation fail
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-29 00:29:58 +02:00
Michael Niedermayer
b666e81c13 Merge commit 'e4610300de6869bd6b3b00e76cfeabb6d7653dcd'
* commit 'e4610300de6869bd6b3b00e76cfeabb6d7653dcd':
  x86: cavs: Remove an unneeded scratch buffer

Conflicts:
	libavcodec/x86/cavsdsp.c

See: d79f7bf0d6
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-28 22:12:41 +02:00
Michael Niedermayer
7026d8accd Merge commit '1b1bb2c4efc126d74d44d8c421860c85f932ecb1'
* commit '1b1bb2c4efc126d74d44d8c421860c85f932ecb1':
  rl: Add error checking to ff_rl_init().

Conflicts:
	libavcodec/rl.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-28 22:02:41 +02:00
Michael Niedermayer
c508fef3c7 Merge commit '324e50ee95929a9491b855c5e15451145bd5d1ec'
* commit '324e50ee95929a9491b855c5e15451145bd5d1ec':
  rl: Add a function for freeing dynamically allocated tables.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-28 21:55:20 +02:00
Michael Niedermayer
75647622b5 Merge commit '6f57375d707de40dcec28d3cef886c364e032c21'
* commit '6f57375d707de40dcec28d3cef886c364e032c21':
  rl: Rename ff_*_rl() to ff_rl_*()

Conflicts:
	libavcodec/mpeg4videodec.c
	libavcodec/rl.c
	libavcodec/rl.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-28 21:48:49 +02:00
Michael Niedermayer
68cce0101d Merge commit 'fa1923f18205410a3b0aa6c0e77cb31443ef340d'
* commit 'fa1923f18205410a3b0aa6c0e77cb31443ef340d':
  mpegvideo: Move ff_*_rl functions to a separate file

Conflicts:
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-28 21:36:31 +02:00
Michael Niedermayer
9b736f74fc Merge commit '419e3404d07acaac019e8f363c281e17c3a3d622'
* commit '419e3404d07acaac019e8f363c281e17c3a3d622':
  mpegvideo: Drop exchange_uv() function and use its code directly

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-28 21:28:09 +02:00
Shivraj Patil
7b45790771 avcodec/mips/hevcdsp_msa: Restructure as per avutil/mips/generic_macros_msa.h
This patch modifies HEVC mc MIPS-SIMD optimized code according to improved version of generic macros.

Overall, this patch is just upgrading the code with styling changes and will bring it in sync with MIPS-SIMD optimized latest codebase at our end.

Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-28 20:47:29 +02:00
Michael Niedermayer
e4610300de x86: cavs: Remove an unneeded scratch buffer
Simplifies the code and makes it build on certain compilers
running out of registers on x86.

CC: libav-stable@libav.org
Reported-By: mudler
2015-05-28 18:40:40 +02:00
Shivraj Patil
10b77fbf0d avcodec/mips: Split uni mc optimizations to new file
This patch moves HEVC code of uni mc cases to new file hevc_mc_uni_msa.c.
(There are total 5 sub-modules of HEVC mc functions, if we add all these modules in one single file, its size would be huge (~750k) & difficult to maintain, so splitting it in multiple files)
This patch also adds new HEVC header file libavcodec/mips/hevc_macros_msa.h

Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-28 16:51:38 +02:00
Anton Khirnov
1b1bb2c4ef rl: Add error checking to ff_rl_init(). 2015-05-28 15:38:43 +01:00
Anton Khirnov
324e50ee95 rl: Add a function for freeing dynamically allocated tables.
Such tables are not used anywhere currently, but that should change.
2015-05-28 15:38:43 +01:00
Anton Khirnov
6f57375d70 rl: Rename ff_*_rl() to ff_rl_*() 2015-05-28 15:38:43 +01:00
Anton Khirnov
fa1923f182 mpegvideo: Move ff_*_rl functions to a separate file 2015-05-28 15:38:43 +01:00
Vittorio Giovara
419e3404d0 mpegvideo: Drop exchange_uv() function and use its code directly
Code is small enough that there is no advantage in a separate function.
2015-05-28 15:38:43 +01:00
wm4
6f2c64fd03 dvdsubdec: implement flushing
This is needed for proper operation with seeking.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-28 16:10:56 +02:00
wm4
0ad04bf6a2 dvdsubdec: reset buffer size on invalid over-large packets
Otherwise it will never be reset, and remain "stuck" in this state
forever. Can happen when seeking: the decoder will receive fragments
from different file positions, which triggers the condition easily.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-28 15:31:07 +02:00
Carl Eugen Hoyos
4792fb9409 lavc/x264: Support bgr0 as input pix_fmt. 2015-05-28 12:34:22 +02:00
Shivraj Patil
bcd7bf7eeb avcodec/mips: Restructure as per avutil/mips/generic_macros_msa.h
This patch modifies H264 loopfilter, weighted & bi-weighted prediction MIPS-SIMD optimized code according to improved version of generic macros.
Also there are minor code alignment changes.

Overall, this patch is just upgrading the code with styling changes and will bring it in sync with MIPS-SIMD optimized latest codebase at our end.

Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-28 11:57:11 +02:00
Michael Niedermayer
cf52e6d012 avcodec/ffv1dec: Fix skip_alpha
Fixes Ticket4322

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-28 01:01:16 +02:00
Timothy Gu
2b388e6dde Revert "Move struc FFTContext below SECTION_RODATA"
This reverts commit 599888a480.

The commit does not silence the warning on ELF-based systems, and will be
fixed in the subsequent commit.

Conflicts:
	libavcodec/x86/fft_mmx.asm

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-28 00:08:32 +02:00
周晓勇
e89e23e1bc avcodec: loongson3 optimized h264dsp weighted mc with mmi
Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-27 13:01:54 +02:00
Philip Langdale
7ae805db70 avcodec/nvenc: Fix typo: 1204 -> 1024
Fixes Ticket4508

Signed-off-by: Philip Langdale <philipl@overt.org>
2015-05-26 18:36:13 -07:00
Michael Niedermayer
1b236541a6 avcodec/h264: Fix HWACCEL_MAX for D3D11
Found-by: philipl
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-26 05:23:29 +02:00
Michael Niedermayer
688147cfe2 avcodec/hevc: Fix HWACCEL_MAX for D3D11
Found-by: philipl
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-26 05:23:29 +02:00
Michael Niedermayer
5cddfc5357 avcodec/dxva2_h264: Fix "may be used uninitialized" warnings
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-26 05:23:29 +02:00
Philip Langdale
9ae766d1c6 avcodec/vdpau: Re-factor pre-hwaccel helper functions into separate header
h264.h and hevc.h are mutually exclusive due to defining some of the same
names. As such, we need to avoid forcing h264.h to be included if we want
hevc decode acceleration to be possible.

However, some of the pre-hwaccel helper functions need h264.h. To avoid
messy collisions, let's move the declaration of all those helpers to
a separate header which we will exclude for the hevc support (which will
be hwaccel-only).

Signed-off-by: Philip Langdale <philipl@overt.org>
2015-05-25 19:50:41 -07:00
Michael Niedermayer
7ed5d78d61 avcodec/dxva2: Fix "may be used uninitialized" warnings
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-26 04:40:34 +02:00
Michael Niedermayer
94d07b314a avcodec/dxva2: Fix build without D3D11
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-25 22:24:40 +02:00
Michael Niedermayer
947b74ee7d Merge commit 'd8039ef8d221ea273aa4f1e62e5df21bf618c772'
* commit 'd8039ef8d221ea273aa4f1e62e5df21bf618c772':
  D3D11va: add a Direct3D11 video decoder similar to DXVA2

Conflicts:
	Changelog
	configure
	libavcodec/Makefile
	libavcodec/allcodecs.c
	libavcodec/dxva2_vc1.c
	libavcodec/version.h
	libavutil/pixdesc.c
	libavutil/pixfmt.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-25 22:24:34 +02:00
Niklesh
9aabc926ca Improve upon dynamic arrays- movtext subtitles
Signed-off-by: Niklesh <niklesh.lalwani@iitb.ac.in>
2015-05-25 11:39:29 -07:00
Andreas Cadhalpun
e48a9ac9af libshine: fix support for shine 3.0
shine_encode_buffer expects written to be an int pointer, while the
previous shine_encode_frame expected it to be a long pointer.

Thus encoding with libshine currently always fails with
"internal buffer too small", because a negative return value of
shine_encode_buffer is interpreted as a very large long value.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-05-25 16:08:08 +02:00
Michael Niedermayer
c50904fd78 avcodec/mjpegenc_common: Use ff_mpv_reallocate_putbitbuffer()
Fixes assertion failure
Fixes Ticket4396

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-25 14:35:35 +02:00
Michael Niedermayer
00f3bb2ef2 avcodec/mpegvideo: Factor ff_mpv_reallocate_putbitbuffer() out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-25 14:33:38 +02:00
Steve Lhomme
d8039ef8d2 D3D11va: add a Direct3D11 video decoder similar to DXVA2
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-25 11:47:08 +02:00
Michael Niedermayer
bd46e78aa4 avcodec/put_bits: Assert that size in set_put_bits_buffer_size() does not cause integer overflows
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-25 05:31:26 +02:00
Michael Niedermayer
291ad5cc9c avcodec/bitstream: Assert that there is enough space left in avpriv_copy_bits()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-25 05:14:02 +02:00
Michael Niedermayer
8f5ffed183 avcodec/put_bits: Assert that there is enough space left in skip_put_bytes()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-25 05:14:02 +02:00
Michael Niedermayer
561d3a57aa avcodec/mpegvideo_enc: Update the buffer size as more slices are merged
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-25 05:14:02 +02:00
Michael Niedermayer
e4c2ec879b avcodec/put_bits: Update size_in_bits in set_put_bits_buffer_size()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-25 04:55:37 +02:00
Michael Niedermayer
1cacecce79 avcodec/libutvideoenc: Fix memleak
Fixes: CID1257657

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-25 00:32:46 +02:00
James Almer
c5a07f1f84 libdcadec: search for frames that start late in a packet
Based on commit 4ae15605f6

Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-05-24 13:06:42 -03:00
Michael Niedermayer
db5ea69d80 avcodec/ituh263enc: Pass PutBitContext into h263p_encode_umotion() instead of MpegEncContext
This avoids the need to dereference MpegEncContext->pb if it is
already available outside h263p_encode_umotion()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-24 17:27:47 +02:00
Michael Niedermayer
404fe63e23 avcodec: Pass PutBitContext into ff_h263_encode_motion() instead of MpegEncContext
This avoids the need to dereference MpegEncContext->pb if it is
already available outside ff_h263_encode_motion()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-24 17:15:18 +02:00
Michael Niedermayer
b71dc29729 avcodec/h263: Remove unused argument of h263_get_motion_length()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-24 16:58:55 +02:00
Michael Niedermayer
39de31ccb6 avcodec/mpeg4video: Reorder operations to reduce accesses to err_recognition
About 9 cpu cycle faster mpeg4_decode_mb()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-24 16:11:38 +02:00
Michael Niedermayer
de0d3fe562 avcodec/y41pdec: Avoid using float for size test
Floats are not bitexact

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-23 21:46:07 +02:00
James Almer
8952254ffe libwebp: simplify AVCodec.close functions
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-05-23 14:46:46 -03:00
Michael Niedermayer
4ae15605f6 avcodec/dcadec: Search and decode frame in case it starts later in a packet
This fixes decoding the first frame of some dts files

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-23 16:37:16 +02:00
James Almer
1096c46c55 libwebp: use a separate AVClass for each encoder
Signed-off-by: James Almer <jamrial@gmail.com>
2015-05-23 01:52:16 -03:00
James Almer
44ca8a6adb libwebpenc_common: add header guards
Signed-off-by: James Almer <jamrial@gmail.com>
2015-05-23 01:44:54 -03:00
James Almer
98be2d94ea libwebp: remove unneeded defines
Signed-off-by: James Almer <jamrial@gmail.com>
2015-05-23 01:29:23 -03:00
Urvang Joshi
02cf59f3a6 WebP encoder: use WebPAnimEncoder API when available.
WebPAnimEncoder API is a combination of encoder (WebPEncoder) and muxer
(WebPMux). It performs several optimizations to make it more efficient
than the combination of WebPEncode() and native ffmpeg muxer.

When WebPAnimEncoder API is used:
- In the encoder layer: we use WebPAnimEncoderAdd() instead of
  WebPEncode().
- The muxer layer: works like a raw muxer.

On the other hand, when WebPAnimEncoder API isn't available, the old code is
used as it is:
- In the codec layer: WebPEncode is used to encode each frame
- In the muxer layer:  ffmpeg muxer is used

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-23 03:31:28 +02:00
Michael Niedermayer
f275f9eaee Merge commit '4e17946f10d39eec6cc03fb249ae8147373141b6'
* commit '4e17946f10d39eec6cc03fb249ae8147373141b6':
  mpegvideo: Rework various functions not to use MpegEncContext directly

Conflicts:
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-22 22:39:47 +02:00
Michael Niedermayer
179527f34e Merge commit 'a3f4c930ac3f49f47b6e6ffda925d0dcf80320e2'
* commit 'a3f4c930ac3f49f47b6e6ffda925d0dcf80320e2':
  mpegvideo: Have ff_mpeg_ref_picture use AVCodecContext directly

Conflicts:
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-22 21:17:34 +02:00
Michael Niedermayer
a25ee5f922 Merge commit 'd528045558825f01472e9bee873f60c98d661e53'
* commit 'd528045558825f01472e9bee873f60c98d661e53':
  mpegvideo: Have ff_mpeg_unref_picture use AVCodecContext directly

Conflicts:
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c

The memset is left in place

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-22 21:15:32 +02:00
Michael Niedermayer
bc373595f2 Merge commit '6f54dc43cee6b2f5d183acf98b32a3cf8be4a4fc'
* commit '6f54dc43cee6b2f5d183acf98b32a3cf8be4a4fc':
  mpegvideo: Drop stream_codec_tag

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-22 20:49:16 +02:00
Michael Niedermayer
d5227ceff1 Merge commit '9c1db92ad372d4cd69e0490e691c56e4097cb193'
* commit '9c1db92ad372d4cd69e0490e691c56e4097cb193':
  mpegvideo: Drop err_recognition

Conflicts:
	libavcodec/h263dec.c
	libavcodec/ituh263dec.c
	libavcodec/mpeg4video.h
	libavcodec/mpeg4videodec.c
	libavcodec/msmpeg4dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-22 20:38:42 +02:00
Michael Niedermayer
d9b264bc73 Merge commit '848e86f74d3e6e87fa592ee8ba8c184cc5fd9a42'
* commit '848e86f74d3e6e87fa592ee8ba8c184cc5fd9a42':
  mpegvideo: Drop flags and flags2

Conflicts:
	libavcodec/mpeg12dec.c
	libavcodec/mpeg12enc.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_motion.c
	libavcodec/ratecontrol.c
	libavcodec/vc1_block.c
	libavcodec/vc1_loopfilter.c
	libavcodec/vc1_mc.c
	libavcodec/vc1dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-22 20:24:41 +02:00
Niklesh
337aa17e61 avcodec/movtextdec: Add support for large boxes(>32 bit)
Signed-off-by: Niklesh <niklesh.lalwani@iitb.ac.in>
2015-05-22 08:32:20 -07:00
Vittorio Giovara
4e17946f10 mpegvideo: Rework various functions not to use MpegEncContext directly 2015-05-22 15:34:39 +01:00
Vittorio Giovara
a3f4c930ac mpegvideo: Have ff_mpeg_ref_picture use AVCodecContext directly 2015-05-22 15:34:39 +01:00
Vittorio Giovara
d528045558 mpegvideo: Have ff_mpeg_unref_picture use AVCodecContext directly
This skips setting the memory to 0 but allows for reuse on different
contextes. Oracle did not report any unsual activity because of it.
2015-05-22 15:34:39 +01:00
Vittorio Giovara
6f54dc43ce mpegvideo: Drop stream_codec_tag
The field is unused.
2015-05-22 15:34:39 +01:00
Vittorio Giovara
9c1db92ad3 mpegvideo: Drop err_recognition
It is just a duplicate of an AVCodecContext member so use it instead.
2015-05-22 15:34:39 +01:00
Vittorio Giovara
848e86f74d mpegvideo: Drop flags and flags2
They are just duplicates of AVCodecContext members so use those instead.
2015-05-22 15:34:39 +01:00
Michael Niedermayer
d09321b68e avcodec/mpeg12dec: Fix chroma location
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-22 15:30:31 +02:00
Urvang Joshi
f99fed733d WebP encoder: extract out some methods into a separate helper library.
This is the 2nd patch in preparation for using WebPAnimEncoder API for encoding
and muxing WebP images.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-22 03:16:59 +02:00
周晓勇
33e9473366 avcodec/mips: loongson fix bugs in mathops optimization
the incorrect UMULH, ff_sqrt, MAC64 and MLS64 to be optimized later, delete them just for now.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 17:46:33 +02:00
Michael Niedermayer
737b0ca65b Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  lavc/qdrw: Do not fail decoding valid Quickdraw images.
  lavf/mov: Use AVCOL_SPC constants when checking color_space.
  lavf/mov: Write colour matrix "6" for color_space bt470bg.
  lavf/mkv: Only skip prores header if the packet is large enough.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-21 01:26:36 +02:00
James Almer
40bf3687a1 libvpx: add support for yuv440p and yuv440p10/12 encoding
Reviewed-by: James Zern <jzern@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-05-20 20:08:56 -03:00
Carl Eugen Hoyos
209e91cbc4 lavc/qdrw: Do not fail decoding valid Quickdraw images. 2015-05-21 01:05:13 +02:00
Vittorio Giovara
265d884eb0 avcodec/vmnc: Add back adapted comment about 24bit
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-20 19:24:54 +02:00
Michael Niedermayer
b6ca7bfc7c avcodec/vmnc: Simplify "24bit" support
This also makes the code more robust, removing potential out of
array writes.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-20 18:50:38 +02:00
Michael Niedermayer
a4c7aeaf82 Merge commit 'eafbc6716cede6d4a652f8bedf82f2901c68d06d'
* commit 'eafbc6716cede6d4a652f8bedf82f2901c68d06d':
  vmnc: Delay pixel size check

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-20 18:41:43 +02:00
Michael Niedermayer
6d1935d1b9 avcodec/hevc: Remove unused variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-20 18:15:22 +02:00
Michael Niedermayer
50965e0673 avcodec: add mathops test
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-20 15:50:58 +02:00
Carl Eugen Hoyos
eb0c08bc69 lavc/vmnc: Fix 32bit colour-space, there is no transparency. 2015-05-20 14:59:38 +02:00
Niklesh
b44a55ad2d Fix movtext crashes caused due to lack of proper bounds checking
Signed-off-by: Niklesh <niklesh.lalwani@iitb.ac.in>
2015-05-19 20:15:15 -07:00
Michael Niedermayer
b8e7f2b277 avcodec/flacenc: Support Multi dimensional quantization
Now with exact bit computations if exact_rice_parameters is enabled

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-20 01:35:29 +02:00
wm4
3efe0393e4 hevc: make avcodec_decode_video2() fail if get_format() fails
Personally, I need the decoder to back out if get_format() returns no
usable pixel format. This didn't work because the error code was not
propagated down the call chain. This in turn happened because the
variable declaration removed in this patch shadowed the variable, whose
value is returned at the end of the function. Consequently, failures of
decode_nal_unit() were ignored in this place.

Reviewed-by:  Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 18:59:06 +01:00
Vittorio Giovara
eafbc6716c vmnc: Delay pixel size check
Some clients incorrectly set 24 as bits_per_coded_sample, while
the actual value is preserved in one of the codec headers.
In order to work around this, delay the check until decode_frame().

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-05-19 18:55:30 +01:00
Michael Niedermayer
215410860f avcodec/flacenc: Mark pointers/array arguments const which are not changed
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 19:47:22 +02:00
Michael Niedermayer
5dfcb4f74d avcodec/flacenc: Simplify md5 calculation code by using AV_WL24()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 19:41:44 +02:00
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>
2015-05-19 13:48:30 +02:00
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>
2015-05-19 13:42:56 +02:00
Michael Niedermayer
d3dcd28812 avcodec/flacenc: Do not copy unused udata array -> 5x faster calc_rice_params()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 12:11:27 +02:00
Michael Niedermayer
d0ac2f59aa avcodec/golomb: Remove disabled and broken code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-19 03:25:53 +02:00
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>
2015-05-19 03:25:53 +02:00
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>
2015-05-18 15:27:51 -03:00
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>
2015-05-18 14:07:48 +02:00
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>
2015-05-18 13:28:49 +02:00
Michael Niedermayer
451be676f3 Merge remote-tracking branch 'rbultje/vp9-bugfixes'
* rbultje/vp9-bugfixes:
  vp9: match another find_ref_mvs() bug in libvpx.
  vp9: fix scaled motion vector clipping for sub8x8 blocks.
  vp9: improve signbias check.
  vp9: don't allow compound references if error_resilience is enabled.
  vp9: clamp segmented lflvl before applying ref/mode deltas.
  vp9: reset loopfilter mode/ref deltas on keyframe.
  vp9: fix crash when playing back 440/440 content with width%64<56.
  vp9: extend loopfilter workaround for vp9 h/v mix-up to work for 422.
  vp9: clip motion vectors in the same way as libvpx does.
  vp9: set skip flag if the block had no coded coefficients.
  vp9: apply mv scaling workaround only when subsampling is enabled.
  vp9: read all 4x4 blocks in sub8x8 blocks individually with scalability.
  vp9: fix segmentation map referencing upon framesize change.
  vp9: disable more pmulhrsw optimizations in idct16/32.
  vp9: disable all pmulhrsw in 8/16 iadst x86 optimizations.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-18 02:35:16 +02:00
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>
2015-05-17 19:36:38 +02:00