ffmpeg.git
3 years agoffprobe: avoid unnecessary pow and exp2 calls
Ganesh Ajjanagadde [Wed, 23 Dec 2015 17:49:00 +0000 (09:49 -0800)]
ffprobe: avoid unnecessary pow and exp2 calls

These are just for prefixes and may be hardcoded easily; see lavu/eval
for this approach.

Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agoffserver: Cast time_t value when using it in a format string.
Carl Eugen Hoyos [Tue, 29 Dec 2015 15:00:34 +0000 (16:00 +0100)]
ffserver: Cast time_t value when using it in a format string.

Fixes ticket #5103.

3 years agolavf/qtpalette: Treat 1-bit video as palettized
Mats Peterson [Tue, 29 Dec 2015 06:35:00 +0000 (07:35 +0100)]
lavf/qtpalette: Treat 1-bit video as palettized

This commit for qtpalette.c and qtpalette.h adds 1-bit video to the
"palettized video" category, since if the video sample description
contains a palette, the two colors in the palette can be any color, not
necessarily black & white.

Unfortunately, I've noticed that the qtrle (QuickTime Animation) decoder
blindly assumes that 1-bit video is black & white. I don't have enough
knowledge about the decoder to fix this, though.

Below is a link to a sample 1-bit QuickTime Animation clip of a rotating
earth that uses blueish colors, and they will be correctly rendered in
QuickTime, but not in FFmpeg (which will use black & white).

https://drive.google.com/open?id=0B3_pEBoLs0faUlItWm9KaGJSTEE

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec: Use get_ue_golomb_long() when needed
Mark Harris [Tue, 29 Dec 2015 07:04:08 +0000 (23:04 -0800)]
avcodec: Use get_ue_golomb_long() when needed

get_ue_golomb() cannot decode values larger than 8190 (the maximum
value that can be golomb encoded in 25 bits) and produces the error
"Invalid UE golomb code" if a larger value is encountered.  Use
get_ue_golomb_long() instead (which supports 63 bits, up to 4294967294)
when valid h264/hevc values can exceed 8190.

This updates decoding of the following values:   (maximum)
  first_mb_in_slice                                36863* for level 5.2
  abs_diff_pic_num_minus1                         131071
  difference_of_pic_nums_minus1                   131071
  idr_pic_id                                       65535
  recovery_frame_cnt                               65535
  frame_packing_arrangement_id                4294967294
  frame_packing_arrangement_repetition_period      16384
  display_orientation_repetition_period            16384

An alternative would be to modify get_ue_golomb() to handle encoded
values of up to 49 bits as was done for get_se_golomb() in a92816c.
In that case get_ue_golomb() could continue to be used for all of
these except frame_packing_arrangement_id.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavfilter/avf_showspectrum: properly calculate w factor
Paul B Mahol [Mon, 28 Dec 2015 22:45:34 +0000 (23:45 +0100)]
avfilter/avf_showspectrum: properly calculate w factor

It is used in calculating loudness of each frequency bin.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter/avf_showspectrum: add horizontal orientation support
Paul B Mahol [Tue, 29 Dec 2015 08:45:44 +0000 (09:45 +0100)]
avfilter/avf_showspectrum: add horizontal orientation support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agolavfi/af_anequalizer: replace pow(x,-2) by 1/(x*x)
Ganesh Ajjanagadde [Mon, 28 Dec 2015 00:50:09 +0000 (16:50 -0800)]
lavfi/af_anequalizer: replace pow(x,-2) by 1/(x*x)

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavfi/af_anequalizer: replace pow(10,x) by ff_exp10(x)
Ganesh Ajjanagadde [Mon, 28 Dec 2015 00:48:52 +0000 (16:48 -0800)]
lavfi/af_anequalizer: replace pow(10,x) by ff_exp10(x)

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavfi/af_anequalizer: remove cabs, cexp dependencies
Ganesh Ajjanagadde [Sun, 27 Dec 2015 05:51:28 +0000 (21:51 -0800)]
lavfi/af_anequalizer: remove cabs, cexp dependencies

