Commit Graph

35134 Commits

Author SHA1 Message Date
Hendrik Leppkes
a38627be6d avcodec/cbrt_data: include avutil/libm.h to unbreak compilation on systems without cbrt 2016-03-14 15:49:34 +01:00
Matthieu Bouron
33d69a9008 lavc/ffjni: remove use of private JniInvocation API to retreive the Java VM
Android N will prevent users from loading non-public APIs.

Users should only rely on the av_jni_set_java_vm function to set the
Java VM.
2016-03-14 10:05:33 +01:00
Reimar Döffinger
7c93f2c0b9 Move cbrt tables to separate cbrt_data(_fixed).c files.
Allows sharing and reusing the data between different files.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2016-03-13 18:15:57 +01:00
Carl Eugen Hoyos
4405ff2cae lavc/hevc_ps: Fix default display window offsets for yuv422 and yuv444. 2016-03-13 13:15:17 +01:00
Carl Eugen Hoyos
d11d78facb lavc/libx265: Support GBR encoding. 2016-03-13 09:40:09 +01:00
Carl Eugen Hoyos
db4786f1cf lavc/hevc_ps: Support GBR decoding. 2016-03-13 09:33:38 +01:00
Michael Niedermayer
9d4ab1380a Use avpriv_tempfile()
Should fix xvid/cache on windows with --enable-shared

May be related to Ticket 4780

Tested-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-12 02:08:45 +01:00
Michael Niedermayer
b4f59beeb4 avutil/file: Move av_tempfile() to avutil/file_open ff_tempfile()
document the issue with av_tempfile()

Tested-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-12 02:08:34 +01:00
Umair Khan
5d64ba9d18 avcodec/alsdec: fix max bits in ltp prefix code
The maximum number of bits int the prefix code for
p(0) is 4. By setting it as 3, we were missing the
last 0 bit.
This fixes bug #4715 present on the trac.

Signed-off-by: Umair Khan <omerjerk@gmail.com>
Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-12 01:56:58 +01:00
Ronald S. Bultje
b86339a9f8 vp9: fix a few signed integer left-shifts.
Fixes trac tickets 5127, 5129, 5130.
2016-03-11 16:06:29 -05:00
Ronald S. Bultje
abedde65d1 vp9_superframe: fix endianness of size markers. 2016-03-11 14:23:46 -05:00
Ronald S. Bultje
2e6636aa87 vp9: add superframe merging bitstream filter.
Fixes ticket 4313.
2016-03-11 11:19:14 -05:00
Ronald S. Bultje
6d8ab358a3 lavf: allow BSFs to drop packets.
If pkt->size == 0 && pkt->side_data_elems == 0 after bsf->filter()
returns, the packet is considered dropped.
2016-03-11 11:19:10 -05:00
Ganesh Ajjanagadde
66edd8656b lavc/lpc: exploit even symmetry of window function
Yields 2x improvement in function performance, and boosts aac encoding
speed by ~ 4% overall. Sample benchmark (Haswell+GCC under -march=native):
after:
ffmpeg -i sin.flac -acodec aac -y sin_new.aac  5.22s user 0.03s system 105% cpu 4.970 total

