Commit Graph

33935 Commits

Author SHA1 Message Date
Derek Buitenhuis
eae58428bd avcodec: Do not lock during open for codecs marked as having threadsafe init
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-10-04 13:21:16 +02:00
Vittorio Giovara
abe9adfb31 rangecoder: Use AV_RB16 instead of bytestream_get_be16
Silence an incompatible-pointer-types-discards-qualifiers warning from clang.
rangecoder.c:58:34: warning: passing
      'uint8_t **' (aka 'unsigned char **') to parameter of type
      'const uint8_t **' (aka 'const unsigned char **') discards qualifiers in
      nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]
2015-10-04 13:09:08 +02:00
Vittorio Giovara
b8b13acd70 hevc: Simplify logical check
The intended meaning is "if this block is the first block in a slice then
its left boundary is a slice boundary". Silence a logical-not-parentheses
warning from gcc.
2015-10-04 13:08:58 +02:00
Vittorio Giovara
4628443ca3 h263: Drop uninitialized variable use from log message 2015-10-04 13:07:12 +02:00
Vittorio Giovara
1da2a20763 dvbsubdec: Fix function return type 2015-10-04 13:07:12 +02:00
Vittorio Giovara
10aa6f9db4 h264: Use the correct argument context in debug log 2015-10-04 13:07:12 +02:00
Vittorio Giovara
cab63a8b59 dv: Mark internal frame reference as const
Silence a warning due to frame assignment in dvenc. All uses of the
reference in dvdec are read only, except the ones in the main decoding
function, so use the frame pointer directly there.
2015-10-04 13:06:34 +02:00
Vittorio Giovara
4c160fa239 dcadec: Always initialize return variable
Silence an uninitialized warning from clang.
2015-10-04 13:06:27 +02:00
DeHackEd
e06114fed3 libx264: copy A53 closed captions from source
Assumes 'GA94' format (ATSC standard)

Signed-off-by: DHE <git@dehacked.net>
Tested-by: Anshul <anshul.ffmpeg@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-03 23:39:01 +02:00
Christophe Gisquet
f827a17005 blockdsp: reindent after parameter removal
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-03 23:34:56 +02:00
Ganesh Ajjanagadde
c4c389aa14 avcodec/apedec: fix bug introduced in commit d3e5fbb140
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-03 23:04:23 +02:00
Ronald S. Bultje
061b67fb50 vp9: 10/12bpp SIMD (sse2/ssse3/avx) for directional intra prediction. 2015-10-03 14:42:39 -04:00
Ronald S. Bultje
26ece7a511 vp9: 16bpp tm/dc/h/v intra pred simd (mostly sse2) functions. 2015-10-03 14:42:39 -04:00
Ronald S. Bultje
db7786e8ff vp9: sse2/ssse3/avx 16bpp loopfilter x86 simd. 2015-10-03 14:42:39 -04:00
Carl Eugen Hoyos
7c94cfa262 lavc/options_table: Add option flags to the truncated flag.
Also add a short description for the help output.
2015-10-03 16:34:03 +02:00
Ganesh Ajjanagadde
0493e42eb2 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-10-03 14:24:41 +02:00
Anton Khirnov
bb198c4997 d3d11va: make av_d3d11va_alloc_context() available at all times
The public API should not depend on the build configuration.
2015-10-03 14:09:23 +02:00
Anton Khirnov
f320287159 d3d11va: check for malloc failure 2015-10-03 14:08:13 +02:00
Hendrik Leppkes
6b849211bc Merge commit 'e54d7e4e8ef7d778e2ddc5a60bf7307ed55d6333'
* commit 'e54d7e4e8ef7d778e2ddc5a60bf7307ed55d6333':
  dnxhddata: Deduplicate cid 1256 chroma table

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-03 12:49:22 +02:00
Hendrik Leppkes
cda503a1b9 Merge commit '380146924ecad2e05e9dcc5c3c2e1b5ba47c51e8'
* commit '380146924ecad2e05e9dcc5c3c2e1b5ba47c51e8':
  x264: Add option to force IDR frames

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-03 12:46:01 +02:00
Hendrik Leppkes
a11741c293 Merge commit 'd0a3e89d41b05f9ed0e7401c352b60ed4f4d1ed5'
* commit 'd0a3e89d41b05f9ed0e7401c352b60ed4f4d1ed5':
  dcadec: make a number of samples per subband per subsubframe a named constant

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-03 12:36:42 +02:00
Hendrik Leppkes
4d2160c99a Merge commit '9a3202a98b2e095b54dd784c3e01a09a676fc3fa'
* commit '9a3202a98b2e095b54dd784c3e01a09a676fc3fa':
  Screenpresso SPV1 decoder

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-03 12:22:41 +02:00
Michael Niedermayer
85c92789b6 avcodec/h264_ps: Fix copying oversized pps&sps data
Fixes: https://trac.ffmpeg.org/attachment/ticket/685/movie.264

