ffmpeg.git
2 years agoavutil/avassert: Add av_assertX_fpu()
Michael Niedermayer [Fri, 21 Oct 2016 10:50:03 +0000 (12:50 +0200)]
avutil/avassert: Add av_assertX_fpu()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/snowenc: Clear MMX state after edge drawing and picture encode
Michael Niedermayer [Fri, 21 Oct 2016 13:10:48 +0000 (15:10 +0200)]
avcodec/snowenc: Clear MMX state after edge drawing and picture encode

Fixes undefined behavior from calling libc allocation with unclean FPU state.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/mpegvideo_enc: Add missing emms_c() to clear MMX state after SIMD use
Michael Niedermayer [Fri, 21 Oct 2016 13:01:36 +0000 (15:01 +0200)]
avcodec/mpegvideo_enc: Add missing emms_c() to clear MMX state after SIMD use

Fixes undefined behavior due to calling libc allocation with unclean FPU state

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/utils: Move emms_c() before memory allocation functions in avcodec_encode_vid...
Michael Niedermayer [Fri, 21 Oct 2016 12:47:34 +0000 (14:47 +0200)]
avcodec/utils: Move emms_c() before memory allocation functions in avcodec_encode_video2()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/cavsdec: Clear MMX state after MB decode loop
Michael Niedermayer [Fri, 21 Oct 2016 12:38:52 +0000 (14:38 +0200)]
avcodec/cavsdec: Clear MMX state after MB decode loop

The MMX state must be cleared between using MMX and using memory allocation
thats basically the only location between the 2

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/svq1enc: Clear MMX state after svq1_encode_plane()
Michael Niedermayer [Fri, 21 Oct 2016 12:33:42 +0000 (14:33 +0200)]
avcodec/svq1enc: Clear MMX state after svq1_encode_plane()

svq1_encode_plane() uses SIMD and we call libc memory allocation functions after it

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolavf/rtpdec_g726: Map mime type G726 to g726le.
Carl Eugen Hoyos [Sat, 22 Oct 2016 01:53:38 +0000 (03:53 +0200)]
lavf/rtpdec_g726: Map mime type G726 to g726le.

Add new mime types AAL2-G726 for g726 as suggested in rfc 3551.

This patch will break interaction with applications that incorrectly
use big-endian G.726 with mime type G726 but we know of at least one
device (DVTel camera) that correctly implements the rfc, so do the same.

Fixes ticket #5890.

2 years agolavc/libvpxenc: fix -auto-alt-ref option type
Kagami Hiiragi [Thu, 20 Oct 2016 15:31:38 +0000 (18:31 +0300)]
lavc/libvpxenc: fix -auto-alt-ref option type

vp9_cx_iface actually allows values in range [0..2].
This fixes ticket #5894.

Signed-off-by: Kagami Hiiragi <kagami@genshiken.org>
Signed-off-by: James Zern <jzern@google.com>
2 years agodoc: fix spelling errors
Andreas Cadhalpun [Thu, 13 Oct 2016 21:08:01 +0000 (23:08 +0200)]
doc: fix spelling errors