before:
ffmpeg -i sin.flac -acodec aac -y sin_new.aac  5.40s user 0.05s system 105% cpu 5.162 total

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanag@gmail.com>
2016-03-10 21:29:56 -05:00
Matthieu Bouron
8d0a218058 lavc/ffjni: fix uninitialized variable 2016-03-10 18:17:28 +01:00
Vicente Olivert Riera
ad16eff64b mips: add support for R6
Understanding the mips32r6 and mips64r6 ISAs in the configure script is
not enough. In order to have full support for MIPS R6 in FFmpeg we need
to be able to build it, and for that we need to make sure we don't use
incompatible assembler code which makes the build fail. Ifdefing the
offending code is sufficient to fix the problem.

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-09 20:05:04 +01:00
Carl Eugen Hoyos
260c12cdd1 lavc/mjpegdec: Set sar for multiscope videos.
Fixes decoding of the files from ticket #4535 visually.
2016-03-09 14:06:40 +01:00
Carl Eugen Hoyos
a6a52ef29a lavc/hevc_ps: Fix offset for yuv422 and yuv444.
Fixes ticket #4980.
Analyzed-by: kurosu and Hendrik
Reviewed-by: Ronald
2016-03-09 14:00:57 +01:00
Carl Eugen Hoyos
144ef773c7 Use correct msvc type specifiers for ptrdiff_t and size_t. 2016-03-09 14:00:22 +01:00
Michael Niedermayer
a008a7cc95 avcodec/ffjni: Fix occured typo
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-09 04:28:37 +01:00
Michael Niedermayer
89862cd734 avcodec/ffjni: Fix ;;
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-09 04:28:37 +01:00
Reimar Döffinger
b60dfae7af aacenc_utils: Use temporary variable.
This ensures gcc does not create unnecessary
loads or stores and possibly even does not vectorize
the negation.
Speeds up mp3 to aac transcoding with default settings
by 10% when using "gcc (Debian 5.3.1-10) 5.3.1 20160224".

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2016-03-08 23:56:51 +01:00
Reimar Döffinger
b91e376390 aacenc: use generational cache instead of resetting.
Approximately 11% faster transcoding from mp3 with
default settings.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2016-03-08 23:56:51 +01:00
Moritz Barsnick
72babb8566 lavc/mjpegdec: avoid printing useless message in default log level
The change of bps from 0 doesn't contain any info useful to the
user. This message is now at info log level only if the original
value is !=0, otherwise pushed back to debug log level. The
original value is displayed additionally.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-08 16:42:34 +01:00
Timo Rothenpieler
f2bdf9d26a avcodec/nvenc: Fix typo and preset error message 2016-03-08 11:18:16 +01:00
Lucas Cooper
fd55470c65 avcodec/nvenc: Add encoder stats
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2016-03-08 10:41:07 +01:00
Michael Niedermayer
da904faaa5 avcodec: try to document timebase a bit more
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-07 23:00:50 +01:00
Clément Bœsch
2b7a61cbd8 lavc/utils: fix extra ASS sanity check in convert_sub_to_old_ass_form() 2016-03-07 21:48:55 +01:00
Matthieu Bouron
8c24523cc5 lavc/mediacodec: fix chroma width for yuv420p 2016-03-07 14:41:55 +01:00
Matthieu Bouron
81f14884b5 lavc/mjpegdec: avoid unneeded allocation if the frame is to be skipped 2016-03-07 12:36:23 +01:00
Matthieu Bouron
4737fe6907 lavc: add h264 mediacodec decoder 2016-03-07 11:28:29 +01:00
Matthieu Bouron
3ab178516e lavc: add JNI support 2016-03-07 11:17:31 +01:00
Carl Eugen Hoyos
59793785f4 lavc/cfhd: Remove one more \n from avpriv_report_missing_feature(). 2016-03-06 21:38:41 +01:00
Carl Eugen Hoyos
719276b860 lavc/cfhd: Sanitize avpriv_report_missing_feature() usage. 2016-03-06 21:22:47 +01:00
foo86
db44b59980 avcodec/dca: clear X96 channels if nothing was decoded
The first X96 channel set can have more channels than core, causing X96
decoding to be skipped. Clear the number of decoded X96 channels to zero
in this rudimentary case.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-06 18:24:20 +01:00
Kieran Kunhya
247fe3e494 avcodec/cfhd: Fixes cfhd_odd.mov which has a resolution of 496x241
In this case container width/height is better however.
Thanks to koda for the sample
2016-03-06 12:38:07 +00:00
Umair Khan
7d6c264e02 avcodec/alsdec: treat quant_cof as a signed value
Signed-off-by: Umair Khan <omerjerk@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-06 13:11:29 +01:00
Reimar Döffinger
5f5e6033cd bitstream.c: improve init_vlc error messages.
Makes it far easier to spot the issue if e.g.
caused by a typo in the code table.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2016-03-06 12:31:40 +01:00
Reimar Döffinger
0a04c2885f aacenc: avoid double in quantize_bands.
I cannot see any point whatsoever to use
double here instead of float, the results
are likely identical in all cases..
Using float allows for much more
efficient use of SIMD.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2016-03-06 11:49:19 +01:00
Clément Bœsch
0443b2cf79 lavc: restore ABI compatibility with 3.x (sub_text_format)
Regression introduced in 2941282.