Replaces by real arithmetic. Tested the validity of these transformations separately.
Numerical differences are ~1e-15, and should not matter: it is not even
clear which is more precise mathematically.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agoavfilter/avf_showspectrum: use FF_ARRAY_ELEMS()
Paul B Mahol [Mon, 28 Dec 2015 22:04:40 +0000 (23:04 +0100)]
avfilter/avf_showspectrum: use FF_ARRAY_ELEMS()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agox86/vf_stereo3d: make ff_anaglyph_sse4 work on x86_32
James Almer [Sun, 27 Dec 2015 21:52:00 +0000 (18:52 -0300)]
x86/vf_stereo3d: make ff_anaglyph_sse4 work on x86_32

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agox86/vf_stereo3d: optimize register usage
James Almer [Sun, 27 Dec 2015 20:44:48 +0000 (17:44 -0300)]
x86/vf_stereo3d: optimize register usage

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavfilter/avf_showspectrum: make colors for log scale more user friendly
Paul B Mahol [Mon, 28 Dec 2015 19:20:32 +0000 (20:20 +0100)]
avfilter/avf_showspectrum: make colors for log scale more user friendly

Previosly output was almost useless because background noise, due to
windowing function picked and which is not actually present in audio,
had too much brightness.
Now output of sine wave matches more with SoX.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter/avf_showspectrum: use ff_generate_window_func
Paul B Mahol [Mon, 28 Dec 2015 17:51:56 +0000 (18:51 +0100)]
avfilter/avf_showspectrum: use ff_generate_window_func

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter: move window function generation into separate file
Paul B Mahol [Mon, 28 Dec 2015 17:39:31 +0000 (18:39 +0100)]
avfilter: move window function generation into separate file

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter/avf_showspectrum: add rscroll sliding mode
Paul B Mahol [Mon, 28 Dec 2015 17:14:46 +0000 (18:14 +0100)]
avfilter/avf_showspectrum: add rscroll sliding mode

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavformat/http: Documented http_proxy option
Joel Holdsworth [Mon, 28 Dec 2015 09:50:15 +0000 (09:50 +0000)]
avformat/http: Documented http_proxy option

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agolavf/mpegtsenc: add automatic bitstream filtering
Rodger Combs [Mon, 30 Nov 2015 09:00:41 +0000 (03:00 -0600)]
lavf/mpegtsenc: add automatic bitstream filtering

3 years agolavf/matroskaenc: add automatic bitstream filtering
Rodger Combs [Thu, 8 Oct 2015 02:34:06 +0000 (21:34 -0500)]
lavf/matroskaenc: add automatic bitstream filtering

3 years agolavf: add internal API to append a bsf to a stream's list
Rodger Combs [Thu, 8 Oct 2015 02:10:08 +0000 (21:10 -0500)]
lavf: add internal API to append a bsf to a stream's list

3 years agolavf: add automatic bitstream filtering; bump version
Rodger Combs [Thu, 8 Oct 2015 02:32:14 +0000 (21:32 -0500)]
lavf: add automatic bitstream filtering; bump version

This solves the problem discussed in https://ffmpeg.org/pipermail/ffmpeg-devel/2015-September/179238.html
by allowing AVCodec::write_header to be delayed until after packets have been
run through required bitstream filters in order to generate global extradata.

It also provides a mechanism by which a muxer can add a bitstream filter to a
stream automatically, rather than prompting the user to do so.

3 years agolavf/tee: use lavf API for applying bitstream filters
Rodger Combs [Thu, 8 Oct 2015 19:52:48 +0000 (14:52 -0500)]
lavf/tee: use lavf API for applying bitstream filters

3 years agoffmpeg: use lavf API for applying bitstream filters
Rodger Combs [Thu, 8 Oct 2015 02:24:40 +0000 (21:24 -0500)]
ffmpeg: use lavf API for applying bitstream filters

3 years agolavf: add API to apply a list of bsfs to a packet
Rodger Combs [Thu, 8 Oct 2015 02:23:11 +0000 (21:23 -0500)]
lavf: add API to apply a list of bsfs to a packet

3 years agodoc/filters: add one more silenceremove example
Paul B Mahol [Mon, 28 Dec 2015 11:20:11 +0000 (12:20 +0100)]
doc/filters: add one more silenceremove example

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter/af_silenceremove: make size of window user configurable
Paul B Mahol [Mon, 28 Dec 2015 11:02:14 +0000 (12:02 +0100)]
avfilter/af_silenceremove: make size of window user configurable

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter/af_silenceremove: lower number of operations in for loop
Paul B Mahol [Mon, 28 Dec 2015 10:41:53 +0000 (11:41 +0100)]
avfilter/af_silenceremove: lower number of operations in for loop

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavcodec: properly check pkt_timebase for validity
Hendrik Leppkes [Sun, 27 Dec 2015 19:00:10 +0000 (20:00 +0100)]
avcodec: properly check pkt_timebase for validity