Thanks to Mathieu Malaterre <malat@debian.org> for reporting the
Que/Queue typo. (https://bugs.debian.org/839542)

Reviewed-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agolavf/mpegts: SCTE-35 extraction from mpegts
Carlos Fernandez [Wed, 19 Oct 2016 00:36:28 +0000 (17:36 -0700)]
lavf/mpegts: SCTE-35 extraction from mpegts

Reviewed-by: Marton Balint <cus@passwd.hu>
Acked-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Carlos Fernandez <carlos@ccextractor.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agolavc: add SCTE-35 CUI codec ID
Carlos Fernandez [Wed, 19 Oct 2016 00:36:27 +0000 (17:36 -0700)]
lavc: add SCTE-35 CUI codec ID

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Carlos Fernandez <carlos@ccextractor.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agolavd/decklink_dec: fix indentation
Marton Balint [Thu, 13 Oct 2016 21:58:53 +0000 (23:58 +0200)]
lavd/decklink_dec: fix indentation

Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agolavd/decklink_dec: add option to disable drawing bars on signal loss
Marton Balint [Thu, 13 Oct 2016 21:56:45 +0000 (23:56 +0200)]
lavd/decklink_dec: add option to disable drawing bars on signal loss

Signed-off-by: Marton Balint <cus@passwd.hu>
2 years agoavformat/mxfdec: Check size to avoid integer overflow in mxf_read_utf16_string()
Michael Niedermayer [Fri, 21 Oct 2016 17:45:21 +0000 (19:45 +0200)]
avformat/mxfdec: Check size to avoid integer overflow in mxf_read_utf16_string()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/mxfdec: Fix mixed declaration and code
Michael Niedermayer [Fri, 21 Oct 2016 17:34:05 +0000 (19:34 +0200)]
avformat/mxfdec: Fix mixed declaration and code

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agompeg12dec: unref discarded picture from extradata
Andreas Cadhalpun [Thu, 20 Oct 2016 20:51:55 +0000 (22:51 +0200)]
mpeg12dec: unref discarded picture from extradata

Otherwise another frame gets referenced into picture, triggering an assert
(from commit 13aae8) in av_frame_ref.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agocavsdec: unref frame before referencing again
Andreas Cadhalpun [Thu, 20 Oct 2016 20:14:22 +0000 (22:14 +0200)]
cavsdec: unref frame before referencing again

This fixes asserts (from commit 13aae8) in av_frame_ref and
av_frame_move_ref.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agodcstr: fix division by zero
Andreas Cadhalpun [Thu, 20 Oct 2016 18:13:54 +0000 (20:13 +0200)]
dcstr: fix division by zero

Also check for possible overflows.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agoaiff: check block_align in aiff_read_packet
Andreas Cadhalpun [Thu, 20 Oct 2016 18:08:15 +0000 (20:08 +0200)]
aiff: check block_align in aiff_read_packet

It can be unset in avcodec_parameters_from_context and a value of 0
causes SIGFPE crashes.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agoavcodec/vda: define av_vda_default_init2 when CONFIG_H264_VDA_HWACCEL equ 0
Steven Liu [Wed, 12 Oct 2016 09:36:51 +0000 (17:36 +0800)]
avcodec/vda: define av_vda_default_init2 when CONFIG_H264_VDA_HWACCEL equ 0

on OSX:
../configure --disable-everything --enable-demuxer=hls make
error message: Undefined symbols for architecture x86_64:
"_av_vda_default_init2", referenced from:_videotoolbox_init in
ffmpeg_videotoolbox.o
so add av_vda_default_init2 when CONFIG_H264_VDA_HWACCEL=0

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Reviewed-by: Xidorn Quan <quanxunzhen@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/rtmpproto: Fix RTMP control message handling error in listen mode.
Hiroyuki OYAMA [Wed, 12 Oct 2016 06:33:44 +0000 (15:33 +0900)]
avformat/rtmpproto: Fix RTMP control message handling error in listen mode.

Fix problem to fail by a RTMP Control Message except "Set Chunk Size (1)" after an RTMP handshake. When 'nginx-rtmp-module' relays an RTMP, it sends not only control message 'Set Chunk Size (1)' but also 'Window Acknowledgement Size (5)'.

Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/mpegvideo_enc: Clear mmx state in ff_mpv_reallocate_putbitbuffer()
Michael Niedermayer [Fri, 21 Oct 2016 12:05:00 +0000 (14:05 +0200)]
avcodec/mpegvideo_enc: Clear mmx state in ff_mpv_reallocate_putbitbuffer()

This function must be called from the mb or slice encoding loop and MMX state may not
be clean there

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/utils: Clear MMX state before returning from avcodec_default_execute*()
Michael Niedermayer [Fri, 21 Oct 2016 11:40:18 +0000 (13:40 +0200)]
avcodec/utils: Clear MMX state before returning from avcodec_default_execute*()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavcodec/dnxhdenc: Move allocation out of radix_sort()
Michael Niedermayer [Fri, 21 Oct 2016 11:29:46 +0000 (13:29 +0200)]
avcodec/dnxhdenc: Move allocation out of radix_sort()

Its slow, its not checked, FPU state is not clean either currently there

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolavf/segment: decide whether to rename based on list URI
Rodger Combs [Thu, 6 Oct 2016 07:00:25 +0000 (02:00 -0500)]
lavf/segment: decide whether to rename based on list URI

This fixes the case of writing segments to local files, but the list
over a network protocol.

2 years agoopenssl: Support version 1.1.0.
Matt Oliver [Sun, 9 Oct 2016 19:49:54 +0000 (06:49 +1100)]
openssl: Support version 1.1.0.

Fixes #5675

Signed-off-by: Matt Oliver <protogonoi@gmail.com>
2 years agotests/fate: add mxf metadata streams test
Mark Reid [Wed, 21 Sep 2016 20:42:09 +0000 (13:42 -0700)]
tests/fate: add mxf metadata streams test

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolibavformat/mxfdec: add metadata streams for external referenced sourclips
Mark Reid [Wed, 21 Sep 2016 20:42:08 +0000 (13:42 -0700)]
libavformat/mxfdec: add metadata streams for external referenced sourclips

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolibavformat/mxfdec: don't assume first stream index to be primary
Mark Reid [Wed, 21 Sep 2016 20:42:07 +0000 (13:42 -0700)]
libavformat/mxfdec: don't assume first stream index to be primary

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolibavformat/mxfdec: export track name metadata
Mark Reid [Wed, 21 Sep 2016 20:42:06 +0000 (13:42 -0700)]
libavformat/mxfdec: export track name metadata

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavformat/mxfdec: Detect field_order based on video_line_map
Tobias Rapp [Wed, 19 Oct 2016 12:35:20 +0000 (14:35 +0200)]
avformat/mxfdec: Detect field_order based on video_line_map

Read video_line_map from MXF generic picture essence descriptor and use
it to derive the coded field order. Use field_dominance to derive the
display field order from coded field order. If field_dominance is not
available the default value "1" is used as defined in SMPTE S377-1.

Fixes field_order detection for a bunch of DV/DVCPRO files. The heuristic
for deriving coded field order from video_line_map is inspired by
MediaInfo.

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agorsd: limit number of channels
Andreas Cadhalpun [Wed, 19 Oct 2016 21:40:41 +0000 (23:40 +0200)]
rsd: limit number of channels

Negative values don't make sense and too large values can cause
overflows. For AV_CODEC_ID_ADPCM_THP this leads to a too small extradata
buffer being allocated, causing out-of-bounds writes.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agodxva2: fix surface selection when compiled with both d3d11va and dxva2
Hendrik Leppkes [Thu, 20 Oct 2016 17:31:34 +0000 (19:31 +0200)]
dxva2: fix surface selection when compiled with both d3d11va and dxva2

Fixes a regression introduced in 9b462a0b9

2 years agoavformat/flvenc: do not attempt to write duration and filesize when not seekable
Steven Liu [Wed, 12 Oct 2016 10:11:41 +0000 (18:11 +0800)]
avformat/flvenc: do not attempt to write duration and filesize when not seekable

Its impossible to update the filesize & duration values if seekback is not
possible as with live streams

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolavc/sheervideo: Increase av_get_codec_tag_string() input buffer size.
Carl Eugen Hoyos [Tue, 18 Oct 2016 12:53:30 +0000 (14:53 +0200)]
lavc/sheervideo: Increase av_get_codec_tag_string() input buffer size.

A size of 32 is typically used.

2 years agoavfilter/firequalizer: use zero phase kernel
Muhammad Faiz [Wed, 19 Oct 2016 15:22:36 +0000 (22:22 +0700)]
avfilter/firequalizer: use zero phase kernel

this makes real-valued kernel

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2 years agoavfilter/showcqt: add cscheme option
Muhammad Faiz [Wed, 19 Oct 2016 15:17:24 +0000 (22:17 +0700)]
avfilter/showcqt: add cscheme option

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2 years agolavf/riff: Document the interleaving of VSM4 video.
Carl Eugen Hoyos [Wed, 19 Oct 2016 21:39:19 +0000 (23:39 +0200)]
lavf/riff: Document the interleaving of VSM4 video.

2 years agoavformat: prevent triggering request_probe assert in ff_read_packet
Andreas Cadhalpun [Wed, 19 Oct 2016 17:23:49 +0000 (19:23 +0200)]
avformat: prevent triggering request_probe assert in ff_read_packet

If probe_codec is called with pkt == NULL, it sets probe_packets to 0
and request_probe to -1.
However, request_probe can change when calling s->iformat->read_packet
and thus a probe_packets value of 0 doesn't guarantee a request_probe
value of -1.
In that case calling probe_codec again is necessary to prevent
triggering the assert.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agoFATE: Add test for muxing discontinuous MP4 fragments with large timestamps
Derek Buitenhuis [Tue, 18 Oct 2016 15:30:08 +0000 (16:30 +0100)]
FATE: Add test for muxing discontinuous MP4 fragments with large timestamps

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2 years agoavformat/movenc: Skip duration check for discontinuous fragments
Michael Niedermayer [Tue, 18 Oct 2016 16:18:49 +0000 (18:18 +0200)]
avformat/movenc: Skip duration check for discontinuous fragments

Found-by: Daemon404
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolavf/mov: support gopro hero moments udta tag
Jean Caillé [Tue, 18 Oct 2016 13:47:55 +0000 (15:47 +0200)]
lavf/mov: support gopro hero moments udta tag

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agoavfilter/vf_scale_npp: select cubic and lanczos as alternative where super-sampling...
Sven C. Dack [Wed, 19 Oct 2016 10:51:21 +0000 (12:51 +0200)]
avfilter/vf_scale_npp: select cubic and lanczos as alternative where super-sampling is not supported

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2 years agoavcodec/nvenc_hevc: Added missing option -temporal_aq
Sven C. Dack [Thu, 13 Oct 2016 17:06:09 +0000 (18:06 +0100)]
avcodec/nvenc_hevc: Added missing option -temporal_aq

The option is present in h264_nvenc, but was missing from hevc_nvenc.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2 years agoavcodec/nvenc: add test for Temporal AQ support
Sven C. Dack [Fri, 14 Oct 2016 15:02:54 +0000 (16:02 +0100)]
avcodec/nvenc: add test for Temporal AQ support

Adds a check to see if the hardware supports temporal aq.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2 years agolavc/mediacodec: use more meaningful filenames
Matthieu Bouron [Wed, 12 Oct 2016 12:44:08 +0000 (14:44 +0200)]
lavc/mediacodec: use more meaningful filenames

Adds the following changes:
  * mediacodecdec.{c,h} -> mediacodecdec_common.{c,h}
  * mediacodecdec_h2645.c -> mediacodecdec.c

2 years agolavc: add mpeg4 mediacodec decoder
Matthieu Bouron [Tue, 4 Oct 2016 15:47:44 +0000 (17:47 +0200)]
lavc: add mpeg4 mediacodec decoder

2 years agolavc: add vp8/vp9 mediacodec decoders
Matthieu Bouron [Tue, 4 Oct 2016 14:02:59 +0000 (16:02 +0200)]
lavc: add vp8/vp9 mediacodec decoders

2 years agolavc/mediacodec_wrapper: do not discard codecs reporting they do not support any...
Matthieu Bouron [Fri, 7 Oct 2016 09:20:33 +0000 (11:20 +0200)]
lavc/mediacodec_wrapper: do not discard codecs reporting they do not support any profile

Depending on the device, some (VP8/VP9/...) decoders report that they do
not support any profiles.

2 years agoavfilter/firequalizer: add cubic_interpolate function on gain
Muhammad Faiz [Tue, 18 Oct 2016 15:55:39 +0000 (22:55 +0700)]
avfilter/firequalizer: add cubic_interpolate function on gain

smoother version of gain_interpolate

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2 years agoavformat/matroskadec: fix BitsPerChannel element's default value
James Almer [Wed, 19 Oct 2016 02:55:32 +0000 (23:55 -0300)]
avformat/matroskadec: fix BitsPerChannel element's default value

The element is currently ignored, so there's no effective functionality
change with this.

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/matroskadec: clarify some Colour element defaults using enum values
James Almer [Wed, 19 Oct 2016 02:40:09 +0000 (23:40 -0300)]
avformat/matroskadec: clarify some Colour element defaults using enum values

This way it's more clear what the default values refer to, as
Undetermined/Unspecified is 0 for some, 2 for others.

Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/mov: pass the demuxer's AVFormatContext to avpriv_request_sample()
James Almer [Mon, 17 Oct 2016 00:23:17 +0000 (21:23 -0300)]
avformat/mov: pass the demuxer's AVFormatContext to avpriv_request_sample()

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agolavc/videotoolboxenc: skip SEI allocation when side data is not present
Aman Gupta [Tue, 18 Oct 2016 23:44:33 +0000 (16:44 -0700)]
lavc/videotoolboxenc: skip SEI allocation when side data is not present

Signed-off-by: Rick Kern <kernrj@gmail.com>
2 years agoavformat/matroskadec: support parsing Chroma Location elements
James Almer [Tue, 18 Oct 2016 02:50:14 +0000 (23:50 -0300)]
avformat/matroskadec: support parsing Chroma Location elements

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoaacenc: add SIMD optimizations for abs_pow34 and quantization
Rostislav Pehlivanov [Sat, 8 Oct 2016 14:59:14 +0000 (15:59 +0100)]
aacenc: add SIMD optimizations for abs_pow34 and quantization

Performance improvements:

quant_bands:
with:     681 decicycles in quant_bands, 8388453 runs,    155 skips
without: 1190 decicycles in quant_bands, 8388386 runs,    222 skips
Around 42% for the function

Twoloop coder:

abs_pow34:
with/without: 7.82s/8.17s
Around 4% for the entire encoder

Both:
with/without: 7.15s/8.17s
Around 12% for the entire encoder

Fast coder:

abs_pow34:
with/without: 3.40s/3.77s
Around 10% for the entire encoder

Both:
with/without: 3.02s/3.77s
Around 20% faster for the entire encoder

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: James Almer <jamrial@gmail.com>
2 years agolavf/mp3enc: write encoder delay/padding upon closing
Jon Toohill [Mon, 17 Oct 2016 21:55:04 +0000 (14:55 -0700)]
lavf/mp3enc: write encoder delay/padding upon closing

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agolavc/libmp3lame: send encoder delay/padding in packet side data
Jon Toohill [Mon, 17 Oct 2016 21:55:03 +0000 (14:55 -0700)]
lavc/libmp3lame: send encoder delay/padding in packet side data

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agoavfilter/firequalizer: add dumpfile and dumpscale option
Muhammad Faiz [Mon, 17 Oct 2016 18:13:19 +0000 (01:13 +0700)]
avfilter/firequalizer: add dumpfile and dumpscale option

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2 years agoswresample/resample: fix return value of build_filter
Muhammad Faiz [Tue, 18 Oct 2016 07:13:39 +0000 (14:13 +0700)]
swresample/resample: fix return value of build_filter

return AVERROR code on error

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2 years agoavcodec/mediacodec: Factor duplicate include
Michael Niedermayer [Sun, 16 Oct 2016 14:52:10 +0000 (16:52 +0200)]
avcodec/mediacodec: Factor duplicate include

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agodoc/examples/demuxing_decoding: Drop AVFrame->pts use
Michael Niedermayer [Tue, 18 Oct 2016 02:23:33 +0000 (04:23 +0200)]
doc/examples/demuxing_decoding: Drop AVFrame->pts use

This code is not correct for git master

Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolavf/avidec: Be more verbose when ignoring very large tag size.
Carl Eugen Hoyos [Tue, 18 Oct 2016 13:01:50 +0000 (15:01 +0200)]
lavf/avidec: Be more verbose when ignoring very large tag size.

2 years agofate: add swr-convertaudio test
Muhammad Faiz [Sun, 16 Oct 2016 22:29:34 +0000 (05:29 +0700)]
fate: add swr-convertaudio test

test for flt to s16
should pass on correct rounding to nearest

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2 years agoavformat/tests/gitignore: add fifo_muxer entry
Zhao Zhili [Sat, 15 Oct 2016 16:32:17 +0000 (00:32 +0800)]
avformat/tests/gitignore: add fifo_muxer entry

Reviewed-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years agolavf/avidec: Do not fail for very large idx1 tags.
Carl Eugen Hoyos [Mon, 17 Oct 2016 16:25:48 +0000 (18:25 +0200)]
lavf/avidec: Do not fail for very large idx1 tags.

Fixes demuxing the sample file from github pull request 197,
the size of its idx1 tag is 6171936 bytes, followed by a JUNK
tag of 9505704 bytes.

2 years agowestwood_aud: prevent division by zero
Andreas Cadhalpun [Sun, 16 Oct 2016 20:42:32 +0000 (22:42 +0200)]
westwood_aud: prevent division by zero

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agoastdec: fix division by zero
Andreas Cadhalpun [Sun, 16 Oct 2016 20:39:47 +0000 (22:39 +0200)]
astdec: fix division by zero

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agoavfilter/showcqt: add font option
Muhammad Faiz [Sun, 16 Oct 2016 22:59:57 +0000 (05:59 +0700)]
avfilter/showcqt: add font option

this is fontconfig pattern

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2 years agoavfilter/firequalizer: optimize gain/gain_entry command
Muhammad Faiz [Sun, 16 Oct 2016 23:12:18 +0000 (06:12 +0700)]
avfilter/firequalizer: optimize gain/gain_entry command

do not rebuild when gain/gain_entry command are
equal with old gain/gain_entry

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2 years agodoc: Update x264 option a53cc, forgotten in 93e04102.
Carl Eugen Hoyos [Mon, 17 Oct 2016 17:11:18 +0000 (19:11 +0200)]
doc: Update x264 option a53cc, forgotten in 93e04102.

2 years agoaiffdec: fix division by zero
Andreas Cadhalpun [Sun, 16 Oct 2016 20:29:13 +0000 (22:29 +0200)]
aiffdec: fix division by zero

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agolavc/videotoolboxenc: Enable a53cc by default.
Carl Eugen Hoyos [Mon, 17 Oct 2016 15:50:29 +0000 (17:50 +0200)]
lavc/videotoolboxenc: Enable a53cc by default.

2 years agomatroskadec: fix NULL pointer dereference
Andreas Cadhalpun [Sun, 16 Oct 2016 19:47:00 +0000 (21:47 +0200)]
matroskadec: fix NULL pointer dereference

The problem was introduced in commit 1273bc6.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2 years agolavc/videotoolboxenc: Error log formatting.
Rick Kern [Mon, 10 Oct 2016 13:23:50 +0000 (09:23 -0400)]
lavc/videotoolboxenc: Error log formatting.

Signed-off-by: Rick Kern <kernrj@gmail.com>
2 years agolavc/videotoolboxenc: Update a53cc handling
Rick Kern [Mon, 10 Oct 2016 13:21:48 +0000 (09:21 -0400)]
lavc/videotoolboxenc: Update a53cc handling

Handles insertion into existing SEI NAL unit, inserts emulation
prevention bytes.

Signed-off-by: Rick Kern <kernrj@gmail.com>
2 years agolavc/videotoolboxenc: flush/free frames on close
Rick Kern [Mon, 10 Oct 2016 13:13:39 +0000 (09:13 -0400)]
lavc/videotoolboxenc: flush/free frames on close

Prevents encode callback from running after codec is closed.
Fixes a crash when an error is returned.

Signed-off-by: Rick Kern <kernrj@gmail.com>
2 years agolavc/videotoolboxenc: implement a53cc
Aman Gupta [Thu, 8 Sep 2016 08:19:43 +0000 (17:19 +0900)]
lavc/videotoolboxenc: implement a53cc

Signed-off-by: Rick Kern <kernrj@gmail.com>
2 years agomov: move stsd finalization to an appropriate place
Hendrik Leppkes [Fri, 14 Oct 2016 11:48:22 +0000 (13:48 +0200)]
mov: move stsd finalization to an appropriate place

mov_finalize_stsd_codec parses stream information from the ALAC extradata,
so run it after the extradata processing is completed in mov_read_stsd.

Fixes playback of 96kHz ALAC streams muxed by qaac or the reference alac encoder.
Fixes trac ticket #5826

2 years agoavfilter/firequalizer: add scale option
Muhammad Faiz [Sun, 16 Oct 2016 20:17:50 +0000 (03:17 +0700)]
avfilter/firequalizer: add scale option

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2 years agoffmpeg: remove unused ist parameter in do_subtitle_out()
Clément Bœsch [Sun, 16 Oct 2016 17:20:36 +0000 (19:20 +0200)]
ffmpeg: remove unused ist parameter in do_subtitle_out()

2 years agoPartially revert "avformat/matroskadec: set aspect ratio only when DisplayWidth and...
James Almer [Sun, 16 Oct 2016 13:13:45 +0000 (10:13 -0300)]
Partially revert "avformat/matroskadec: set aspect ratio only when DisplayWidth and DisplayHeight are in pixels"

The code works just fine regardless of unit, so only make sure DisplayUnit
is not "unknown".

Found-by: Nicolas George <george@nsup.org>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavcodec/utils: print Chroma Location string in verbose log level
James Almer [Sat, 15 Oct 2016 14:20:38 +0000 (11:20 -0300)]
avcodec/utils: print Chroma Location string in verbose log level

It's container level information on some formats (Matroska, MXF, yuv4mpeg), so
it should be printed at higher log levels than debug.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/matroskaenc: write a DisplayUnit element when aspect ratio is unknown
James Almer [Sat, 15 Oct 2016 18:02:26 +0000 (15:02 -0300)]
avformat/matroskaenc: write a DisplayUnit element when aspect ratio is unknown

We don't currently support values 1 (centimeters), 2 (inches) or 3 (DAR),
only the default value 0 (pixels) which doesn't need to be written.

The fate refs are updated as unknown SAR is now signaled in the output
files with the addition of the new element.

Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agoavformat/matroskadec: set aspect ratio only when DisplayWidth and DisplayHeight are...
James Almer [Sat, 15 Oct 2016 21:01:50 +0000 (18:01 -0300)]
avformat/matroskadec: set aspect ratio only when DisplayWidth and DisplayHeight are in pixels

A missing DisplayUnit element or one with the default value of 0 means
DisplayWidth and DisplayHeight should be interpreted as pixels.

The current code setting st->sample_aspect_ratio is wrong when DisplayUnit
is anything else.

Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2 years agodoc/filters: document tukey window on firequalizer
Muhammad Faiz [Sat, 15 Oct 2016 22:54:34 +0000 (05:54 +0700)]
doc/filters: document tukey window on firequalizer

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2 years agoavfilter/firequalizer: add tukey window
Muhammad Faiz [Sat, 15 Oct 2016 22:50:47 +0000 (05:50 +0700)]
avfilter/firequalizer: add tukey window

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2 years agoavfilter/firequalizer: change WFUNC_MIN/MAX to NB_WFUNC
Muhammad Faiz [Sat, 15 Oct 2016 22:48:36 +0000 (05:48 +0700)]
avfilter/firequalizer: change WFUNC_MIN/MAX to NB_WFUNC

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2 years agoavfilter/showcqt: add csp option
Muhammad Faiz [Wed, 12 Oct 2016 23:00:24 +0000 (06:00 +0700)]
avfilter/showcqt: add csp option

from colorspace filter

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
3 years agolavf/mov: support gopro firmware udta tag
Jean Caillé [Mon, 10 Oct 2016 10:00:00 +0000 (12:00 +0200)]
lavf/mov: support gopro firmware udta tag

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavutil: Improved selftest coverage for libavutil/fifo.c
Thomas Turner [Thu, 13 Oct 2016 22:13:56 +0000 (15:13 -0700)]
avutil: Improved selftest coverage for libavutil/fifo.c

Tested functions: av_fifo_generic_peek(), av_fifo_grow()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavutil/audio_fifo: Use av_fifo_freep() and remove redundant if()
Michael Niedermayer [Fri, 14 Oct 2016 15:08:51 +0000 (17:08 +0200)]
avutil/audio_fifo: Use av_fifo_freep() and remove redundant if()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoffmpeg: Use av_fifo_freep() to avoid stale pointers
Michael Niedermayer [Fri, 14 Oct 2016 15:05:25 +0000 (17:05 +0200)]
ffmpeg: Use av_fifo_freep() to avoid stale pointers

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoffmpeg_cleanup: fix crash with unrecognized codec
James Zern [Fri, 14 Oct 2016 07:33:50 +0000 (00:33 -0700)]
ffmpeg_cleanup: fix crash with unrecognized codec

since:
3e5e5bd Merge commit '398f015f077c6a2406deffd9e37ff34b9c7bb3bc'

Signed-off-by: James Zern <jzern@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agolibopenjpegenc: fix out-of-bounds reads when filling the edges
Andreas Cadhalpun [Thu, 13 Oct 2016 20:14:46 +0000 (22:14 +0200)]
libopenjpegenc: fix out-of-bounds reads when filling the edges

The calculation of width/height should round up, not round down to
prevent setting width or height to 0.

Also image->comps[compno].w is unsigned (at least in openjpeg2), so the
calculation could silently wrap around without the explicit cast to int.

Reviewed-by: Michael Bradshaw <mjbshaw@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
3 years agolibopenjpegenc: stop reusing image data buffer for openjpeg 2
Andreas Cadhalpun [Thu, 13 Oct 2016 19:16:35 +0000 (21:16 +0200)]
libopenjpegenc: stop reusing image data buffer for openjpeg 2

openjpeg 2 sets the data pointers of the image components to NULL,
causing segfaults if the image is reused.

Reviewed-by: Michael Bradshaw <mjbshaw@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
3 years agoconfigure: Enable pie for toolchain=hardened.
Carl Eugen Hoyos [Tue, 4 Oct 2016 10:21:41 +0000 (12:21 +0200)]
configure: Enable pie for toolchain=hardened.

3 years agolavfi/sidedata: add filter for manipulating frame side data
Marton Balint [Tue, 4 Oct 2016 22:32:48 +0000 (00:32 +0200)]
lavfi/sidedata: add filter for manipulating frame side data

This is a similar filter to f_metadata, only it works on side data. Since
adding side data from a user provided arbitrary binary string is unsafe,
because current code assumes that a side data of a certain kind has the proper
size, this filter only implements selection and deletion. Also, no value
matching support is implemented yet, because there is no uniform way to specify
a side data textually.

Signed-off-by: Marton Balint <cus@passwd.hu>
3 years agoconfigure: fix detection of libopenjpeg
Andreas Cadhalpun [Tue, 11 Oct 2016 18:28:35 +0000 (20:28 +0200)]
configure: fix detection of libopenjpeg

Use check_lib2 to test the header together with the function. This is
necessary, because '-DOPJ_STATIC' changes what the included header does.

Also add '-DOPJ_STATIC' to CPPFLAGS, so that it isn't necessary to
hardcode this in libavcodec/libopenjpeg{dec,enc}.c.

Finally, check for non-static openjpeg 2.1, too.

Reviewed-by: Michael Bradshaw <mjbshaw@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
3 years agofate: add test for firequalizer filter
Muhammad Faiz [Thu, 13 Oct 2016 01:43:50 +0000 (08:43 +0700)]
fate: add test for firequalizer filter

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>