In the available testcase the actual PPS only uses a few bits
while there are 7kbyte of apparently random data after it

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-03 11:55:23 +02:00
Hendrik Leppkes
5fa5e73e81 Merge commit '1aa24df74c052a73175c43e57d35b4835e537ec8'
* commit '1aa24df74c052a73175c43e57d35b4835e537ec8':
  lavu: Deprecate AVFrame.error[]

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-03 09:52:39 +02:00
wm4
16aac9a359 avcodec/videotoolbox: fix decoding of some h264 bitstreams
This affects Annex B streams (such as demuxed from .ts and others). It
also handles the format change in reinit-large_420_8-to-small_420_8.h264
correctly.

Instead of passing through the extradata, create it on the fly it from
the currently active SPS and PPS. Since reconstructing the PPS and SPS
NALs would be very complicated and verbose, we use the NALs as they
originally appeared in the bitstream.

The code for writing the extradata is somewhat derived from
libavformat/avc.c, but it's small and different enough that sharing it
is not really worth it.
2015-10-02 19:09:16 +02:00
wm4
069190f707 avcodec/h264: keep SPS and PPS bitstream data
We assume an upper bound of 4096 bytes for each raw SPS/PPS. It's hard
to determine an exact maximum size, but this value was was considered
high enough and safe.

Needed for the following VideotoolBox commit.
2015-10-02 19:08:54 +02:00
Christophe Gisquet
74ef5449a6 dnxhddec: init scantable once permutation is set
Otherwise, the dsp may change without its permuation being applied.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-02 18:08:36 +02:00
Christophe Gisquet
c7e14a279f dnxhddec: use dequantization formula from specs
The current one, while correct, does not yield the best possible
results. The specificiations suggest another formula, which results
in quality gains in the decoded output from fate tests. This
justifies changing said formula.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-02 18:08:36 +02:00
Christophe Gisquet
7e4070d2e7 dnxhddec: initialize with mb-aligned dimensions
The coded size is a multiple of the macroblock size, which is 16.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-02 18:08:36 +02:00
Derek Buitenhuis
abaa12263e avcodec: Don't lock during open if the codec has threadsafe init
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-10-02 14:07:14 +01:00
Christophe Gisquet
e54d7e4e8e dnxhddata: Deduplicate cid 1256 chroma table
CID 1256 is specified as using the same table for luma and chroma,
which is the same as CID 1235 luma table. This is consistent with
the format supposedly being RGB, although most sequences seem to
actually be YCbCr-encoded.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-10-02 13:12:19 +02:00
Jeremy James
1fb63d6f43 dnxhddata: Deduplicate dnx100 tables
Tables 1258 and 1259 were not zigzagged when added, so it was not
possible to notice the equivalence.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-10-02 13:12:12 +02:00
Jeremy James
cc320296ab dnxhddata: Fix cid 1260 luma and chroma tables
These table was not zigzagged when added.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-10-02 13:12:04 +02:00
Joseph Artsimovich
bfe1cd80eb dnxhddata: Fix 10-bit DNxHD quant matrices
Convert them to zigzag order, as the rest of them are.

When I was adding support for 10-bit DNxHD, I just copy-pasted the
missing quant matrices from the spec. Now it turns out the existing
matrices in dnxhddata.c were in zigzag order. This resulted in wrong
quantization for 10-bit DNxHD. The attached patch fixes the problem by
converting 10-bit quant matrices to zigzag order.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-10-02 13:11:57 +02:00
Christophe Gisquet
562ba4a827 blockdsp: remove high bitdepth parameter
It is only (mis-)used to set the dsp fucntions clear_block(s). But
these functions always work on 16bits-wide elements, which make
the parameter useless and actually harmful, as it causes all content
on more than 8-bits to not use accelerated functions.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-02 04:38:40 +02:00
Sven Dueking
5d4a3563f2 qsvenc.c: use query to catch all kind of setting issues
Reviewed-by: Ivan Uskov <ivan.uskov@nablet.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-01 16:12:33 +02:00
Derek Buitenhuis
380146924e x264: Add option to force IDR frames
When forwarding the frame type information, by default x264 can
decide which kind of keyframe output, add an option to force it
to output IDR frames in to support use-cases such as preparing
the content for segmented streams formats.
2015-10-01 14:27:45 +02:00
Yu Xiaolei
eb02387add x264: Expose the NV21 input support
x264 build 147 adds the native support for NV21.

Useful to avoid additional pixel format conversion when encoding
from a wide range of capture devices, Android among those.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-10-01 14:00:28 +02:00
Alexandra Khirnova
d0a3e89d41 dcadec: make a number of samples per subband per subsubframe a named constant
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-10-01 12:29:06 +02:00
Michael Niedermayer
9e9d731b51 avcodec/pngdec: mark previous_picture as done on end of decode_frame_common()
Fixes deadlock with threads

Found-by: Paul B Mahol
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-01 01:11:45 +02:00
Michael Niedermayer
dabea74d0e avcodec/vp8: Do not use num_coeff_partitions in thread/buffer setup
The variable is not a constant and can lead to race conditions

Fixes: repro.webm (not reproducable with FFmpeg alone)