Reported-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-05 10:15:35 +01:00
James Almer
a3659ca014 avcodec/cos_tablegen: extend table generation to 17bits
Fixes compilation of fft with hardcoded tables

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-03-05 00:39:53 -03:00
Michael Niedermayer
dec816f92c avcodec/utils: Fix memleak on error in convert_sub_to_old_ass_form()
Fixes CID1355116

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-05 01:50:32 +01:00
Rostislav Pehlivanov
c45b1aa824 vc2enc: minor cosmetic changes
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-03-04 22:41:20 +00:00
Rostislav Pehlivanov
f21cf2b383 vc2enc: remove useless alignment on slice encoding
This was a leftover from before the slices were encoded in parallel.
Since the put_bits context is initialized per slice aligning it
aferwards is pointless.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-03-04 22:41:15 +00:00
Rostislav Pehlivanov
b88be742fa vc2enc: do not allocate packet until exact frame size is known
This commit solves most of the crashes and issues with the encoder and
the bitrate setting. Now the encoder will always allocate the absolute
lowest amount of memory regardless of what the bitrate has been set to.
Therefore if a user inputs a very low bitrate the encoder will use the
maximum possible quantization (basically zero out all coefficients),
allocate a packet and encode it. There is no coupling between the
bitrate and the allocation size and so no crashes because the buffer
isn't large enough.

The maximum quantizer was raised to the size of the table now to both
keep the overshoot at ridiculous bitrates low and to improve quality
with higher bit depths (since the coefficients grow larger per transform
quantizing them to the same relative level requires larger quantization
indices).

Since the quantization index start follows the previous quantization
index for that slice, the quantization step was reduced to a static 1
to improve performance. Previously with quant/5 the step was usually
set to 0 upon start (and was later clipped to 1), that isn't a big change.
As the step size increases so does the amount of bits leftover and so
the redistribution algorithm has to iterate more and thus waste more
time.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-03-04 22:40:58 +00:00
Derek Buitenhuis
a38eadd7e9 Merge commit '5e555f93009f0605db120eec78262d0fe337e645'
AVClass is now a const, the rest are no-op.

* commit '5e555f93009f0605db120eec78262d0fe337e645':
  mpeg12enc: always write closed gops for intra only outputs
  h264: Add an AVClass pointer to H264Context
  libx264: Fix noise_reduction option assignment

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-03-04 16:17:05 +00:00
Michael Niedermayer
305344d89e avcodec/fft: Add revtab32 for FFTs with more than 65536 samples
x86 optimizations are used only for the cases they support (<=65536 samples)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-04 16:05:47 +01:00
Michael Niedermayer
ae76b84221 avcodec: Extend fft to size 2^17
Asked-for-by: durandal_1707

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-04 13:51:42 +01:00
Agatha Hu
362e05f1ea avcodec/nvenc: Fix H264 and HEVC vui info update
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2016-03-04 10:49:33 +01:00
Michael Niedermayer
fbfd2601f6 avcodec/utils: Fix 'ISO C90 forbids mixed declarations and code'
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-03 21:19:54 +01:00
foo86
00e3717b4a avcodec/dca: simplify condition
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-03 12:35:21 +01:00
foo86
8981348749 avcodec/dca: fix av_cold placement in declarations
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-03-03 12:35:21 +01:00
Rodger Combs
ecba35bbe3 lavc/videotoolboxenc: remove *_NULLABLE annotations; fixes pre-10.11 build
These macros were added in OS X 10.11, and the file compiles without warnings
on both 10.10 and 10.11 with them removed.

Thanks to mark4o on IRC for pointing out the failure and testing the patch.
2016-03-02 21:44:28 -06:00
Rick Kern
3af71ac3f9 lavc: add VideoToolbox H.264 Encoder
Autodetected by default. Encode using -codec:v h264_videotoolbox.

Signed-off-by: Rick Kern <kernrj@gmail.com>
Signed-off-by: wm4 <nfxjfg@googlemail.com>
2016-03-02 21:19:35 +01:00
Ganesh Ajjanagadde
bd9c58756a lavc/aacenc_utils: replace sqrtf(Q*sqrtf(Q)) by precomputed value
It makes no sense whatsoever to do this at each function call; we
already have a table for this.

