1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-10 01:30:21 +02:00
Commit Graph

33657 Commits

Author SHA1 Message Date
Michael Niedermayer
31623e9d1e avcodec/mpegvideo_enc: Avoid fine lambda steps in VBV retry code when RD is not in use
Reduces the number of times the vbv retry code is used and should have no
effect on quality

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-22 21:02:50 +02:00
wm4
e859a3c864 avcodec/dvdsubdec: don't use a NULL log context 2015-09-22 17:41:01 +02:00
wm4
9aab222239 avcodec/dvdsubdec: reject some broken packets
If cmd_pos is broken, this would just keep accumulating packets in the
reassembly buffer, until it fails and flushes the buffer on overflow.
Since packets are usually rather small, this will take a lot of subtitle
packets. The perceived effect is that subtitles are not displayed
anymore after the faulty packet was passed to the decoder.

I'm not terribly sure about this, but on the other hand this code is
active only when fragmented packets need to be reassembled.

Fixes sample file in trac issue #4872.
2015-09-22 17:41:01 +02:00
wm4
f874e2728b avcodec/dvdsub: fix partial packet assembly
Assuming the first and second packets are partial, this would append the
reassembly buffer (ctx->buf) to itself with the second
append_to_cached_buf() call, because buf is set to ctx->buf.

I do not know a valid sample file which triggers this, and do not know
if packets can be split into more than 2 sub-packets, but it triggered
with a (differently) broken sample file in trac issue #4872.
2015-09-22 17:41:01 +02:00
Ronald S. Bultje
74e4948235 hevc: fix wpp threading deadlock.
Fixes ticket 4258.
2015-09-21 20:44:14 -04:00
James Almer
7086154aaa x86/vp9dsp: fix local header include
Signed-off-by: James Almer <jamrial@gmail.com>
2015-09-21 14:37:32 -03:00
James Almer
91fcb10f08 x86/vp9dsp: add missing header include
Fixes make checkheaders

Signed-off-by: James Almer <jamrial@gmail.com>
2015-09-21 14:34:08 -03:00
wm4
4ed5a73a7e avcodec/dvdsubdec: fix indentation 2015-09-21 13:46:34 +02:00
Michael Niedermayer
01770bfda0 avcodec/snowenc: Do not write into const AVFrame
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-20 23:26:39 +02:00
Michael Niedermayer
55b803e33e avcodec/snowenc: Remove unused new_picture field
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-20 23:26:39 +02:00
Ganesh Ajjanagadde
198110d702 avcodec/hevc_mp4toannexb_bsf: silence -Wdiscarded-qualifiers
*poutbuf is non-const, so this casts it explicitly.
This suppresses -Wdiscarded-qualifiers seen in e.g
http://fate.ffmpeg.org/log.cgi?time=20150919100330&log=compile&slot=x86_64-archlinux-gcc-enableshared.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-20 21:15:12 +02:00
James Almer
4bb6cb4c7d x86/vp9mc: fix string concatenation of fullpel function names
Fixes compilation with NASM

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-09-20 12:32:27 -03:00
Michael Niedermayer
b947ac9096 avcodec/internal: Use do {} while() for ff_tlog()
Avoids problems when used without braces

Found-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-20 12:56:29 +02:00
Ganesh Ajjanagadde
92fabca427 avcodec/x86/hpeldsp_rnd_template: silence -Wunused-function on --disable-mmx
This silences some of the -Wunused-function warnings when compiled with --disable-mmx, e.g
http://fate.ffmpeg.org/log.cgi?time=20150919094617&log=compile&slot=x86_64-archlinux-gcc-disable-mmx.
Header guards are too brittle and ugly for this case.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-20 04:00:42 +02:00
Ganesh Ajjanagadde
094a1985d6 avcodec/mlpdec: fix a undefined left shift of negative number
This fixes a -Wshift-negative-value reported with clang 3.7+, e.g
http://fate.ffmpeg.org/log.cgi?time=20150918181527&log=compile&slot=x86_64-darwin-clang-polly-vectorize-stripmine-3.7.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-20 00:30:39 +02:00
Hendrik Leppkes
0118158efa hevc: properly handle no_rasl_output_flag when removing pictures from the DPB
Fixes ticket #4185.