Found-by: Dale Curtis <dalecurtis@google.com>
Tested-by: Dale Curtis <dalecurtis@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-01 00:58:46 +02:00
Michael Niedermayer
9b4dd0f876 avcodec/mpeg12dec: Initialize chroma_format to 1
This ensures that chroma format is never set to an invalid value

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-30 21:51:16 +02:00
Vittorio Giovara
9a3202a98b Screenpresso SPV1 decoder
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-30 16:45:11 +02:00
Vittorio Giovara
1aa24df74c lavu: Deprecate AVFrame.error[]
These field are difficult to interpret, and are provided by a single
encoder (mpegvideoenc). In general they do not belong to a structure
containing raw data only, so remove them from AVFrame.

Mpegvideoenc now uses a private field in Picture for its internal
computations.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-30 16:44:33 +02:00
wm4
cb1da9fb8d avcodec/mp3: fix skipping zeros
Commits 43bc5cf9 and c5371f77 add code for skipping initial zeros in mp3
packets. This code forgot to report to the user that data was skipped at
all.

Since audio codecs allow partial packet decoding, the user application
has to rely on the return value. It will remove the data reported as
consumed by the decoder, and feed it to the decoder again. This resulted
in the mp3 frame after the zero region to be decoded over and over
again, until the zero region was finally skipped by the application.

Fix this by including the amount of skipped bytes to the number of
consumed bytes returned by the decode call.

Fixes trac ticket #4890.
2015-09-30 15:57:41 +02:00
James Almer
3178931a14 x86/hevc_sao: move 10/12bit functions into a separate file
Tested-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-09-30 02:59:55 -03:00
Christophe Gisquet
e3242c0219 dnxhddata: deduplicate table
CID 1256 is specified as using the same table for luma and chroma,
which is the same as CID 1235 luma table. This is consistent with
the format supposedly being RGB, although most sequences seem to
actually be YCbCr-encoded.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-30 00:27:07 +02:00
Stefano Pigozzi
78cc19f15e videotoolbox: require hardware acceleration
VideoToolbox also implements a software decoder for h264, and will fallback to
using it if the file cannot be decoded on the GPU. In these cases though,
we want the hwaccel to fail so that we can use the libavcodec software decoder
instead of the Apple one.

Signed-off-by: wm4 <nfxjfg@googlemail.com>
2015-09-29 23:55:11 +02:00
Ganesh Ajjanagadde
308e7484a3 avcodec/x86/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-29 19:37:26 +02:00
Hendrik Leppkes
1342d7b2f9 Merge commit 'c49cbecbae5a42f4ca004197b0118cc50aaaca2e'
* commit 'c49cbecbae5a42f4ca004197b0118cc50aaaca2e':
  dnxhddec: Decode and use interlace mb flag

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-29 15:36:06 +02:00
Hendrik Leppkes
773570a9dc Merge commit 'cf7d2f2d2134c0854edf2db91e7436ac2bc9874f'
* commit 'cf7d2f2d2134c0854edf2db91e7436ac2bc9874f':
  lavc: Simplify checking quant bias option

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-29 15:27:59 +02:00
Hendrik Leppkes
fe294b3403 Merge commit '4885bde3187a2bb0cae85b67796e07db233bf77f'
* commit '4885bde3187a2bb0cae85b67796e07db233bf77f':
  motion_est_template: Fix undefined left shift of negative number

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-29 15:26:59 +02:00
Hendrik Leppkes
b01891a9f0 Merge commit '948f3c19a8bd069768ca411212aaf8c1ed96b10d'
* commit '948f3c19a8bd069768ca411212aaf8c1ed96b10d':
  lavc: Make AVPacket.duration int64, and deprecate convergence_duration

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-29 15:22:52 +02:00
Ganesh Ajjanagadde
d3e5fbb140 avcodec/apedec: fix undefined left shifts of negative numbers
This fixes -Wshift-negative-value reported with clang 3.7+, e.g
http://fate.ffmpeg.org/log.cgi?time=20150919172459&log=compile&slot=x86_64-darwin-clang-polly-notiling-3.7.
Note that the patch crucially depends on int >= 32 bits,
an assumption made in many places in the codebase.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-29 15:05:38 +02:00
Christophe Gisquet
c49cbecbae dnxhddec: Decode and use interlace mb flag
This bit is 1 in some samples, and seems to coincide with interlaced
mbs and CID1260. 2008 specs do not know about it, and maintain qscale
is 11 bits. This looks oversized, but may help larger bitdepths.

Currently, it leads to an obviously incorrect qscale value, meaning
its syntax is shifted by 1. However, reading 11 bits also leads to
obviously incorrect decoding: qscale seems to be 10 bits.

However, as most profiles still have 11bits qscale, the feature is
restricted to the CID1260 profile (this flag is dependent on
a higher-level flag located in the header).

