Commit Graph

73459 Commits

Author SHA1 Message Date
Michael Niedermayer 17498b70d8 Merge commit '161a301d44274645c2272855dac3e4664f935603'
* commit '161a301d44274645c2272855dac3e4664f935603':
  mpjpeg: Write the Content-length

Conflicts:
	libavformat/mpjpeg.c

See: 0d2f4eedc8
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 00:11:32 +02:00
Michael Niedermayer 2a33dc2cdf Merge commit 'd09b4cce21cdad5ef2855698395ffd6e37445212'
* commit 'd09b4cce21cdad5ef2855698395ffd6e37445212':
  mpjpeg: Simplify using avio_printf

Conflicts:
	libavformat/mpjpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-08 23:53:08 +02:00
Paul B Mahol 91748662bc avfilter: add removegrain
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-07-08 16:02:34 +00:00
Michael Niedermayer 3c63d06d81 avcodec/h264_slice: Fix container cropping
Fixes out of array read
Fixes: asan_heap-oob_394322e_138_cov_4265020547_CVPCMNL1_SVA_C.264

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-08 17:50:05 +02:00
Michael Niedermayer 80e42387dc avcodec/g2meet: Clear pointers after deallocation
Fixes double free

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-08 15:38:37 +02:00
Ganesh Ajjanagadde e34a3468f2 build: add LDLIBFLAGS
Fixes Ticket4673

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-08 14:35:02 +02:00
Michael Niedermayer e83ffb48ac avcodec/utils: Check values in apply_param_change()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-08 12:06:17 +02:00
Michael Niedermayer 656e9a68c4 avformat/swfdec: Fix "}else" style
Found-by: durandal_170
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-08 12:06:17 +02:00
Paul B Mahol 7efe81a813 avfilter/vf_colormatrix: add yuv444p support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-07-08 05:40:03 +00:00
Michael Niedermayer 6a1204a1a4 avformat/swfdec: Do not error out on pixel format changes
Instead print an error and continue