Unset/invalid timebases have a zero numerator.
This makes the checks consistent with other timebase checks and fixes an
integer division by 0.

3 years agoRevert "ffplay: Fix auto insertion point of rotation filter"
Michael Niedermayer [Mon, 28 Dec 2015 02:44:31 +0000 (03:44 +0100)]
Revert "ffplay: Fix auto insertion point of rotation filter"

Revert requested by Balint Marton <cus@passwd.hu>

See: [FFmpeg-devel] ffplay: insertion point of the auto rotation filter - Github ticket #141

This reverts commit 9cc1e644f39ed6a32e3a9bf5d0d6d663ca5791ab.

3 years agoavformat/qtpalette: Move ff_get_qtpalette() doxy to header
Michael Niedermayer [Mon, 28 Dec 2015 02:18:20 +0000 (03:18 +0100)]
avformat/qtpalette: Move ff_get_qtpalette() doxy to header

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/matroskadec: palettized QuickTime video in Matroska
Mats Peterson [Sun, 27 Dec 2015 20:28:09 +0000 (21:28 +0100)]
avformat/matroskadec: palettized QuickTime video in Matroska

Palettized QuickTime video in Matroska has hitherto not been recognized
whatsoever, and the "palette" used has been completely random.

The patch for matroskadec.c fixes this issue by adding a palette side
data packet in matroska_deliver_packet(), much in the same way as it's
done in mov.c.

Video samples for testing are available at
https://drive.google.com/open?id=0B3_pEBoLs0faWElmM2FnLTZYNlk.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat: factor ff_get_qtpalette() out of mov.c
Mats Peterson [Sun, 27 Dec 2015 20:28:09 +0000 (21:28 +0100)]
avformat: factor ff_get_qtpalette() out of mov.c

This consists mainly of moving the palette handling from
the mov_parse_stsd_video() function to a new ff_get_qtpalette() function
in the new file qtpalette.c, which will be shared by both matroskadec.c and
mov.c.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/hls: Added http_proxy support
Joel Holdsworth [Sun, 27 Dec 2015 12:21:45 +0000 (12:21 +0000)]
avformat/hls: Added http_proxy support

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/hls: Remember to free HLSContext::headers
Joel Holdsworth [Sun, 27 Dec 2015 12:21:44 +0000 (12:21 +0000)]
avformat/hls: Remember to free HLSContext::headers

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/http: Added http_proxy option
Joel Holdsworth [Sun, 27 Dec 2015 12:21:43 +0000 (12:21 +0000)]
avformat/http: Added http_proxy option

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavfilter/af_silenceremove: add peak detector
Paul B Mahol [Sun, 27 Dec 2015 19:45:46 +0000 (20:45 +0100)]
avfilter/af_silenceremove: add peak detector

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavcodec/on2avc: Fix stability issues with scale_tab generation
Michael Niedermayer [Sun, 27 Dec 2015 09:55:48 +0000 (10:55 +0100)]
avcodec/on2avc: Fix stability issues with scale_tab generation

This also simplifies the code
the resulting values are binary identical to what pow(10, i/10.0) produces

3 years agoavio: add detail to avio_printf() size warning
Reynaldo H. Verdejo Pinochet [Wed, 23 Dec 2015 23:05:32 +0000 (15:05 -0800)]
avio: add detail to avio_printf() size warning

Previous "currently size is limited" didn't give away
much in terms of useful info.

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
3 years agoffserver: add a doctype heading to our HTML pages
Reynaldo H. Verdejo Pinochet [Wed, 23 Dec 2015 06:24:40 +0000 (22:24 -0800)]
ffserver: add a doctype heading to our HTML pages

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
3 years agoffserver: HTML encode msgs instead of blindly stripping chars out
Reynaldo H. Verdejo Pinochet [Tue, 22 Dec 2015 08:53:38 +0000 (00:53 -0800)]
ffserver: HTML encode msgs instead of blindly stripping chars out

Fixes weirdness like our "??filename? not found" 404.