The encoder writes 12 bits of syntax, last and first bits always 0,
which is now somewhat inconsistent with the decoder, but ends up with
the same effect (progressive + reserved bit).

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-29 14:33:01 +02:00
Vittorio Giovara
cf7d2f2d21 lavc: Simplify checking quant bias option 2015-09-29 14:33:01 +02:00
Vittorio Giovara
e94e651c76 dnxhddec: Enable frame threading
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-29 14:33:01 +02:00
Ganesh Ajjanagadde
4885bde318 motion_est_template: Fix undefined left shift of negative number
This fixes a -Wshift-negative-value warning reported with clang 3.7+.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-09-29 14:33:00 +02:00
wm4
948f3c19a8 lavc: Make AVPacket.duration int64, and deprecate convergence_duration
Note that convergence_duration had another meaning, one which was in
practice never used. The only real use for it was a 64 bit replacement
for the duration field. It's better just to make duration 64 bits, and
to get rid of it.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-29 14:33:00 +02:00
Ganesh Ajjanagadde
977f41e274 mlpdec: Fix a undefined left shift of negative number
This fixes a -Wshift-negative-value warning reported with clang 3.7+.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-09-29 14:33:00 +02:00
Hendrik Leppkes
4d9b78a875 Merge commit '1a4c5fe56008c61b0362c75bea5d446dc5b256bc'
* commit '1a4c5fe56008c61b0362c75bea5d446dc5b256bc':
  libopenh264enc: Use av_log() to log messages

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-29 14:23:45 +02:00
Hendrik Leppkes
27673f1bea Merge commit '8aecec84021a61b943718ff3d7c2c57fcd4af199'
* commit '8aecec84021a61b943718ff3d7c2c57fcd4af199':
  qsvdec: make ff_qsv_decode_init() static

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-29 14:20:05 +02:00
Hendrik Leppkes
9457a11a22 Merge commit '2c32eace5ec4d1d7ca4e0220856cd2815ccc71b2'
* commit '2c32eace5ec4d1d7ca4e0220856cd2815ccc71b2':
  qsvdec: close the MFX decoder on uninit

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-29 14:17:09 +02:00
Hendrik Leppkes
029aa8ff14 Merge commit 'd0c8c380ecf3d9bb16621a4fb59ebbcde301002a'
* commit 'd0c8c380ecf3d9bb16621a4fb59ebbcde301002a':
  qsv: document AVQSVContext members

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-29 14:14:10 +02:00
Hendrik Leppkes
6668214521 Merge commit '5d2daebf3cc8de4cee1973db6a2229beaad3b7cd'
* commit '5d2daebf3cc8de4cee1973db6a2229beaad3b7cd':
  qsvenc: mark the encoders as INIT_CLEANUP

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-29 14:12:47 +02:00
Hendrik Leppkes
49a25d02dd Merge commit '83847cc8fa97e0fc637a0962bafb837acdb6eacc'
* commit '83847cc8fa97e0fc637a0962bafb837acdb6eacc':
  qsvenc: do not try to close the encoder if the session is NULL

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-29 14:10:25 +02:00
Hendrik Leppkes
4554178f07 Merge commit '741b352b16dad74b87c4a39bade8902633a2b0e6'
* commit '741b352b16dad74b87c4a39bade8902633a2b0e6':
  qsvdec: list supported pixel formats

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-29 13:53:42 +02:00
Hendrik Leppkes
d0bf83ff1d Merge commit 'a41e5e192ed8f79f6607f978dee3205580ba5039'
* commit 'a41e5e192ed8f79f6607f978dee3205580ba5039':
  vdpau: fix constrained baseline fallback

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-29 13:45:38 +02:00
Hendrik Leppkes
2f63e83c26 Merge commit 'a5d58fea68b9212e0065a71939e921505504a9bb'
* commit 'a5d58fea68b9212e0065a71939e921505504a9bb':
  lavc: reimplement avcodec_get_type() using codec descriptors

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-29 13:45:19 +02:00
Hendrik Leppkes
b123d82c41 Merge commit 'b10b6ac7a902f28e09e37a29c392e2f0c19e9526'
* commit 'b10b6ac7a902f28e09e37a29c392e2f0c19e9526':
  vdpau: deprecate av_vdpau_get_profile()

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-29 13:44:59 +02:00
Michael Niedermayer
1b82b934a1 avcodec/x86/sbrdsp: Fix using uninitialized upper 32bit of noise
Fixes crash
Fixes: flicker-1.scout3d21443372922.28.m4a

Found-by: Dale Curtis <dalecurtis@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-29 13:23:25 +02:00
Gregory J. Wolfe
1a4c5fe560 libopenh264enc: Use av_log() to log messages
File libopenh264enc.c has been modified so that the encoder uses av_log()
to log messages (error, warning, info, etc.) instead of logging them
directly to stderr.  At the time the encoder is created, the current
libav log level is mapped to an equivalent libopenh264 log level.  This
log level, and a message logging function that invokes av_log() to
actually log messages, are then set on the encoder.