Fixes Ticket4702

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-08 02:43:02 +02:00
Michael Niedermayer b8c438e762 videodsp: assert that linesize is larger than width
Suggested-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-08 01:32:04 +02:00
Andreas Cadhalpun 42e7a5b3c7 wmalosslessdec: reset frame->nb_samples on packet loss
Otherwise a frame with non-zero nb_samples but without any data can be
returned.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-07-07 23:35:00 +02:00
Andreas Cadhalpun f9020d514e wmalosslessdec: avoid reading 0 bits with get_bits
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-07-07 23:34:28 +02:00
Rostislav Pehlivanov 80db686a69 aacenc: fix option descriptions
Since the new PNS implementation has been merged and is no longer considered
proof of concept (as it's much more complex and better than the previous), change
the comments to reflect that. We need people testing it (since all AAC profiles
require it to be on by default) and having it tagged as proof of concept might drive some away.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-07 22:56:30 +02:00
James Almer 7d5ab16506 avcodec/libdcadec: export matrix encoding side data
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-07-07 16:18:46 -03:00
Chris Watkins 55e29ceec8 Put a space between string literals and macros.
When compiling libavutil/internal.h as C++11, clang warns that a space
is required between a string literal and an identifier. Put spaces
in concatenations of string literals and EXTERN_PREFIX.

Signed-off-by: Chris Watkins <watk@chromium.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-07 21:10:15 +02:00
周晓勇 09883876ca configure: loongson enabled local aligned 32
Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-07 21:10:09 +02:00
Shivraj Patil d12f76ffbb avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for idctdsp functions
This patch adds MSA (MIPS-SIMD-Arch) optimizations for idctdsp functions in new file idctdsp_msa.c and simple_idct_msa.c

Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-07 14:35:15 +02:00
Ivan Uskov 9c95734e1c libavcodec/qsv.c: Linux-only code part has been moved to separate function in order to avoid the "ISO C90 forbids mixed declarations and code" compiler warning.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-07 14:03:59 +02:00
Carl Eugen Hoyos 1d5edad8cc lavf/mpegtsenc: Only fail aac muxing if the first frame is invalid.
Fixes ticket #3957.
2015-07-07 10:44:46 +02:00
周晓勇 d44cf5ef42 configure: add loongson2 cpu support
Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-07 03:47:06 +02:00
周晓勇 387cbe018c use mmi instead of loongson3 as simd-optimization flag
Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-07 03:46:57 +02:00
周晓勇 72aaca7488 avcodec: loongson remove useless macros in mipsfpu optimization
Loongson has disabled all mipsfpu optimization as fate-test faild.

Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-06 21:16:53 +02:00
Michael Niedermayer a3a61d4663 avcodec/lpc: Fix lpc_apply_welch_window_c() for odd len
Also removes assert
this fixes an assertion failure on non-x86

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-06 19:11:42 +02:00
Shivraj Patil 709bb45c66 avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for me_cmp functions
This patch adds MSA (MIPS-SIMD-Arch) optimizations for me_cmp functions in new file me_cmp_msa.c

Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-06 18:25:14 +02:00
Shivraj Patil 2f3f98af2b avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for mpegvideoencdsp functions
This patch adds MSA (MIPS-SIMD-Arch) optimizations for mpegvideoencdsp functions in new file mpegvideoencdsp_msa.c

Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-06 18:25:01 +02:00
Ivan Uskov 115c14c3b6 libavcodec/qsvenc.c: A warning message when library will work at partial hardware acceleration.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-06 17:39:08 +02:00
Rodger Combs 2375a85c36 ffmpeg_opt: allow the user to ignore unused stream maps
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-06 15:40:13 +02:00
Kieran Kunhya 8234f0e3b4 avcodec: Add support for Closed Caption export in h264
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-06 15:25:22 +02:00
Ivan Uskov 38402754b9 libavcodec/qsvenc.c: More correct selection of alignment of a frame height depending whether an encoded sequence progressive or not.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-06 15:13:08 +02:00
Marton Balint 859731d642 lavc/utils: get rid of add_metadata_from_side_data forward declaration
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-06 01:02:35 +02:00
Marton Balint 9476c4c67e lavc/utils: call add_metadata_from_side_data in ff_init_buffer_info
This should ensure that each frame get its metadata from its proper packet
regardless of frame delays caused by reordering or threading.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-06 00:39:29 +02:00
Marton Balint 10b6a83fb3 lavc/utils: change add_metadata_from_side_data to accept avpacket
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-06 00:08:48 +02:00
Marton Balint 3a19fe0048 lavc/utils: remove redundant call to ff_init_buffer_info
It does the same as calling ff_decode_frame_props.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-06 00:07:55 +02:00
Carl Eugen Hoyos 97fa0f37fe lavc/j2kenc: Enable yuv42x and yuv41x encoding.
Fixes ticket #535.
Fixes ticket #4524.
2015-07-06 00:06:54 +02:00
James Almer e43ea1cbb2 doc/texi2pod: fix an unescaped left brace
This silences some deprecation warnings

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-07-05 19:02:48 -03:00
Michael Niedermayer c0db6320a6 avcodec/avuienc: Use ff_alloc_packet()
This should be faster in theory for AVUI, no speed difference
meassurable though

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-05 23:05:25 +02:00
Michael Niedermayer 0e7bbdbeaf avcodec/avuienc: Initialize output data
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-05 23:05:25 +02:00
Michael Niedermayer 47496eb97c avcodec/rawenc: Use ff_alloc_packet() instead of ff_alloc_packet2()
the later is not optimal when the buffer size is well known at allocation time

This avoids a memcpy()
Overall 2.5% speedup with a random 1920x1080 video

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-05 20:00:15 +02:00
Rostislav Pehlivanov e8576dc8df aacenc: implement Intensity Stereo encoding support
This commit implements intensity stereo coding support
to the native aac encoder. This is a way to increase the efficiency
of the encoder by zeroing the right channel's spectral coefficients
(in a channel pair) and rederiving them in the decoder using information
from the scalefactor indices of special band types. This commit
confomrs to the official ISO 13818-7 specifications, although due to
their ambiguity certain deviations have been taken to ensure maximum
sound quality. This commit has been extensively tested and has shown
to not result in audiable audio artifacts unless in extreme cases.
This commit also adds an option, aac_is, which has the value of
0 by default. Intensity Stereo is part of the scalable aac profile
and is thus non-default.

The way IS coding works is that it rederives the right channel's
spectral coefficients from the left channel via the scalefactor
index values left in the right channel. Since an entire band's
spectral coefficients do not need to be coded, the encoder's
efficiency jumps up and it unzeroes some high frequency values
which it previously did not have enough bits to encode. That way
less information is lost than the information lost by rederiving
the spectral coefficients with some error. This is why the
filesize of files encoded with IS do not decrease significantly.
Users wishing that IS coding should reduce filesize are expected
to reduce their encoding bitrates appropriately.

This is V2 of the commit. The old version did not mark ms_mask as
0 since M/S and IS coding are incompactible, which resulted in
distortions with M/S coding enabled. This version also improves
phase detection by measuring it for every spectral coefficient in
the band and using a simple majority rule to determine whether the
coefficients are in or out of phase. Also, the energy values per
spectral coefficient were changed as to reflect the
official specifications.

Reviewed-by: Claudio Freire <klaussfreire@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-05 16:59:26 +02:00
Rostislav Pehlivanov 0b233900fa aacenc: add support for coding of IS spectral coefficients
This commit adds support for the coding of intensity stereo spectral
coefficients. It also fixes the Mid/Side coding of band_types higher
than RESERVED_BT (M/S must not be applied to their spectral coefficients,
but marking M/S as present in encode_ms_info() is okay). Much
of the changes here were taken from the decoder and inverted.
This commit does not change the functionality of the decoder as the
previous patch in this series zeroes ms_mask and is_mask.

Reviewed-by: Claudio Freire <klaussfreire@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-05 16:58:37 +02:00
Rostislav Pehlivanov 38fd4c2e66 aaccoder: add a new perceptual noise substitution implementation
This commit finalizes the PNS implementation previously added to the encoder
by moving it to a seperate function search_for_pns() and thus making it
coder-generic. This new implementation makes use of the spread field of
the psy bands and the lambda quality feedback paremeter. The spread of the
spectrum in a band prevents PNS from being used excessively and thus preserve
more phase information in high frequencies.  The lambda parameter allows
the number of PNS-marked bands to vary based on the lambda parameter and the
amount of bits available, making better choices on which bands are to be marked
as noise. Comparisons with the previous PNS implementation can be found
here: https://trac.ffmpeg.org/attachment/wiki/Encode/AAC/

This is V2 of the patch, the changes from the previous version being that this
version uses the new band->spread metric from aacpsy and normalizes the
energy using the group size. These changes were suggested by Claudio Freire
on the mailing list. Another change is the use of lambda to alter the
frequency threshold. This change makes the actual threshold frequencies
vary between +-2Khz of what's specified, depending on frame encoding performance.

Reviewed-by: Claudio Freire <klaussfreire@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-05 16:39:06 +02:00
Rostislav Pehlivanov 117b15f4a8 aaccoder: remove previous PNS implementation from twoloop
This commit undoes commit c5d4f87e81
and removes PNS band marking from the twoloop coder, which has
been reimplemented in a better way in this series of patches.

Reviewed-by: Claudio Freire <klaussfreire@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-05 16:38:32 +02:00
Rostislav Pehlivanov e06578e392 aacenc: use the new function for setting special band scalefactor indices
This commit enables the function added with commit 7c10b87 and uses that
new function for setting any special scalefactor indices. This commit does
not change the behaviour of the encoder since no bands are being marked as
either NOISE_BT(due to the previous PNS implementation removed in the
previous commit) or INTENSITY_BT2/INTENSITY_BT.

Reviewed-by: Claudio Freire <klaussfreire@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-05 16:36:38 +02:00
Philip Langdale 671bdd4b09 avcodec/nvenc: Add support for H.264 High 444 Predictive encoding
Newer versions of the nvenc hardware support The High 444 Predictive profile
of H.264, and can also do lossless encoding under this profile if desired.

This change introduces support for the profile, and exposes the appropriate
presets for requesting lossless encoding.

I tested lossless by generating a baseline sample with testsrc converted
to raw yuv444p, then encoded the sample with nvenc, then did a framemd5
comparision of both the raw video and the nvenc encode. The framemd5
reports were identical.

Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2015-07-05 13:51:56 +02:00
Frank Heckenbach 161a301d44 mpjpeg: Write the Content-length 2015-07-04 00:51:03 +02:00
Luca Barbato d09b4cce21 mpjpeg: Simplify using avio_printf 2015-07-04 00:46:44 +02:00
Vittorio Giovara f046c3b5ac lavc: Move deprecation warning disabling to files including the table
Unbreak build from 7a5902c556.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-07-03 21:02:50 +02:00
Paul B Mahol 5233f2534c avformat/yuv4mpegenc: use avio_printf()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-07-03 18:43:21 +00:00
Paul B Mahol e658b1036c avfilter/avf_showvolume: make it possible to use current channel number in color expression
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-07-03 18:43:21 +00:00