Commit Graph

33880 Commits

Author SHA1 Message Date
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
Luca Barbato
7fb93eae43 jpeg2000: Factor out band initialization 2015-09-14 14:36:18 +02:00
Luca Barbato
1b709f23fb jpeg2000: Refactor decode_packets
Move the packet-specific parsers in separate functions.
2015-09-14 14:31:25 +02:00
Luca Barbato
29b00f880f jpeg2000: Templatize the frame writer 2015-09-14 14:28:03 +02:00
Luca Barbato
41bcc3d152 jpeg2000: Split codeblock decoding from the main tile decoding
That loop is completely stand-alone.
2015-09-14 14:26:54 +02:00
Agatha Hu
a8bedd56aa avcodec/nvenc: merge compute initialQP sections
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2015-09-14 14:10:09 +02:00
Agatha Hu
49046580ce avcodec/nvenc: Optimize nvenc parameters
Add 3 more presets: fast, medium, slow.
Improve min/max QP calculation.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2015-09-14 14:10:08 +02:00
Vittorio Giovara
e60a6e7545 mpegvideo: Drop mpegvideo.h where not needed
Add necessary headers in .c files.
2015-09-13 17:34:46 +02:00
Vittorio Giovara
5d14cf1999 mpegvideo: Make sure mpegutils.h is included where needed 2015-09-13 17:34:45 +02:00
Vittorio Giovara
525f58977c mpegvideo: Move macros to more appropriate headers
MAX_MB_BYTES -> mpegutils.h
FRAME_SKIPPED -> mpegutils.h
INPLACE_OFFSET -> mpegutils.h
ME_MAP_SIZE -> motion_est.h
2015-09-13 17:34:45 +02:00
Vittorio Giovara
5b142a4d33 lavc: Keep idct integer option
"int" is useful in testing because provides accurate results across
different plaftforms, so remove it from the scheduled FF_API_UNUSED_MEMBERS
deprecation.
2015-09-13 17:34:45 +02:00
Rodger Combs
3f9fa2d0b5 ADPCM: Bump THP channel limit to 14
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-12 22:09:35 +02:00
Hendrik Schreiber
1b2412f501 lavc: Fix compilation with --disable-everything --enable-parser=mpeg4video 2015-09-12 13:47:14 +02:00
Vittorio Giovara
f00f6d538d lavc: Sanitize header inclusion guards
Fix typos, add missing comments, and remove stray lines.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-12 13:39:37 +02:00
Vittorio Giovara
6064f697a3 lavc: Enable side data only packets by default
Deprecate the now unused option, but temporarily retain the capability
to disable the now default behaviour.

Mention this change in the AVPacket documentation.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-12 13:38:31 +02:00
wm4
9940459720 mmaldec: fix pkt_dts determination
This also drops setting the frame->pts field. This is usually not set by
decoders, so this would be an inconsistency that's at worst a danger to
the API user.

It appears the buffer->dts field is normally not set by the MMAL
decoder, so don't use it. If it's ever going to be set by MMAL, we
don't know whether the value will be what we want.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-12 12:27:34 +02:00
wm4
87a051f976 lavc: allow asynchronous decoders to return correct pkt_dts values
The generic code in utils.c sets the AVFrame.pkt_dts field from the
packet it was supposedly decoded. This does not have to be true for a
fully asynchronous decoder like mmaldec. It could be overwritten with an
incorrect value. Even if the decoder doesn't determine the DTS (but sets
it to AV_NOPTS_VALUE), it's impossible to determine a correct value in
utils.c.

Decoders can now be marked with FF_CODEC_CAP_SETS_PKT_DTS, in which case
utils.c won't overwrite the field. The decoders are expected to set this
field (even if they only set it to AV_NOPTS_VALUE).

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-12 12:27:19 +02:00
wm4
b7ab6e18ee mmaldec: disable timestamp interpolation
This MMAL feature fills in missing timestamps from the framerate set on
the input port. This is generally unwanted, since libavcodec decoders
merely pass through timestamps without ever "fixing" them. The framerate
is also unknown, and even the timebase doesn't have to be set.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-12 12:25:49 +02:00
wm4
6b652c0273 mmaldec: fix problems with flush logic
Don't try to do a blocking wait for MMAL output if we haven't even sent
a single real packet, but only flush packets. Obviously we can't expect
to get anything back.