None of the chars being used from the previously blacklisted
list needs to be scaped on an UTF-8 document context

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
3 years agoffserver: make our 404 explicitly HTML5/UTF-8
Reynaldo H. Verdejo Pinochet [Tue, 22 Dec 2015 19:28:56 +0000 (11:28 -0800)]
ffserver: make our 404 explicitly HTML5/UTF-8

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
3 years agolavc/snowenc: replace rint by lrint
Ganesh Ajjanagadde [Fri, 25 Dec 2015 23:56:03 +0000 (15:56 -0800)]
lavc/snowenc: replace rint by lrint

avoids float to int cast.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavc/dds: replace rint by lrint
Ganesh Ajjanagadde [Fri, 25 Dec 2015 23:54:16 +0000 (15:54 -0800)]
lavc/dds: replace rint by lrint

avoids float to int cast.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavc/texturedsp: replace rint by lrint
Ganesh Ajjanagadde [Fri, 25 Dec 2015 21:22:00 +0000 (13:22 -0800)]
lavc/texturedsp: replace rint by lrint

avoids float to int cast.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavfi/avf_showspectrum: replace rint by lrint
Ganesh Ajjanagadde [Fri, 25 Dec 2015 21:19:12 +0000 (13:19 -0800)]
lavfi/avf_showspectrum: replace rint by lrint

avoids float to int cast.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavfi/vf_hue: replace rint by lrint
Ganesh Ajjanagadde [Fri, 25 Dec 2015 21:17:14 +0000 (13:17 -0800)]
lavfi/vf_hue: replace rint by lrint

avoids float to int cast.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agodoc/filters: note NetCDF dependency for sofalizer
Lou Logan [Sun, 27 Dec 2015 02:14:15 +0000 (17:14 -0900)]
doc/filters: note NetCDF dependency for sofalizer

Also add @url for link.

Signed-off-by: Lou Logan <lou@lrcd.com>
3 years agoavcodec/on2avc: fix regression on icc since 5495c7f
Ganesh Ajjanagadde [Sun, 27 Dec 2015 00:53:12 +0000 (16:53 -0800)]
avcodec/on2avc: fix regression on icc since 5495c7f

Should fix the regression, and also speeds up table generation.
Tables tested on GNU/Linux+clang: they are identical to the ones prior
to 5495c7f. ff_exp10 caused one slight change in one entry, 50000 became
50001 due to somewhat incorrect rounding.

Untested on ICC; passes FATE on GNU/Linux+gcc.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agoavformat/img2dec: Reuse main IO context instead of reopening a single file
Michael Niedermayer [Sat, 26 Dec 2015 18:38:13 +0000 (19:38 +0100)]
avformat/img2dec: Reuse main IO context instead of reopening a single file

Fixes part of Ticket4849

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/img2dec: Skip checking the input files existence if it has already been...
Michael Niedermayer [Sat, 26 Dec 2015 17:57:09 +0000 (18:57 +0100)]
avformat/img2dec: Skip checking the input files existence if it has already been opened

Avoids a unneeded open
Fixes part of Ticket4849

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoffplay: replace rint by lrint
Ganesh Ajjanagadde [Fri, 25 Dec 2015 19:27:53 +0000 (11:27 -0800)]
ffplay: replace rint by lrint

avoids the float to integer cast, and is slightly superior in terms of
rounding ("Dutch/Gauss rounding").

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavc/acelp_pitch_delay: replace exp2f(M_LOG2_10 *x) by ff_exp10f(x)
Ganesh Ajjanagadde [Wed, 23 Dec 2015 20:24:44 +0000 (12:24 -0800)]
lavc/acelp_pitch_delay: replace exp2f(M_LOG2_10 *x) by ff_exp10f(x)