Reviewed-By: Mickael Raulet <Mickael.Raulet@insa-rennes.fr>
Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-20 00:17:32 +02:00
Ganesh Ajjanagadde
11b563ed8f avcodec/motion_est_template: fix undefined left shift of negative number
This fixes -Wshift-negative-value reported with clang 3.7+, e.g
http://fate.ffmpeg.org/log.cgi?time=20150918181527&log=compile&slot=x86_64-darwin-clang-polly-vectorize-stripmine-3.7.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-19 23:52:16 +02:00
Ganesh Ajjanagadde
e681baf638 avcodec/x86/mpegvideoenc: silence -Wunused-function on --disable-mmx
This silences -Wunused-function when compiled with --disable-mmx, e.g
http://fate.ffmpeg.org/log.cgi?time=20150919094617&log=compile&slot=x86_64-archlinux-gcc-disable-mmx.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-19 23:26:57 +02:00
Ganesh Ajjanagadde
f0c635f577 avcodec/x86/hpeldsp_init: silence -Wunused-function on --disable-mmx
This silences some of the -Wunused-function warnings when compiled with --disable-mmx, e.g
http://fate.ffmpeg.org/log.cgi?time=20150919094617&log=compile&slot=x86_64-archlinux-gcc-disable-mmx.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-19 23:10:52 +02:00
Przemysław Sobala
0d097a869c avcodec/imgconvert: Support non-planar colorspaces while padding
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-19 18:34:55 +02:00
James Almer
6f9ba0cb82 x86/vp9dsp: add missing preprocessor guards
Signed-off-by: James Almer <jamrial@gmail.com>
2015-09-19 13:33:53 -03:00
Rostislav Pehlivanov
0cfdaf45c4 lpc: correctly apply windowing to the samples in the float-only lpc
Also change the window to Hamming (using coefficient which make it
a Hanning).

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-09-19 16:25:58 +01:00
Ganesh Ajjanagadde
9db6c8815d avcodec/dcadec: fix a -Wsometimes-unitialized on clang
This fixes a genuine -Wsometimes-unitialized reported on clang, e.g
http://fate.ffmpeg.org/log.cgi?time=20150918181527&log=compile&slot=x86_64-darwin-clang-polly-vectorize-stripmine-3.7.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-19 14:11:52 +02:00
Ganesh Ajjanagadde
4328e1fc42 avcodec/g723_1: fix a undefined left shift of negative number
This fixes a -Wshift-negative-value reported with clang 3.7+, e.g
http://fate.ffmpeg.org/log.cgi?time=20150918181527&log=compile&slot=x86_64-darwin-clang-polly-vectorize-stripmine-3.7.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-19 13:06:40 +02:00
Ganesh Ajjanagadde
4e2471ef1d avcodec/internal: silence -Wempty-body on clang
This silences a -Wempty-body warning on clang 3.7+, e.g
http://fate.ffmpeg.org/log.cgi?time=20150918181527&log=compile&slot=x86_64-darwin-clang-polly-vectorize-stripmine-3.7.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-19 11:29:49 +02:00
Ganesh Ajjanagadde
8c9853a69b avcodec/indeo3data: fix undefined left shift of negative number
This fixes a whole sea of -Wshift-negative-value reported with clang 3.7+, e.g
http://fate.ffmpeg.org/log.cgi?time=20150918181527&log=compile&slot=x86_64-darwin-clang-polly-vectorize-stripmine-3.7.
Any half decent compiler should anyway optimize away the multiplication.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-09-19 02:43:39 -03:00
Claudio Freire
3693efb315 AAC encoder: fix make checkheaders
With the move of some functions into templates
in aaccoder_twoloop.h and aaccoder_trellis.h,
make checkheaders started failing. Add them to
SKIPHEADERS as should be.
2015-09-18 22:57:56 -03:00
Ganesh Ajjanagadde
0fe1c50e50 all: do standards compliant absdiff computation
This resolves implementation defined behavior, and also silences -Wabsolute-value in clang 3.5+.
Moreover, the generated asm is identical to before modulo nop padding.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-18 22:42:38 +02:00
James Almer
e47564828b x86/vp9mc: add missing preprocessor guards
Signed-off-by: James Almer <jamrial@gmail.com>
2015-09-18 15:14:53 -03:00
James Almer
2f9ab15960 x86/vp9: add avx2 subpel MC SIMD for 10/12bpp
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-09-18 12:28:55 -03:00
Paul B Mahol
32e1af77ec avcodec/dcaenc: fix lfe fir coefficients
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-09-17 21:16:26 +00:00
Michael Niedermayer
58fe57d5a0 avcodec/mpeg12enc: Basic support for encoding non even QPs for -non_linear_quant 1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-18 02:52:57 +02:00
Michael Niedermayer
bf9464027b avcodec/mpeg12dec: Move non_linear_qscale to mpegvideodata
This will be used in the next commit

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-18 02:52:54 +02:00
Michael Niedermayer
2d35757814 avcodec/mpegvideo: Change mpeg2 unquant to work with higher precission qscale
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-18 02:39:17 +02:00
Michael Niedermayer
90d239a441 avcodec/mpegvideo_enc: Add missing entry to non_linear_qscale table
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-18 02:39:17 +02:00
Paul B Mahol
d4a9e6c1a1 avcodec/dcaenc: unbreak >4 channel support
LFE channel is still broken, search for FIXME.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-09-17 19:20:40 +00:00
James Almer
655b6dcb34 lavc/lavf: remove incompatible abi checks for the new 64bit fields
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-09-17 11:36:16 -03:00
Michael Niedermayer
e1ac0ecbba avcodec/mips/aaccoder_mips: Remove duplicate include
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-17 15:16:05 +02:00
Hendrik Leppkes
7c46f24bde Merge commit 'e3d4784eb31b3ea4a97f2d4c698a75fab9bf3d86'
* commit 'e3d4784eb31b3ea4a97f2d4c698a75fab9bf3d86':
  d3d11va: WindowsPhone requires a mutex around ID3D11VideoContext

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-17 11:31:40 +02:00
Hendrik Leppkes
04eff96822 Merge commit '777885983533235ccda5145f96317fc8cd0a18ab'
* commit '777885983533235ccda5145f96317fc8cd0a18ab':
  dcadec: set channel layout in a separate function

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-17 11:21:07 +02:00
Hendrik Leppkes
ecaa6cf7b8 Merge commit '971177f751a6e2931232accceab438bce277bde8'
* commit '971177f751a6e2931232accceab438bce277bde8':
  dcadec: scan for extensions in a separate function

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-17 11:08:22 +02:00
Steve Lhomme
e3d4784eb3 d3d11va: WindowsPhone requires a mutex around ID3D11VideoContext 2015-09-17 10:33:21 +02:00
Kevin Wheatley
4a66422450 pixfmt: Add new SMPTE color primaries and transfer characteristic values
Appeared in ITU-T Rec H.265 10/2014.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-17 10:31:43 +02:00
Claudio Freire
8df9bf8e39 AAC encoder: refactor to resynchronize MIPS port
This patch refactors the AAC coders to reuse code
between the MIPS port and the regular, portable C code.
There were two main functions that had to use
hand-optimized versions of quantization code:
 - search_for_quantizers_twoloop
 - codebook_trellis_rate