Yields a 2x improvement in find_min_book (x86-64, Haswell+GCC):
ffmpeg -i sin.flac -acodec aac -y sin.aac
find_min_book
old
    605 decicycles in find_min_book, 8388453 runs,    155 skips.9x
    606 decicycles in find_min_book,16776912 runs,    304 skips.9x
    607 decicycles in find_min_book,33553819 runs,    613 skips.2x
    607 decicycles in find_min_book,67107668 runs,   1196 skips.3x
    607 decicycles in find_min_book,134215360 runs,   2368 skips3x

new
    359 decicycles in find_min_book, 8388552 runs,     56 skips.3x
    360 decicycles in find_min_book,16777112 runs,    104 skips.1x
    361 decicycles in find_min_book,33554218 runs,    214 skips.4x
    361 decicycles in find_min_book,67108381 runs,    483 skips.5x
    361 decicycles in find_min_book,134216725 runs,   1003 skips5x

and more importantly a non-negligible speedup (~ 8%) to overall AAC encoding:
old:
ffmpeg -i sin.flac -acodec aac -strict -2 -y sin_new.aac  6.82s user 0.03s system 104% cpu 6.565 total
new:
ffmpeg -i sin.flac -acodec aac -strict -2 -y sin_old.aac  6.24s user 0.03s system 104% cpu 5.993 total

This also improves accuracy of the expression by ~ 2 ulp in some cases.

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanag@gmail.com>
2016-03-01 22:57:44 -05:00
Wan-Teh Chang
4845f0720e Move the |die| member of FrameThreadContext to PerThreadContext.
This fixes a data race warning by ThreadSanitizer.
FrameThreadContext.die is read by all the worker threads but is not
protected by any mutex. Move it to PerThreadContext so that each worker
thread reads its own copy of |die|, which can then be protected with
PerThreadContext.mutex.

Signed-off-by: Wan-Teh Chang <wtc@google.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2016-03-01 13:53:47 -05:00
Rostislav Pehlivanov
7bcc57ad99 vc2enc: fix packet underallocation and minimum bitrate with interlacing
This was a regression introduced by commit e7345abe05 which
enabled full use of the allocated packet but due to the overhead of
using field coding the buffer was too small and triggered warnings and
crashes.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-03-01 13:44:18 +00:00
Rostislav Pehlivanov
41985d40c6 vc2enc: simplify slice cost caching
The fact that now all quantization indices costs are cached justifies
storing 20 more integers in a structure already allocated on heap.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-03-01 13:04:40 +00:00
Rostislav Pehlivanov
6061b78e83 vc2enc: remove redundant put_padding() and use skip_put_bytes() instead
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-03-01 11:39:30 +00:00
Michael Niedermayer
0be09f54fb avcodec: Add utils test
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-29 21:44:06 +01:00
Timothy Gu
e3461197b1 x86/vc1dsp: Split the file into MC and loopfilter 2016-02-29 08:46:53 -08:00
Carl Eugen Hoyos
4e05a12a41 lavc/pcxenc: Update format description link. 2016-02-29 12:42:29 +01:00
Michael Niedermayer
3e42c1128f avcodec/libzvbi-teletextdec: Remove unused variable
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-28 23:39:32 +01:00
Rostislav Pehlivanov
e7345abe05 vc2enc: redistribute leftover bytes
This commit redistributes the leftover bytes amongst the top 150 slices
in terms of size (in the hopes that they'll be the ones pretty bitrate
starved).