This contains further changes and simplifications by Michael Niedermayer
and Martin Storsjö.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-09-29 11:37:36 +03:00
Ganesh Ajjanagadde
b3066be0e4 avcodec/videotoolbox: fix -Wunused-but-set-variable
pix_fmt was declared presumably to shorten the argument passed to the function.
However, it is currently not being used for such a purpose.
This patch simply removes it instead.
This fixes -Wunused-but-set-variable reported at e.g:
http://fate.ffmpeg.org/log.cgi?time=20150919194249&log=compile&slot=x86_64-darwin-gcc-4.9.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-29 04:50:03 +02:00
Paul B Mahol
1d0487f77f avcodec/pngdec: reset has_trns after every decode_frame_png()
Fixes #4887.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-09-28 20:54:09 +02:00
Anton Khirnov
8aecec8402 qsvdec: make ff_qsv_decode_init() static
It is not used outside of qsvdec.c anymore.
2015-09-28 15:46:58 +02:00
Anton Khirnov
2c32eace5e qsvdec: close the MFX decoder on uninit 2015-09-28 15:45:17 +02:00
Anton Khirnov
d0c8c380ec qsv: document AVQSVContext members 2015-09-28 15:44:47 +02:00
Anton Khirnov
5d2daebf3c qsvenc: mark the encoders as INIT_CLEANUP
Should fix some leaks on init failure.
2015-09-28 15:43:04 +02:00
Anton Khirnov
83847cc8fa qsvenc: do not try to close the encoder if the session is NULL 2015-09-28 15:42:56 +02:00
Anton Khirnov
741b352b16 qsvdec: list supported pixel formats
This is useful for detecting QSV-enabled decoders.
2015-09-28 15:42:46 +02:00
Christophe Gisquet
578f721f5d dnxhddec: add my contributions
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-28 12:39:22 +02:00
Christophe Gisquet
6110a55b7d dnxhddec: reindent/cosmetics
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-28 12:25:56 +02:00
wm4
a41e5e192e vdpau: fix constrained baseline fallback
It appears vdpau drivers can return constrained baseline as unsupported,
even if libvdpau knows about the symbol, and the main profile is
supported.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-09-28 11:05:27 +02:00
wm4
a5d58fea68 lavc: reimplement avcodec_get_type() using codec descriptors
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-09-28 10:50:38 +02:00
Rémi Denis-Courmont
b10b6ac7a9 vdpau: deprecate av_vdpau_get_profile()
This function can intrinsically not deal with codec profile fallback
(for H.264 Constrained Baseline especially), and was made redundant
by av_vdpau_bind_context().

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-09-28 09:45:58 +02:00
Christophe Gisquet
235381e674 dnxhddec: use unsafe bitstream reader
Each line is padded by the format, and errors are now reported and
stop the decoding. Around 5% speedup.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-28 01:00:58 +02:00
Thomas Mundt
2b6567722a h264: Fix ticket #3147 H264 - Wrong field order
Default field order to top field first when interlaced frame is detected and pic_struct_present_flag is not set.
Since bottom field first comes from the old NTSC standard and is not used with HD anymore I think it´s straight forward to favor the majority.

Signed-off-by: Thomas Mundt <loudmax@yahoo.de>
Reviewed-by: Kieran Kunhya <kierank@obe.tv>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-27 22:39:24 +02:00
Christophe Gisquet
b8b8e82ea1 dnxhddec: check and report bitstream errors
This only occur when an overrun in coefficient decoding is
detected.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-27 21:57:58 +02:00
Michael Niedermayer
c4d50314c0 avcodec/d3d11va: Fix project name
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-27 13:08:49 +02:00
Christophe Gisquet
5c6e3a019c dnxhddec: simplify block parsing calls
Fewer arguments, less duplicated code.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-27 12:03:00 +02:00
Christophe Gisquet
8e8ed57ea7 dnxhddec: remove unused qscale parameter
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-27 12:03:00 +02:00
Christophe Gisquet
08a7510fca dnxhddec: implement slice multithreading
Around 3x speedup with 4 threads. Maybe more mb lines should be
batched per thread, but that's good enough for a first try.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-27 01:07:46 +02:00
Christophe Gisquet
dc218bd083 dnxhddec: parse and print adaptive color transform
Indicates a YCbCr->RGB transform at the block level. Although nothing
explicitly states it, this would assume the actual content is planar
RGB.

