summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* lavfi/hdcd: fix styleClément Bœsch2016-07-281-5/+7
|
* lavfi/hdcd: mark pe_str as static and constClément Bœsch2016-07-281-1/+1
|
* af_hdcd: Report PE as being intermittent or permanentBurt P2016-07-281-4/+26
| | | | | | | | The Peak Extend feature could be enabled permanently or only when needed. This is now reported. Signed-off-by: Burt P <pburt0@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/matroskaenc: Write duration early during mkv_write_header (Rev #3)softworkz2016-07-281-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rev #2: Fixes doubled header writing, checked FATE running without errors Rev #3: Fixed coding style This commit addresses the following scenario: we are using ffmpeg to transcode or remux mkv (or something else) to mkv. The result is being streamed on-the-fly to an HTML5 client (streaming starts while ffmpeg is still running). The problem here is that the client is unable to detect the duration because the duration is only written to the mkv at the end of the transcoding/remoxing process. In matroskaenc.c, the duration is only written during mkv_write_trailer but not during mkv_write_header. The approach: FFMPEG is currently putting quite some effort to estimate the durations of source streams, but in many cases the source stream durations are still left at 0 and these durations are nowhere mapped to or used for output streams. As much as I would have liked to deduct or estimate output durations based on input stream durations - I realized that this is a hard task (as Nicolas already mentioned in a previous conversation). It would involve changes to the duration calculation/estimation/deduction for input streams and propagating these durations to output streams or the output context in a correct way. So I looked for a simple and small solution with better chances to get accepted. In webmdashenc.c I found that a duration is written during write_header and this duration is taken from the streams' metadata, so I decided for a similar approach. And here's what it does: At first it is checking the duration of the AVFormatContext. In typical cases this value is not set, but: It is set in cases where the user has specified a recording_time or an end_time via the -t or -to parameters. Then it is looking for a DURATION metadata field in the metadata of the output context (AVFormatContext::metadata). This would only exist in case the user has explicitly specified a metadata DURATION value from the command line. Then it is iterating all streams looking for a "DURATION" metadata (this works unless the option "-map_metadata -1" has been specified) and determines the maximum value. The precendence is as follows: 1. Use duration of AVFormatContext - 2. Use explicitly specified metadata duration value - 3. Use maximum (mapped) metadata duration over all streams. To test this: 1. With explicit recording time: ffmpeg -i file:"src.mkv" -loglevel debug -t 01:38:36.000 -y "dest.mkv" 2. Take duration from metadata specified via command line parameters: ffmpeg -i file:"src.mkv" -loglevel debug -map_metadata -1 -metadata Duration="01:14:33.00" -y "dest.mkv" 3. Take duration from mapped input metadata: ffmpeg -i file:"src.mkv" -loglevel debug -y "dest.mkv" Regression risk: Very low IMO because it only affects the header while ffmpeg is still running. When ffmpeg completes the process, the duration is rewritten to the header with the usual value (same like without this commit). Signed-off-by: SoftWorkz <softworkz@hotmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/hls: Fix missing streams in some cases with MPEG TSAnssi Hannula2016-07-281-5/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | HLS demuxer calls the subdemuxer avformat_find_stream_info() while overriding the subdemuxer AVFMTCTX_NOHEADER flag by clearing it. However, this prevents some streams in some MPEG TS streams from being detected properly. Simply removing the clearing of the flag would cause the inner avformat_find_stream_info() call to take longer in some cases, without a way to control it. To fix the issue, do not clear the flag but propagate it to HLS demuxer. To avoid the above-mentioned mandatory delay, the call to avformat_find_stream_info() is dropped except in the HLS ID3 timestamped case. The HLS demuxer user should be calling avformat_find_stream_info() on the HLS demuxer if it wants to find the stream info. The main streams are now created dynamically after read_header time if the subdemuxer uses AVFMTCTX_NOHEADER (mpegts). Subdemuxer avformat_find_stream_info() is still called for the HLS ID3 timestamped case as the HLS demuxer needs to know the packet durations to properly interleave ID3 timestamped streams with MPEG TS streams on sub-segment level. Fixes ticket #4930.
* avformat/hls: Move stream propagation to a separate functionAnssi Hannula2016-07-281-65/+69
| | | | | | | Creation of main demuxer streams from subdemuxer streams is moved to update_streams_from_subdemuxer() which can be called repeatedly. There should be no functional changes.
* avformat/hls: Use an array instead of stream offset for stream mappingAnssi Hannula2016-07-281-21/+38
| | | | | This will be useful when the amount of streams per subdemuxer is not known at hls_read_header time in a following commit.
* avformat/hls: Sync starting segment across variants on live streamsAnssi Hannula2016-07-281-1/+24
| | | | | This will avoid a large time difference between variants in the most common case.
* avformat/hls: Fix regression with ranged media segmentsAnssi Hannula2016-07-281-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 81306fd4bdf ("hls: eliminate ffurl_* usage", merged in d0fc5de3a6) changed the hls demuxer to use AVIOContext instead of URLContext for its HTTP requests. HLS demuxer uses the "offset" option of the http demuxer, requesting the initial file offset for the I/O (http URLProtocol uses the "Range:" HTTP header to try to accommodate that). However, the code in libavformat/aviobuf.c seems to be doing its own accounting for the current file offset (AVIOContext.pos), with the assumption that the initial offset is always zero. HLS demuxer does an explicit seek after open_url to account for cases where the "offset" was not effective (due to the URL being a local file or the HTTP server not obeying it), which should be a no-op in case the file offset is already at that position. However, since aviobuf.c code thinks the starting offset is 0, this doesn't work properly. This breaks retrieval of ranged media segments. To fix the regression, just drop the seek call from the HLS demuxer when the HTTP(S) protocol is used.
* avformat/utils: Fix find_stream_info not considering the extradata it foundAnssi Hannula2016-07-281-1/+1
| | | | | | | | | | | | | | | | | | | Commit 9200514ad8717c6 ("lavf: replace AVStream.codec with AVStream.codecpar") merged in commit 6f69f7a8bf6a0d01 changed avformat_find_stream_info() to put the extradata it got from st->parser->parser->split() to st->internal->avctx instead of st->codec (extradata in st->internal->avctx will be later copied to st->codecpar). However, in the same function, the "is stream ready?" check was changed to check for extradata in st->codecpar instead of st->codec, even though st->codecpar is not yet updated at that point. Extradata retrieved from split() is therefore not considered anymore, and avformat_find_stream_info() will therefore needlessly continue probing in some cases. Fix that by checking for the extradata at st->internal->avctx where it is actually put.
* af_hdcd: Add counter for cdt expirationsBurt P2016-07-271-2/+13
| | | | | | | | Adds a counter for when the "code detect timer" expired without finding a valid packet. Signed-off-by: Burt P <pburt0@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* af_hdcd: more comments in state structBurt P2016-07-271-13/+21
| | | | | | | Add some comments describing the fields in hdcd_state_t. Signed-off-by: Burt P <pburt0@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* af_hdcd: Improve HDCD detectionBurt P2016-07-271-2/+6
| | | | | | | | HDCD is now only considered detected if a valid packet is active in both channels simultaneously. Signed-off-by: Burt P <pburt0@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fate: Add HDCD filter tests for false positive and error detectionBurt P2016-07-272-1/+14
| | | | | Signed-off-by: Burt P <pburt0@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/h264_slice: Make setup_finished check cover more casesMichael Niedermayer2016-07-271-4/+7
|
* avformat/flvdec: parse keyframe before a\v stream was created ↵Xinzheng Zhang2016-07-271-2/+6
| | | | | | add_keyframes_index() when stream created or keyframe parsed Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/flvdec: splitting add_keyframes_index() out from ↵Xinzheng Zhang2016-07-271-16/+60
| | | | | | parse_keyframes_index() Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit 'debca90863e4ee53447efd02483c500f89766384'Clément Bœsch2016-07-273-23/+12
|\ | | | | | | | | | | | | * commit 'debca90863e4ee53447efd02483c500f89766384': h264: store {curr,max}_pic_num in the per-slice context Merged-by: Clément Bœsch <u@pkh.me>
| * h264: store {curr,max}_pic_num in the per-slice contextAnton Khirnov2016-06-213-23/+12
| | | | | | | | | | | | | | While the value of those variables will be constant for the whole frame, they are only used in two functions called from slice header decoding. Moving them to the per-slice context allows us to make the H264Context passed to slice_header_parse() constant.
* | Merge commit 'f966498e433fead2f5e6b5b66fad2ac062146d22'Clément Bœsch2016-07-272-28/+23
|\ \ | |/ | | | | | | | | | | * commit 'f966498e433fead2f5e6b5b66fad2ac062146d22': h264: decode the poc values from the slice header into the per-slice context Merged-by: Clément Bœsch <u@pkh.me>
| * h264: decode the poc values from the slice header into the per-slice contextAnton Khirnov2016-06-212-25/+21
| | | | | | | | | | Copy them into the decoder-global context in field_start(). This avoids modifying the decoder-global context during bitstream parsing.
* | lavc/h264_slice: adjust a few line breaks to reduce diff with LibavClément Bœsch2016-07-271-4/+1
| |
* | Merge commit '54dd9b1cdd9e54f1ee39ae25af0324f8aba2831b'Clément Bœsch2016-07-271-95/+90
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit '54dd9b1cdd9e54f1ee39ae25af0324f8aba2831b': h264: set mb_aff_frame in frame_start() h264: move the block starting a new field out of slice_header_parse() Both commits are merged at the same time in order to prevent a regression with Ticket #4440 (see 38660128). Merged-by: Clément Bœsch <u@pkh.me>
| * h264: set mb_aff_frame in frame_start()Anton Khirnov2016-06-211-5/+3
| | | | | | | | | | Avoid unnecessary modification of the decoder-global state in per-slice code.
| * h264: move the block starting a new field out of slice_header_parse()Anton Khirnov2016-06-211-35/+33
| | | | | | | | | | | | | | | | | | There is no bitstream parsing in that block and messing with decoder-global state is not something that belongs into header parsing. Nothing else in this function depends on the value of current_slice, except for two validity checks. Those checks are also moved out of slice_header_parse().
* | lavc/ffjni: replace ff_jni_{attach,detach} with ff_jni_get_envMatthieu Bouron2016-07-275-212/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If a JNI environment is not already attached to the thread where the MediaCodec calls are made the current implementation will attach / detach an environment for each MediaCodec call wasting some CPU time. ff_jni_get_env replaces ff_jni_{attach,detach} by permanently attaching an environment (if it is not already the case) to the current thread. The environment will be automatically detached at the thread destruction using a pthread_key callback. Saves around 5% of CPU time (out of 20%) while decoding a stream with MediaCodec.
* | libopenh264: Support building with the 1.6 releaseMartin Storsjö2016-07-272-2/+26
| | | | | | | | | | | | | | | | | | This fixes trac issue #5417. This is cherry-picked from libav commit d825b1a5306576dcd0553b7d0d24a3a46ad92864. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Add an OpenH264 decoder wrapperMartin Storsjö2016-07-2710-45/+366
| | | | | | | | | | | | | | | | This is cherrypicked from libav, from commits 82b7525173f20702a8cbc26ebedbf4b69b8fecec and d0b1e6049b06eeeeca146ece4d2f199c5dba1565. Signed-off-by: Martin Storsjö <martin@martin.st>
* | checkasm/vp9dsp: use declare_func_emms in check_loopfilterJames Almer2016-07-261-1/+1
| | | | | | | | | | | | Fixes checkasm failures on mmxext functions Signed-off-by: James Almer <jamrial@gmail.com>
* | ffprobe.xsd: add missing timecode attribute to frameSideDataTypedericed2016-07-271-0/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avdev/jack: remove duplicated dispatch macrosJosh de Kock2016-07-261-10/+0
| | | | | | | | The macros were moved to compat/dispatch_semaphore/semaphore.h after a libav merge, and were never removed from jack.c
* | vp9: add mxext versions of the single-block (w=8,npx=8) h/v loopfilters.Ronald S. Bultje2016-07-262-39/+63
| | | | | | | | | | Each takes about 0.1% of runtime in my profiles, and they didn't have any SIMD yet so far (we only had simd for npx=16 double-block versions).
* | vp9: add mxext versions of the single-block (w=4,npx=8) h/v loopfilters.Ronald S. Bultje2016-07-262-49/+103
| | | | | | | | | | Each takes about 0.5% of runtime in my profiles, and they didn't have any SIMD yet so far (we only had simd for npx=16 double-block versions).
* | vp9: add 32x32 idct AVX2 implementation.Ronald S. Bultje2016-07-262-6/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | About 1.8x speedup compared to AVX version for full IDCT. Other sub-IDCT scenarios also see speedups. Full --bench output for idct_32x32_add_{bpp}_${subidct}_${opt} (50k cycles): nop: 16.5 vp9_inv_dct_dct_32x32_add_8_1_c: 2284.4 vp9_inv_dct_dct_32x32_add_8_1_sse2: 145.0 vp9_inv_dct_dct_32x32_add_8_1_ssse3: 137.4 vp9_inv_dct_dct_32x32_add_8_1_avx: 137.1 vp9_inv_dct_dct_32x32_add_8_1_avx2: 73.2 vp9_inv_dct_dct_32x32_add_8_2_c: 14680.8 vp9_inv_dct_dct_32x32_add_8_2_sse2: 2617.2 vp9_inv_dct_dct_32x32_add_8_2_ssse3: 982.9 vp9_inv_dct_dct_32x32_add_8_2_avx: 958.5 vp9_inv_dct_dct_32x32_add_8_2_avx2: 704.2 vp9_inv_dct_dct_32x32_add_8_4_c: 14443.1 vp9_inv_dct_dct_32x32_add_8_4_sse2: 2717.1 vp9_inv_dct_dct_32x32_add_8_4_ssse3: 965.7 vp9_inv_dct_dct_32x32_add_8_4_avx: 1000.7 vp9_inv_dct_dct_32x32_add_8_4_avx2: 717.1 vp9_inv_dct_dct_32x32_add_8_8_c: 14436.4 vp9_inv_dct_dct_32x32_add_8_8_sse2: 2671.8 vp9_inv_dct_dct_32x32_add_8_8_ssse3: 1038.5 vp9_inv_dct_dct_32x32_add_8_8_avx: 983.0 vp9_inv_dct_dct_32x32_add_8_8_avx2: 729.4 vp9_inv_dct_dct_32x32_add_8_16_c: 14614.7 vp9_inv_dct_dct_32x32_add_8_16_sse2: 2701.7 vp9_inv_dct_dct_32x32_add_8_16_ssse3: 1334.4 vp9_inv_dct_dct_32x32_add_8_16_avx: 1276.7 vp9_inv_dct_dct_32x32_add_8_16_avx2: 719.5 vp9_inv_dct_dct_32x32_add_8_32_c: 14363.6 vp9_inv_dct_dct_32x32_add_8_32_sse2: 2575.6 vp9_inv_dct_dct_32x32_add_8_32_ssse3: 2633.9 vp9_inv_dct_dct_32x32_add_8_32_avx: 2539.6 vp9_inv_dct_dct_32x32_add_8_32_avx2: 1395.0
* | lavfi/curves: fix meaningless const int returned valueClément Bœsch2016-07-261-2/+2
| | | | | | | | Spotted-by: James Almer <jamrial@gmail.com>
* | librtmp: Avoid an infiniloop setting connection argumentsLuca Barbato2016-07-261-0/+2
| | | | | | | | | | | | The exit condition was missing. Signed-off-by: Timothy Gu <timothygu99@gmail.com>
* | avformt/matroskaenc: undo an accidental revert by commit 5d48e4eaJames Almer2016-07-261-9/+12
| | | | | | | | | | | | | | Commit 5d48e4eafa6c4559683892b8638d10508125f3cf accidentally reverted changes made to matroskaenc by commit 989a614b707dcff8abdffe28dc24ec64a83b2837. Signed-off-by: James Almer <jamrial@gmail.com>
* | ffprobe: add missing PROGRAM_STREAM_TAGS caseDmitry Vagin2016-07-261-0/+1
| | | | | | | | | | | | ffprobe did not show tags with only '-show_entries programs' Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avutil/frame: access avframe fields directly in get_frame_defaults()James Almer2016-07-251-4/+4
| | | | | | | | | | | | | | The accessors are needed only from outside libavutil. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* | lavd/libdc1394: distinguish between enumeration errors and no cameras foundJosh de Kock2016-07-251-3/+8
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | libavformat/rtpdec_asf: zero initialize the AVIOContext structKacper Michajłow2016-07-251-1/+1
| | | | | | | | | | | | | | This fixes crash in avformat_open_input() when accessing protocol_whitelist field. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/dnxhddata: move avpriv_dnxhd_parse_header_prefix to a headerJames Almer2016-07-255-7/+17
| | | | | | | | | | | | | | | | | | It's a small and simple function that can be inlined. This removes one private symbol and should reduce object dependencies with the next major bump Signed-off-by: James Almer <jamrial@gmail.com>
* | Revert "lavc: always build dnxhddata"James Almer2016-07-251-3/+2
| | | | | | | | | | | | This reverts commit 2adbea4e216ce38a8bf6c72de16267c9162c174d. A better solution will follow in the next commit.
* | lavc/Makefile: Fix standalone compilation of the svq3 decoder.Carl Eugen Hoyos2016-07-241-1/+2
| | | | | | | | Regression since 0bf5fd2e
* | lavc: always build dnxhddataMatthieu Bouron2016-07-241-2/+3
| | | | | | | | | | | | | | | | lavc/movenc rely on avpriv_dnxhd_parse_header_prefix declared by dnxhddata.h since e47981dab7fb7c9499b959cb0125b7281301969a. Fixes a missing symbol error in lavc/movenc if the dnxhd encoder is not enabled.
* | lavc/h264_ps: Be more verbose when truncating likely oversized PPS.Carl Eugen Hoyos2016-07-241-1/+3
| |
* | Revert "Merge commit '3c53627ac17fc6bdea5029be57da1e03b32d265d'"Ivan Uskov2016-07-241-28/+6
| | | | | | | | | | | | | | | | | | This reverts commit d30cf57a7b2097b565db02ecfffbdc9c16423d0e, reversing changes made to acc155ac55baa95d1c16c0364b02244bc04d83a8. The commit d30cf57a7b2097b565db02ecfffbdc9c16423d0e provided irrelevant code complexity and decoding slowdown. But the main disadvantage of this commit is a decoder crash. So it should be reverted. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavfi/selectivecolor: add 16-bit supportClément Bœsch2016-07-243-111/+162
| |
* | lavfi/selectivecolor: fix picking black as neutral when alpha is presentClément Bœsch2016-07-241-1/+1
| |
* | tests/fate: add dnxhr encoding testsMark Reid2016-07-2419-1/+131
| | | | | | | | | | | | added sws_flags flags and tested against x86_32 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
OpenPOWER on IntegriCloud