A more perceptual method would probably need to cut bits off from slices
which don't need much, but that'll be implemented later.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-02-28 19:06:29 +00:00
Rostislav Pehlivanov
bbcd5e99c3 vc2enc: allocate the DWT context with the current plane size
Previously used the luma size only.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-02-28 19:06:29 +00:00
Rostislav Pehlivanov
2f19583911 2enc: clip and warn when user bitrate set too low
The encoder crashed on verly low bitrates since there wasn't enough
space allocated.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-02-28 19:06:29 +00:00
Rostislav Pehlivanov
6e5c6d61bd vc2enc: clip and warn when user bitrate set too low
The encoder crashed on verly low bitrates since there wasn't enough
space allocated.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-02-28 19:06:29 +00:00
Rostislav Pehlivanov
0a2adf0f47 vc2enc: carry over quantization index across frames as a starting point
Previously a global average was used. Using the previous quantizer
resulted in a fairly significant speedup as slice size selection settled
down quicker.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-02-28 19:06:29 +00:00
Rostislav Pehlivanov
fc1d3cbfdc vc2enc: use 32 bits for quantized coefficients LUT
16 bits were definitely not enough and caused artifacts to appear on
images at barely compressed images.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-02-28 19:06:29 +00:00
Rostislav Pehlivanov
5cc53c2e53 vc2enc: cache bits per quantizer, calculate wasted bits
Needed for following commits, also a speed increase.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-02-28 19:06:29 +00:00
Michael Niedermayer
c6f4720b86 avcodec/mjpegdec: Fix decoding slightly odd progressive jpeg
Fixes: ebd58db6-dc86-11e5-91c2-59daeddf50c7.jpg

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-28 18:46:35 +01:00
Reimar Döffinger
4dd4d53531 Document and validate AVFrame plane pointers.
Check that the required plane pointers and only
those are set up.
Currently does not enforce anything for the palette
pointer of pseudopal formats as I am unsure about the
requirements.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2016-02-28 13:33:14 +01:00
Reimar Döffinger
45fa03b1f9 mjpegdec: Do not assume unused plane pointer are NULL.
We do neither document nor check such a requirement
and for application-provided get_buffer2 they could
contain the result of a malloc(0) or whatever value
they had previously.
This fixes a use-after-free in e.g. MPlayer:
https://trac.mplayerhq.hu/ticket/2262
We might want to consider changing the (documented)
API in addition though.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2016-02-28 13:32:01 +01:00
Reimar Döffinger
0f199f0ad0 mss2: Fix buffer overflow.
Reported as https://trac.mplayerhq.hu/ticket/2264 but have
not been able to reproduce with FFmpeg-only.
I have no idea what coded_height is used for here exactly,
so this might not be the best fix.
Fixes the following chain of events:
ff_mss12_decode_init sets coded_height while not setting height.
ff_mpv_decode_init then copies coded_height into MpegEncContext height.
This is then used by init_context_frame to allocate the data structures.
However the wmv9rects are validated/initialized based on avctx->height, not
avctx->coded_height.
Thus the decode_wmv9 function will try to decode a larger video that we
allocated data structures for, causing out-of-bounds writes.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2016-02-28 13:32:01 +01:00
Rodger Combs
f0ea536c47 lavc/aac_ac3_parser: reindent 2016-02-27 16:31:46 -06:00
Rodger Combs
9f5baf9085 lavc/aac_ac3_parser: avoid zeroing codec parameters if we haven't read a frame
This caused issues when seeking in some unusual MPEGTS files
2016-02-27 16:31:46 -06:00
Rodger Combs
b426d66370 lavc/Makefile: dnxhd demuxer depends on dnxhddata.o 2016-02-27 16:26:18 -06:00
Kieran Kunhya
8adbe26b90 avcodec/cfhd: Add support for 12-bit RGBA.
Plays all known samples
2016-02-27 13:17:20 +00:00
Kieran Kunhya
0096453f70 cfhd: reallocate internal buffers on format change.
Fixes some, but not all, of the threading fuzz crashes
2016-02-27 12:18:06 +00:00
Michael Niedermayer
d39b770aa2 avcodec/utils: Check that the video data[] arrays are NULL on the input to get_buffer_internal()
This should return an error to the decoder if the struct it tried to getbuffer is dirty