Currently unsupported, but the one sequence I found using it flagged
every mb that way, actually meaning the content was YCbCr, and thus
best left to the output format to decide what to do of it.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-26 17:35:04 +02:00
Christophe Gisquet
e4b7c3a9f2 dnxhddec: proper rule for interlaced mb flag
It currently only applies to CID 1260, but this flag is dependent on
a higher-level flag located in the header.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-26 16:34:27 +02:00
Michael Niedermayer
2d221d9e06 avcodec/ffv1dec: Fix off by 1 error in quant_table_count check
Fixes: invalid_read.nut
Found-by: Paul B Mahol <onemda@gmail.com>

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-26 13:42:04 +02:00
Michael Niedermayer
10bbf6cf62 avcodec/ffv1dec: Explicitly check read_quant_table() return value
Forwards the error code, avoids potential integer overflow

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-26 13:42:04 +02:00
Hendrik Leppkes
9c3c8d2c56 Merge commit 'b2417ee6d1ee0c5e9b170a642d73bdf68908966f'
* commit 'b2417ee6d1ee0c5e9b170a642d73bdf68908966f':
  dxv: Improve error message

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-26 11:14:31 +02:00
Hendrik Leppkes
b4ea8a7305 Merge commit '1bcd4a476ba45a7fdf59d1701b8f0e274418cc32'
* commit '1bcd4a476ba45a7fdf59d1701b8f0e274418cc32':
  dxv: Support RAW intermediate compression

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-26 11:14:25 +02:00
Hendrik Leppkes
f6048e4920 Merge commit 'bbf71d46db3417b43bcbd745cbf235e8e2ff69ae'
* commit 'bbf71d46db3417b43bcbd745cbf235e8e2ff69ae':
  dxv: Print texture information after header parsing

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-26 11:14:01 +02:00
Hendrik Leppkes
234c7378ca Merge commit 'fb2889691cb7720d2680e188eb6036a35afa2392'
* commit 'fb2889691cb7720d2680e188eb6036a35afa2392':
  dxv: Support the original first version

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-26 11:13:48 +02:00
Hendrik Leppkes
d0aec0aae8 Merge commit '588a5619da0d041e55b365f63d0fa9c72bdbd4d3'
* commit '588a5619da0d041e55b365f63d0fa9c72bdbd4d3':
  dxv: Parse ancillary encoder information

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-26 11:11:06 +02:00
Hendrik Leppkes
2b61cc4443 Merge commit 'a9b8c638cfe2f82191db65e3e3a39f3b35df81f5'
* commit 'a9b8c638cfe2f82191db65e3e3a39f3b35df81f5':
  mmal: Fix AVBufferRef usage

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-26 11:07:54 +02:00
Hendrik Leppkes
f3310df853 Merge commit '49623f531972be5dc2dd8c1b4b8748cad7c424ff'
* commit '49623f531972be5dc2dd8c1b4b8748cad7c424ff':
  mmal: Remove setting extradata on input format

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-26 11:07:44 +02:00
Hendrik Leppkes
c5a312dd6a Merge commit 'f290e48d86e10f34b5ddc519127636bcebec7c43'
* commit 'f290e48d86e10f34b5ddc519127636bcebec7c43':
  mmal: drop the h264 BSF

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-26 11:07:33 +02:00
Claudio Freire
0f98fd30e2 AAC encoder: fix OOB access in search_for_pns
Fix out of bounds access caused by wrongful usage
of swb_offset constants when computing scalefactor
positions.
2015-09-26 04:49:16 -03:00
Christophe Gisquet
e19ea0218a dnxhddec: indicate colorspace
It is supposed to only old BT.709 colorspaces.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-26 01:07:40 +02:00
Jeremy James
428424fe75 dnxhddata: correct weight tables
CID 1260 (as evidenced by incorrect decoding of a sample from ticket
4876) seems to use incorrect weight tables. It appears those tables
were not zigzag-scanned.

Apply zigzag on weight tables for new CIDs 1258, 1259, and 1260, and
fix an incorrect chroma table for CID 1256.

Fixes last issue from ticket #4876.

Found-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Signed-off-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-25 20:57:57 +02:00
Christophe Gisquet
2801a1352d dnxhddec: decode and use interlace mb flag
This bit is 1 in some samples, and seems to coincide with interlaced
mbs and CID1260. 2008 specs do not know about it, and maintain qscale
is 11 bits. This looks oversized, but may help larger bitdepths.

Currently, it leads to an obviously incorrect qscale value, meaning
its syntax is shifted by 1. However, reading 11 bits also leads to
obviously incorrect decoding: qscale seems to be 10 bits.

However, as most profiles still have 11bits qscale, the feature is
restricted to the CID1260 profile.

The encoder writes 12 bits of syntax, last and first bits always 0,
which is now somewhat inconsistent with the decoder, but ends up with
the same effect (progressive + reserved bit).

Partially fixes ticket #4876.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-25 20:41:19 +02:00
Michael Niedermayer
25df7b1c35 avcodec/ffv1dec: Fix >8bps error concealment
Fixes: 03_cave_girls_h264_slc24_slicecrc1_fuzzed.avi

Found-by: Dinah Handel <dinahrhandel@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-25 16:45:43 +02:00
Michael Niedermayer
b2955b6c5a avcodec/rangecoder: Check e
Fixes hang.nut