Those two were split into their own template header
files so they can be inlined inside both the MIPS port
and the generic code. In each context, they'll link
to their specialized implementations, and thus be
optimized by the compiler.

This approach I believe is better than maintaining
several copies of each function. As past experience has
proven, having to keep those in sync was error prone.
In this way, they will remain in sync by default.

Also, an implementation of the dequantized output
argument for the optimized quantize_and_encode
functions is included in the patch. While the current
implementation of search_for_pred still isn't using
it, future iterations of main prediction probably will.
It should not imply any measurable performance hit while
not being used.
2015-09-16 23:14:26 -03:00
Ronald S. Bultje
344d519040 vp9: add subpel MC SIMD for 10/12bpp. 2015-09-16 21:11:34 -04:00
Ronald S. Bultje
77f359670f vp9: add fullpel (avg) MC SIMD for 10/12bpp. 2015-09-16 21:11:34 -04:00
Ronald S. Bultje
6354ff0383 vp9: add fullpel (put) MC SIMD for 10/12bpp. 2015-09-16 21:11:34 -04:00
Michael Niedermayer
fa5358f07d avcodec/rv34: Delay failure return for B frames with a missing reference
Failing earlier causes the context to be insufficiently initialized which
can break decoding future frames with threads

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-17 02:08:15 +02:00
Alexandra Hájková
7778859835 dcadec: set channel layout in a separate function
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-16 20:21:07 +02:00
Alexandra Hájková
971177f751 dcadec: scan for extensions in a separate function
to make dca_decode_frame more readable

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-16 20:21:07 +02:00