Additionally, don't send a flush packet to MMAL in the same case. It
appears the MMAL decoder will sometimes hang in mmal_vc_port_disable()
(called from ffmmal_close_decoder()), waiting for a reply from the GPU
which never arrives. Either MMAL disallows sending flush packets without
preceding real data, or it's a MMAL bug.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-12 12:25:39 +02:00
wm4
b84675d63a mmaldec: hack against buffering problems on broken input
I can't come up with a nice way to handle this. It's hard to keep the
lock-stepped input/output in this case. You can't predict whether the
MMAL decoder will output a picture (because it's asynchronous), so
you have to assume in general that any packet could produce 0 or 1
frames. You can't continue to write input packets to the decoder,
because then you might get too many output frames, which you can't
get rid of because the lavc decoding API does not allow the decoder
to return an output frame without consuming an input frame (except
when flushing).

The ideal fix is a M:N decoding API (preferably asynchronous), which
would make this code potentially much cleaner. For now, this hack
will do.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-09-12 12:25:23 +02:00
Clément Bœsch
7434b9f66f avcodec/roqvideoenc: use AV_OPT_TYPE_BOOL for quake3_compat option 2015-09-12 18:24:49 +02:00
Clément Bœsch
8e22becbc7 avcodec/pgssubdec: use AV_OPT_TYPE_BOOL for forced_subs_only option 2015-09-12 18:24:49 +02:00
Clément Bœsch
7a256133ff avcodec/textdec: use AV_OPT_TYPE_BOOL for keep_ass_markup option 2015-09-12 17:50:24 +02:00
Clément Bœsch
51cec6c306 avcodec/libx264: use AV_OPT_TYPE_BOOL for fastfirstpass option 2015-09-12 17:50:23 +02:00
Clément Bœsch
411c32386a avcodec/h264: use AV_OPT_TYPE_BOOL for is_avc option 2015-09-12 17:50:23 +02:00
Clément Bœsch
4f926a1088 avcodec: use AV_OPT_TYPE_BOOL for refcounted_frames, side_data_only_packets and skip_alpha options 2015-09-12 17:50:18 +02:00
Hendrik Leppkes
95f92b2513 Merge commit 'f00f6d538dcbaa122eb5e2784f41f4a299296b7b'
* commit 'f00f6d538dcbaa122eb5e2784f41f4a299296b7b':
  lavc: Sanitize header inclusion guards

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-12 15:16:57 +02:00
Hendrik Leppkes
580c4fc98a Merge commit '6064f697a321174232a3fad351afb21150c3e9e5'
* commit '6064f697a321174232a3fad351afb21150c3e9e5':
  lavc: Enable side data only packets by default

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-12 15:12:05 +02:00
Rostislav Pehlivanov
3381d92671 aacenc_tns: readjust values for new TNS decision making
Since TNS was fixed with the recent commits retweak the values
so it's more frequently used.
Still not enabled by default yet, though it's possible that it
will be made enabled by default in the near future.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-09-12 13:15:02 +01:00
Rostislav Pehlivanov
7b7866387b aacenc_tns: encode coefficients directly and reenable compression
This commit was made possible with the earlier commits since the
new quantization method basically means we're working always with
unsigned values. The specifications mention to use compression when
the first 2 bits are identical but they didn't mention if this should
happen before or after the conversion to signed values. Actually
they said nothing about conversion to signed values.

With this commit, coefficient compression usually always happens
which saves a lot of space, especially at extremely low bitrates
and doesn't change the quality at all.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-09-12 13:10:28 +01:00
Rostislav Pehlivanov
a83a8d7068 aacenc_tns: redo coefficient quantization and decision making
This finally (and again) gets rid of basically everything the
specifications say about how TNS should be done. The main
problem used to be that a single filter was used for all
coefficients which despite being explicitly recommended by
the specifications usually sounds wrong, therefore it's
a corner case in the current TNS implementation.

This commit also changes the coefficient bit size, as apparently
it's better to use lower precision in case the windows are eight
short. This is apparently what fdk_aac uses, looking at the bit
stream and makes sense. Also the order when 8 SHORT windows happen
is important as 7 was too much and according to PSNR was worse
while 5 is just about correct.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-09-12 13:04:27 +01:00
Hendrik Leppkes
e75b2e9c4b Merge commit '99404597201911de90cff2ef85f2d44176d39147'
* commit '99404597201911de90cff2ef85f2d44176d39147':
  mmaldec: fix pkt_dts determination

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-12 13:30:41 +02:00
Hendrik Leppkes
264ff3dd2e Merge commit '87a051f97633010f71dfc1d23d806856499bf231'
* commit '87a051f97633010f71dfc1d23d806856499bf231':
  lavc: allow asynchronous decoders to return correct pkt_dts values

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-12 13:30:33 +02:00
Hendrik Leppkes
30fb54c23f Merge commit 'b7ab6e18eecad43593ad2a0e9fc9eba7f24751cb'
* commit 'b7ab6e18eecad43593ad2a0e9fc9eba7f24751cb':
  mmaldec: disable timestamp interpolation

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-12 13:29:29 +02:00
Hendrik Leppkes
84d04a0dfa Merge commit '5788623d29c3e806a7879210986110aced758dc2'
* commit '5788623d29c3e806a7879210986110aced758dc2':
  jpeg2000: Split codeblock decoding from the main tile decoding

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-12 13:25:38 +02:00
Hendrik Leppkes
6e611a1839 Merge commit 'db53a2306f62f05faa67e6f3c60ee55a9b8e4776'
* commit 'db53a2306f62f05faa67e6f3c60ee55a9b8e4776':
  jpeg2000: Do not warn about known and skippable markers

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-12 13:16:13 +02:00
Ronald S. Bultje
a30a8beeb3 vp9: Fix emu[] edge overflow conditions for >8bpp/non-420. 2015-09-12 07:01:48 -04:00
Ronald S. Bultje
2563a33856 vp9: re-initialize internal buffers on bpp change also. 2015-09-12 07:01:47 -04:00
James Almer
d5f8a642f6 x86: port PSIGNW to cpuflags
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-09-11 23:27:03 -03:00
Ronald S. Bultje
4b66274a86 vp9: save one (PSIGNW) instruction in iadst16_1d sse2/ssse3. 2015-09-11 20:36:51 -04:00
Ronald S. Bultje
02064d6b7b libvpxdec: apply RGB to 444P16 instead of 422P16. 2015-09-11 19:35:22 -04:00
Rostislav Pehlivanov
8180b113e1 aaccoder: respect cutoff when marking bands as PNS
Makes more sense as users usually set the -cutoff option
to low pass filter the signal. The encoder will still over
shoot slightly when encoding normal coefficients however
that's normal.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-09-11 18:59:15 +01:00
Luca Barbato
5788623d29 jpeg2000: Split codeblock decoding from the main tile decoding
That loop is completely stand-alone.
2015-09-11 18:19:39 +02:00
Luca Barbato
db53a2306f jpeg2000: Do not warn about known and skippable markers
Matches the openjpeg behaviour.
2015-09-11 18:19:01 +02:00
Luca Barbato
9b5a4a9cce mmvideo: Make sure the rle does not write over the frame boundaries
Bug-Id: 887
CC: libav-stable@libav.org
2015-09-11 18:19:00 +02:00
Michael Niedermayer
8b72f6d50b avcodec/ljpegenc: Fix encoding RGBA LJPEG
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-11 13:45:29 +02:00
Michael Niedermayer
055e56e9f7 avcodec/mjpegdec: Fix decoding RGBA RCT LJPEG
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-11 13:42:05 +02:00
Carl Eugen Hoyos
85a7ff8c27 lavc: Fix standalone compilation of the subrip decoder. 2015-09-11 12:39:29 +02:00
Agatha Hu
81071eea7d avcodec/nvenc: change flag of cuCtxCreate to avoid CPU spins
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2015-09-11 10:11:29 +02:00
Kevin Wheatley
a1fa5392e6 avcodec/exr: Mark up the decoded buffer as the appropriate transfer characteristic when applying one 2015-09-10 23:53:05 +02:00
Kevin Wheatley
7eb3233352 avcodec/exr: Add support for applying a transfer characteristic curve to OpenEXR inputs.
Signed-off-by: Kevin Wheatley <kevin.j.wheatley@gmail.com>
2015-09-10 23:53:05 +02:00
Michael Niedermayer
3ffa77d301 avcodec/options_table: Fix TRC / PRI typo
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-10 22:51:19 +02:00
Kevin Wheatley
7061a30c37 avcodec/options_table: Add SMPTE ST428-1 colour primaries (CIE 1931 XYZ) to command line options
Signed-off-by: Kevin Wheatley <kevin.j.wheatley@gmail.com>
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-10 22:33:56 +02:00
Kevin Wheatley
47570a265e avcodec/options_table: Add CLI options for SMPTE ST 2084 and ST 428-1 transfer characteristics
Signed-off-by: Kevin Wheatley <kevin.j.wheatley@gmail.com>
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-10 22:33:39 +02:00
Michael Niedermayer
151312890c avcodec/truemotion1: Simplify code using AV_PIX_FMT_0RGB32
Suggested-by: carl
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-10 22:17:27 +02:00
Michael Niedermayer
a4d17c9a70 avcodec/truemotion1: use BGR0/0RGB
The alpha channel in the fate sample contains random trash, not alpha

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-10 16:36:47 +02:00