Suggested-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavc/wmaprodec: replace pow(10,x) by ff_exp10(x)
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:38:39 +0000 (10:38 -0800)]
lavc/wmaprodec: replace pow(10,x) by ff_exp10(x)

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavc/wmaenc: replace pow(10,x) by ff_exp10(x)
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:36:30 +0000 (10:36 -0800)]
lavc/wmaenc: replace pow(10,x) by ff_exp10(x)

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavc/wmadec: replace pow(10,x) by ff_exp10(x)
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:34:22 +0000 (10:34 -0800)]
lavc/wmadec: replace pow(10,x) by ff_exp10(x)

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavc/opus: replace pow(10,x) by ff_exp10(x)
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:31:54 +0000 (10:31 -0800)]
lavc/opus: replace pow(10,x) by ff_exp10(x)

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavc/on2avc: replace pow(10,x) by ff_exp10(x)
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:30:08 +0000 (10:30 -0800)]
lavc/on2avc: replace pow(10,x) by ff_exp10(x)

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavc/imc: replace pow(10,x) by ff_exp10(x)
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:26:37 +0000 (10:26 -0800)]
lavc/imc: replace pow(10,x) by ff_exp10(x)

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavc/dcaenc: replace pow(10,x) by ff_exp10(x)
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:23:47 +0000 (10:23 -0800)]
lavc/dcaenc: replace pow(10,x) by ff_exp10(x)

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavc/cngdec: replace pow(10,x) by ff_exp10(x)
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:20:15 +0000 (10:20 -0800)]
lavc/cngdec: replace pow(10,x) by ff_exp10(x)

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavc/aacpsy: replace pow(10,x) by ff_exp10(x)
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:09:01 +0000 (10:09 -0800)]
lavc/aacpsy: replace pow(10,x) by ff_exp10(x)

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavfi/af_compand: replace pow(10,x) by ff_exp10(x)
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:06:57 +0000 (10:06 -0800)]
lavfi/af_compand: replace pow(10,x) by ff_exp10(x)

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavfi/af_volume: replace pow(10,x) by ff_exp10(x)
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:05:34 +0000 (10:05 -0800)]
lavfi/af_volume: replace pow(10,x) by ff_exp10(x)

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavfi/f_ebur128: replace pow(10,x) by ff_exp10(x)
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:04:04 +0000 (10:04 -0800)]
lavfi/f_ebur128: replace pow(10,x) by ff_exp10(x)

Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavfi/vsrc_testsrc: replace pow(10,x) by ff_exp10(x)
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:01:35 +0000 (10:01 -0800)]
lavfi/vsrc_testsrc: replace pow(10,x) by ff_exp10(x)

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavu/eval: replace pow(10,x) by ff_exp10(x)
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:00:13 +0000 (10:00 -0800)]
lavu/eval: replace pow(10,x) by ff_exp10(x)

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavc/libopusdec: replace pow(10,x) by ff_exp10(x)
Ganesh Ajjanagadde [Wed, 23 Dec 2015 18:27:59 +0000 (10:27 -0800)]
lavc/libopusdec: replace pow(10,x) by ff_exp10(x)

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavu/internal: add ff_exp10
Ganesh Ajjanagadde [Fri, 25 Dec 2015 16:07:08 +0000 (08:07 -0800)]
lavu/internal: add ff_exp10

Fast, reasonably accurate 10^x. Alternative of detection of libm exp10 at configure
time is not worth the trouble, since it is anyway not POSIX or ISO C,
and currently only the GNU libm has it. Furthermore, GNU libm's variant
is ~ 2x slower, and is ironically not correctly rounded (2 ulp off) to justify all
that slowdown.

Reviewed-by: James Almer <jamrial@gmail.com>
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavu/libm,configure: remove exp10, exp10f detection
Ganesh Ajjanagadde [Fri, 25 Dec 2015 16:30:06 +0000 (08:30 -0800)]
lavu/libm,configure: remove exp10, exp10f detection

Subsequent commit introduces ff_exp10 instead.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavu/libm: misc, minor changes
Ganesh Ajjanagadde [Fri, 25 Dec 2015 17:20:27 +0000 (09:20 -0800)]
lavu/libm: misc, minor changes

Addition of comments marking the end of ifdef blocks, correction of an
incorrect (at double precision) M_LN2, removal of an unnecessary undef.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agotools/bookmarklets: HTML code fixes
Reto Kromer [Thu, 24 Dec 2015 14:00:46 +0000 (15:00 +0100)]
tools/bookmarklets: HTML code fixes

Minor HTML5 code changes.

Closes #167

3 years agoavfilter/af_anequalizer: make cliping filter type actually useful
Paul B Mahol [Fri, 25 Dec 2015 14:03:46 +0000 (15:03 +0100)]
avfilter/af_anequalizer: make cliping filter type actually useful