Reviewed-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-27 13:11:52 +01:00
Michael Niedermayer
bdf7093bd0 avcodec/utils: Check all data[] pointers in video_get_buffer() not just the first
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-27 13:11:52 +01:00
Clément Bœsch
b5451d88cf lavc: reindent a few decoders after previous commits 2016-02-26 22:15:20 +01:00
Clément Bœsch
22ebbda637 lavc: deprecate decoded ass subtitles with timings 2016-02-26 21:53:34 +01:00
Clément Bœsch
30e7685360 lavc/options: add ass_ro_flush_noop to flags2 2016-02-26 21:53:32 +01:00
Clément Bœsch
2941282124 lavc: allow subtitle text format to be ASS without timing 2016-02-26 21:49:34 +01:00
Clément Bœsch
805685fffd Kill timed SSA 2016-02-26 21:34:33 +01:00
Michael Niedermayer
410f717ff6 avcodec/utils: Merge identical if conditions
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-26 20:12:30 +01:00
Rostislav Pehlivanov
bc7beb6574 vc2enc: calculate the minimum slice size only once
This commit moves the minimum bits per slice calculations outside of the
rate control function as it is identical for every slice.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-02-26 15:38:26 +00:00
Rostislav Pehlivanov
2b811e4605 vc2enc: halve allocated table size, refactor and optimize quantization
Since coefficients differ only in the last bit when writing to the
bitstream it was possible to remove the sign from the tables, thus
halving them. Also now all quantization is done in the unsigned domain
as the sign is completely separate, which gets rid of the need to do
quantization on 32 bit signed integers.

Overall, this slightly speeds up the encoder depending on the machine.
The commit still generates bit-identical files as before the commit.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-02-26 14:47:06 +00:00
Rostislav Pehlivanov
7db2e757c5 vc2enc: use FFABS() instead of abs()
Provides a minor speedup.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-02-26 12:55:34 +00:00
Rostislav Pehlivanov
3ef10406e1 vc2enc: correctly zero out coefficient array padding
Credit for figuring this out goes to James Darnley.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-02-26 12:21:36 +00:00
Rostislav Pehlivanov
35346c7b0f vc2enc: mark as FF_CODEC_CAP_INIT_THREADSAFE and align AVCodec entries
The encoder does not modify any global variables.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-02-26 12:17:42 +00:00
Carl Eugen Hoyos
0f31d401c3 lavc/mjpegdec: Fix decoding images with Adobe_CM tag.
Fixes ticket #5267.
2016-02-25 13:26:13 +01:00
Neil Birkbeck
ad17b9d2d4 libavcodec:add packet level support for mastering metadata
Some containers, like webm/mkv, will contain this mastering metadata.
This is analogous to the way 3D fpa data is handled (in frame and
packet side data).

Signed-off-by: Neil Birkbeck <neil.birkbeck@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-25 00:18:12 +01:00
Derek Buitenhuis
ef7ce480c8 Merge commit 'd24bd96bdd5b4bae9a9e0055fa8d1104db1283a9'
* commit 'd24bd96bdd5b4bae9a9e0055fa8d1104db1283a9':
  build: Disentangle VC-1 decoder and parser

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-24 18:23:36 +00:00
Derek Buitenhuis
b056482ef3 Merge commit '15a24614aef5836af3cd2c7cc3b2b737eee6bf3c'
* commit '15a24614aef5836af3cd2c7cc3b2b737eee6bf3c':
  build: Add vc1dsp component for more fine-grained dependencies

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-24 18:21:38 +00:00
Derek Buitenhuis
2814f06abf Merge commit 'f9fbd474676e903e12efe83203697d60a9d28cf9'
* commit 'f9fbd474676e903e12efe83203697d60a9d28cf9':
  msmpeg4data: Move WMV2 data tables to their own file

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-24 18:15:14 +00:00
Derek Buitenhuis
133aa68601 Merge commit '79866803ffc4c1a1b02663de9bab216b8cfdb8b4'
* commit '79866803ffc4c1a1b02663de9bab216b8cfdb8b4':
  msmpeg4data: K&R formatting cosmetics

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-24 18:13:25 +00:00
Derek Buitenhuis
745d0c0300 Merge commit '624e235502c5aa2d17e22dd6c0ccdf080a177310'
* commit '624e235502c5aa2d17e22dd6c0ccdf080a177310':
  build: Introduce iso_media component

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-24 17:53:30 +00:00
Derek Buitenhuis
34e4c588c8 Merge commit '82454c3a826bc8aa42474097784b70befd5be532'
* commit '82454c3a826bc8aa42474097784b70befd5be532':
  build: Let the WTV demuxer select the MPEG-TS demuxer
  build: Adjust mpeg4video parser dependencies
  build: Fix mpegvideo component dependencies
  build: Fix dependencies for components relying on H.263 data tables

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-24 17:46:10 +00:00