Found-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-25 14:36:41 +02:00
Claudio Freire
9458a62dec AAC encoder: tweak PNS usage to be more aggressive
This patch tweaks search_for_pns to be both more
aggressive and more careful when applying PNS. On
the one side, it will again try to use PNS on zero
(or effectively zero) bands. For this, both zeroes
and band_type have to be checked (some ZERO bands
aren't marked in zeroes). On the other side, a more
accurate rate-distortion measure avoids using PNS
where it would cause audible distortion.

Also fixed a small bug in the computation of freq
that caused PNS usage on low-frequency bands during
8-short windows. This allows re-enabling PNS during
8-short.
2015-09-25 03:56:32 -03:00
Michael Niedermayer
aa6c43f3fd avcodec/ffv1: seperate slice_count from max_slice_count
Fix segfault with too large slice_count
Fixes Ticket4879

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-24 23:53:02 +02:00
Vittorio Giovara
b2417ee6d1 dxv: Improve error message 2015-09-24 10:57:30 +02:00
Vittorio Giovara
1bcd4a476b dxv: Support RAW intermediate compression
Sample-Id: boombox64.mov
Reported-by: Aarni Koskela
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-24 10:57:25 +02:00
Vittorio Giovara
bbf71d46db dxv: Print texture information after header parsing 2015-09-24 10:57:25 +02:00
Vittorio Giovara
fb2889691c dxv: Support the original first version
DXV 1.0 provided DXT1 with LZF only.

Sample-Id: Orange-Strings-07_640_DXV.mov
Reported-by: Carl Eugen Hoyos
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-24 10:57:20 +02:00
Vittorio Giovara
588a5619da dxv: Parse ancillary encoder information
Header does not contain the number of channels, but rather the encoder
version, so rename the variable, and read the additional byte.
2015-09-24 10:56:44 +02:00
wm4
a9b8c638cf mmal: Fix AVBufferRef usage
AVBufferRef.data and AVPacket.data don't need to have the same value.
AVPacket could point anywhere into the buffer. Likewise, the sizes
don't need to be the same.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-24 10:34:46 +02:00
wm4
49623f5319 mmal: Remove setting extradata on input format
This works only for extradata sizes up to 128 bytes. Additionally, I
could never actually see it doing anything. The new code using
MMAL_BUFFER_HEADER_FLAG_CONFIG now takes care of this.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-24 10:34:38 +02:00
wm4
f290e48d86 mmal: drop the h264 BSF
We can send mp4-style data directly. But for some reason, this requires
sending the extradata as buffer with MMAL_BUFFER_HEADER_FLAG_CONFIG
set. Reuse the infrastructure for sending AVPackets to do this.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-24 10:34:28 +02:00
Ganesh Ajjanagadde
7179add427 avcodec/ac3enc: use long long after switch to 64 bit bitrate
Commit 7404f3bdb switched bitrate to 64 bits.
This triggers -Wabsolute-value on clang, e.g
http://fate.ffmpeg.org/log.cgi?time=20150917122742&log=compile&slot=x86_64-darwin-clang-3.7-O3.
Therefore, usage of abs is changed to llabs, which is available on all of the platforms.
Unfortunately, LLONG_MAX is not always available, so INT64_MAX is used instead.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-24 04:43:00 +02:00
Ganesh Ajjanagadde
07cd8d5676 avcodec/x86/cavsdsp: silence -Wunused-variable on --disable-mmx
This silences -Wunused-variable when compiled with --disable-mmx, e.g
http://fate.ffmpeg.org/log.cgi?time=20150919094617&log=compile&slot=x86_64-archlinux-gcc-disable-mmx.
The alternative of header guards will make it far too ugly.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-24 04:27:50 +02:00
Michael Niedermayer
0c7ceb1e0a avcodec/aacenctab: Make aac_maxval_cb const
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-23 12:46:52 +02:00
zylthinking
d1bbefeaa7 avcodec/libstagefright: fix Stagefright_decode_frame() failing to exit when the source is done
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-23 12:35:59 +02:00
Claudio Freire
7ec74ae4aa AAC encoder: tweak rate-distortion logic
This patch modifies the encode frame function to
retry encoding the frame when the resulting bit count
is too far off target, but only adjusting lambda
in small, incremental step. It also makes the logic
more conservative - otherwise it will contend with
bit reservoir-related variations in bit allocation,
and result in artifacts when frame have to be truncated
(usually at high bit rates transitioning from low
complexity to high complexity).
2015-09-23 02:33:44 -03:00
Claudio Freire
b01f3ddad3 AAC encoder: simplify and speed up find_min_book
Trivial change to simplify the small but hot
find_min_book function. The new form is easier to
understand and faster.
2015-09-23 02:33:40 -03:00
Ganesh Ajjanagadde
0544c95fd6 avcodec/x86/mpegaudiodsp: silence -Wunused-variable on --disable-mmx
This silences -Wunused-variable when compiled with --disable-mmx, e.g
http://fate.ffmpeg.org/log.cgi?time=20150919094617&log=compile&slot=x86_64-archlinux-gcc-disable-mmx.
The alternative of header guards will make it far too ugly.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-22 23:45:03 +02:00
Ganesh Ajjanagadde
4f90818ea1 avcodec/x86/rv40dsp_init: silence -Wunused-variable on --disable-mmx
This silences -Wunused-variable when compiled with --disable-mmx, e.g
http://fate.ffmpeg.org/log.cgi?time=20150919094617&log=compile&slot=x86_64-archlinux-gcc-disable-mmx.
The alternative of header guards will make it far too ugly.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-22 23:45:03 +02:00
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
Rostislav Pehlivanov
5ba811bdf0 aacenc_tns: fix coefficient compression condition
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-09-16 17:48:02 +01:00
Hendrik Leppkes
b2a72e8ab9 Merge commit '570fcaf3326aef9313b10863e2f6e6ae664d9dae'
* commit '570fcaf3326aef9313b10863e2f6e6ae664d9dae':
  jpeg2000: Factor out prec init

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-16 14:04:46 +02:00
Hendrik Leppkes
2fc552b629 Merge commit '95a41311ac3a44773cc4dc407408aca35b1f8e26'
* commit '95a41311ac3a44773cc4dc407408aca35b1f8e26':
  jpeg2000: Factor out band stepsize initialization

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-16 14:01:58 +02:00
Hendrik Leppkes
054ce2d6ab Merge commit '7fb93eae43cc89bd7c1c275344e1cdbadab7155b'
* commit '7fb93eae43cc89bd7c1c275344e1cdbadab7155b':
  jpeg2000: Factor out band initialization

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-16 13:58:30 +02:00
Hendrik Leppkes
64f72bb61f Merge commit '29b00f880faa404aa1d0d6820310c510c5996479'
* commit '29b00f880faa404aa1d0d6820310c510c5996479':
  jpeg2000: Templatize the frame writer

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-16 12:08:39 +02:00
Timo Rothenpieler
dad38bff81 avcodec/vaapi_internal: Add missing include
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2015-09-16 11:41:07 +02:00
Michael Niedermayer
fee2b97d56 avcodec/libxvid: add missing include
Fix build

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-16 11:38:20 +02:00
Hendrik Leppkes
5a754f92d1 Merge commit '41bcc3d15204f290400ba02e4e8f87fc07bcc00e'
* commit '41bcc3d15204f290400ba02e4e8f87fc07bcc00e':
  jpeg2000: Split codeblock decoding from the main tile decoding

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-16 11:31:40 +02:00
Hendrik Leppkes
52ce8b7b31 Merge commit 'e60a6e7545dd6f5b25e3a65de9c6fdcc6e2e9d6b'
* commit 'e60a6e7545dd6f5b25e3a65de9c6fdcc6e2e9d6b':
  mpegvideo: Drop mpegvideo.h where not needed

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-16 11:27:20 +02:00
Hendrik Leppkes
7b865c222e Merge commit '5d14cf199990cd378904a2618b5c72c4b02290f6'
* commit '5d14cf199990cd378904a2618b5c72c4b02290f6':
  mpegvideo: Make sure mpegutils.h is included where needed

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-16 11:23:40 +02:00
Hendrik Leppkes
b3ff8ef6ec Merge commit '525f58977c93e189fda49a5c4928feaf4d89fac6'
* commit '525f58977c93e189fda49a5c4928feaf4d89fac6':
  mpegvideo: Move macros to more appropriate headers

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-16 11:23:20 +02:00
Carl Eugen Hoyos
040ddd27bf lavc/utils: Correctly show bit_rate >INT_MAX.
Fixes ticket #2089.
2015-09-15 20:56:23 +02:00
Michael Niedermayer
72db5e96fc avcodec/ffv1enc: Fix error message when the requested version does not support the requested features
Found-by: "Peter B." <pb@das-werkstatt.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-15 20:46:04 +02:00
Michael Niedermayer
7404f3bdb9 lavc: Switch bitrate to 64bit unless compatibility with avconv was requested. 2015-09-15 18:02:43 +02:00
Ronald S. Bultje
a0d8a81075 vp9: switch min_tile_cols location so it shifts up instead of down.
This fixes cases where the shifted number is 64, but we shifted non-
zero numbers away in the shift. The change makes behaviour consistent
with libvpx.
2015-09-15 09:20:34 -04:00
Paul B Mahol
92bfc3cd03 avcodec/dxv: remove code that is never reached
The function is automatically called.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-09-15 07:52:15 +00:00
Carl Eugen Hoyos
a85f2cdfbf lavc: Fix standalone compilation of the avi demuxer. 2015-09-14 23:12:28 +02:00
Vittorio Giovara
65b96aba28 wmalossless: Warn when decoding 24 bit depth
See ticket #4134
2015-09-14 19:36:21 +02:00
Timothy Gu
ca00dda216 aaccoder_mips: Fix indentation 2015-09-14 08:54:44 -07:00
Nedeljko Babic
b65ffa316e avcodec/mips/aaccoder_mips: Sync with generic aaccoder file.
Code in aaccoder_mips.c was not synced with changes in aaccoder.c for
some time.

That was cause for some fate-aac tests failing.

This patch fixes the problems.

Optimizations disabled in 933309a are enabled again.

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-14 15:35:35 +02:00
Luca Barbato
570fcaf332 jpeg2000: Factor out prec init
Makes debugging a little simpler.
2015-09-14 14:50:19 +02:00
Luca Barbato
95a41311ac jpeg2000: Factor out band stepsize initialization 2015-09-14 14:48:59 +02:00