Previously result was ignored.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter/af_anequalizer: use pow instead of exp10
Paul B Mahol [Fri, 25 Dec 2015 14:00:06 +0000 (15:00 +0100)]
avfilter/af_anequalizer: use pow instead of exp10

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter: add high-order parametric multiband equalizer filter
Paul B Mahol [Sun, 20 Dec 2015 08:50:35 +0000 (09:50 +0100)]
avfilter: add high-order parametric multiband equalizer filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agodoc/muxers/mpegts: update doc after adding flag to embed an AC-3/E-AC-3 ES the DVB way
Stefan Pöschel [Fri, 25 Dec 2015 09:33:35 +0000 (10:33 +0100)]
doc/muxers/mpegts: update doc after adding flag to embed an AC-3/E-AC-3 ES the DVB way

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec: add OpenJPEG 2.x compatibility
Michael Bradshaw [Mon, 2 Nov 2015 03:11:12 +0000 (19:11 -0800)]
avcodec: add OpenJPEG 2.x compatibility

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoffplay: Fix auto insertion point of rotation filter
wanzhang [Wed, 29 Jul 2015 17:16:43 +0000 (01:16 +0800)]
ffplay: Fix auto insertion point of rotation filter

Fixes watermark rotation for videos using auto rotation

Closes #141

3 years agoswscale/utils: Fix intermediate format for cascaded alpha downscaling
Michael Niedermayer [Thu, 24 Dec 2015 20:46:15 +0000 (21:46 +0100)]
swscale/utils: Fix intermediate format for cascaded alpha downscaling

Fixes Ticket4926

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/mpegts: consider stream_type 4 just a hint toward mp3 and not definite
Michael Niedermayer [Thu, 24 Dec 2015 19:32:11 +0000 (20:32 +0100)]
avformat/mpegts: consider stream_type 4 just a hint toward mp3 and not definite

Fixes Ticket 4864

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/ac3dec: Print the value of out of range exponents
Michael Niedermayer [Thu, 24 Dec 2015 16:46:12 +0000 (17:46 +0100)]
avcodec/ac3dec: Print the value of out of range exponents

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoswr/resample: use av_clip_int16 instead of av_clip
Ganesh Ajjanagadde [Wed, 23 Dec 2015 22:48:40 +0000 (14:48 -0800)]
swr/resample: use av_clip_int16 instead of av_clip

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agoavfilter/af_sofalizer: make virtual speaker positioning supports all channel layouts
Paul B Mahol [Thu, 24 Dec 2015 16:53:11 +0000 (17:53 +0100)]
avfilter/af_sofalizer: make virtual speaker positioning supports all channel layouts

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agox86/vf_blend: add sse2 versions of blend_difference and blend_negation
James Almer [Thu, 24 Dec 2015 02:55:56 +0000 (23:55 -0300)]
x86/vf_blend: add sse2 versions of blend_difference and blend_negation

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agox86/vf_blend: make all functions work on x86_32
James Almer [Thu, 24 Dec 2015 02:54:33 +0000 (23:54 -0300)]
x86/vf_blend: make all functions work on x86_32

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agox86/vf_blend: simplify using macros
James Almer [Thu, 24 Dec 2015 02:51:45 +0000 (23:51 -0300)]
x86/vf_blend: simplify using macros

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agox86/vf_maskedmerge: make ff_maskedmerge8_sse2 work on x86_32
James Almer [Wed, 23 Dec 2015 23:37:37 +0000 (20:37 -0300)]
x86/vf_maskedmerge: make ff_maskedmerge8_sse2 work on x86_32

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavformat/mpegtsenc: add flag to embed an AC-3/E-AC-3 ES the DVB way
Stefan Pöschel [Sun, 13 Dec 2015 10:54:32 +0000 (11:54 +0100)]
avformat/mpegtsenc: add flag to embed an AC-3/E-AC-3 ES the DVB way

So far an AC-3 elementary stream is refered to in the PMT according to
System A (ATSC). An E-AC-3 ES in contrast is embedded the System B (DVB) way.
To fix this inconsistency, this commit changes the default E-AC-3 behaviour to
use the ATSC way, too. Furthermore a new flag is added to optionally select the
DVB way (regarding both codecs and possible further differences in the future).

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavfilter/x86/vf_maskedmerge: Clear upper part of width
Michael Niedermayer [Wed, 23 Dec 2015 20:57:31 +0000 (21:57 +0100)]
avfilter/x86/vf_maskedmerge: Clear upper part of width

Fixes crash
Fixes: Ticket5055

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavfilter/af_biquads: display clipping warnings once per filtered frame
Paul B Mahol [Wed, 23 Dec 2015 18:15:25 +0000 (19:15 +0100)]
avfilter/af_biquads: display clipping warnings once per filtered frame

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agolavu/libm: add exp10 support
Ganesh Ajjanagadde [Tue, 22 Dec 2015 03:05:00 +0000 (19:05 -0800)]
lavu/libm: add exp10 support

exp10 is a function available in GNU libm. Looks like no other common
libm has it. This adds support for it to FFmpeg.

There are essentially 2 ways of handling the fallback:
1. Using pow(10, x)
2. Using exp2(M_LOG2_10 * x).

First one represents a Pareto improvement, with no speed or accuracy
regression anywhere, but speed improvement limited to GNU libm.

Second one represents a slight accuracy loss (relative error ~ 1e-13)
for non GNU libm. Speedup of > 2x is obtained on non GNU libm platforms,
~30% on GNU libm. These are "average case numbers", another benefit is
the lack of triggering of the well-known terrible worst case paths
through pow.

Based on reviews, second one chosen. Comment added accordingly.

Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agolavfi/af_aemphasis: remove unnecessary complex number usage
Ganesh Ajjanagadde [Tue, 22 Dec 2015 01:12:04 +0000 (17:12 -0800)]
lavfi/af_aemphasis: remove unnecessary complex number usage

complex is not available on all platforms. Furthermore, it is trivial to
rewrite complex number expressions to real arithmetic, and in fact
sometimes advantageous for performance reasons: by wrapping as a complex,
one forces a particular Cartesian representation that is not necessarily optimal for the purpose.

Configure dependencies also removed, and aemphasis is now available across
all platforms.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agoavformat/subtitles: treat negative duration like unknown duration
wm4 [Wed, 23 Dec 2015 14:08:58 +0000 (15:08 +0100)]
avformat/subtitles: treat negative duration like unknown duration

Fixes a specific srt sample, which has an event with negative duration.
libavcodec will convert an event with negative duration to an ASS event
which will be displayed forever, which is not wanted here.

Treat negative duration always as unknown duration instead, and show it
until the next subtitle event.

3 years agoavcodec/s302menc: comment out allowed channel layouts
Paul B Mahol [Wed, 23 Dec 2015 11:46:23 +0000 (12:46 +0100)]
avcodec/s302menc: comment out allowed channel layouts

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavcodec/libschroedingerenc: add missing AVClass to private context
Hendrik Leppkes [Wed, 23 Dec 2015 09:22:00 +0000 (10:22 +0100)]
avcodec/libschroedingerenc: add missing AVClass to private context

Fixes ticket #5104.

3 years agodiracdec: add missing check for pixel_range_index
Andreas Cadhalpun [Tue, 22 Dec 2015 18:44:00 +0000 (19:44 +0100)]
diracdec: add missing check for pixel_range_index

This fixes an out-of-bounds read introduced in commit 0379603.

Reviewed-by: Kieran Kunhya <kierank@obe.tv>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
3 years agomlvdec: validate bits_per_coded_sample
Andreas Cadhalpun [Sat, 19 Dec 2015 22:45:00 +0000 (23:45 +0100)]
mlvdec: validate bits_per_coded_sample

A negative bits_per_coded_sample doesn't make sense.
If it is too large, the size calculation for av_get_packet overflows,
resulting in allocation of a too small buffer.

Also make sure width and height are sane.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
3 years agoavformat/movenc-test: Make format static
Michael Niedermayer [Tue, 22 Dec 2015 16:12:02 +0000 (17:12 +0100)]
avformat/movenc-test: Make format static

Makes greping for non static consts easier

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/mov: Update handbrake_version threshold for full mp3 parsing
Michael Niedermayer [Tue, 22 Dec 2015 15:19:44 +0000 (16:19 +0100)]
avformat/mov: Update handbrake_version threshold for full mp3 parsing

Fixes: Endangered\ Species\ 1x01\ Collecting\ Merl.mp4

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agolavfi: make request_frame() non-recursive.
Nicolas George [Wed, 30 Sep 2015 14:11:57 +0000 (16:11 +0200)]
lavfi: make request_frame() non-recursive.

Instead of calling the input filter request_frame() method,
ff_request_frame() now marks the link and returns immediately.
buffersink is changed to activate the marked filters until
a frame is obtained.

3 years agolavfi: replace link.closed by link.status.
Nicolas George [Thu, 24 Sep 2015 08:07:42 +0000 (10:07 +0200)]
lavfi: replace link.closed by link.status.

The status field can carry any error code instead of just EOF.
Also only update it through a wrapper function and provide a timestamp.
Update the few filters that used it directly.