[FFmpeg-cvslog] avformat/utils: avoid using marked decoders for probing
ffmpeg | branch: master | Timo Rothenpieler | Thu Sep 22 12:10:15 2016 +0200| [9777ba33f52c54cc982f977ce28e5d4b55927b72] | committer: Timo Rothenpieler avformat/utils: avoid using marked decoders for probing Reviewed-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9777ba33f52c54cc982f977ce28e5d4b55927b72 --- libavformat/utils.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index 05d2315..93ea6ff 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -188,6 +188,8 @@ FF_ENABLE_DEPRECATION_WARNINGS static const AVCodec *find_probe_decoder(AVFormatContext *s, const AVStream *st, enum AVCodecID codec_id) { +const AVCodec *codec; + #if CONFIG_H264_DECODER /* Other parts of the code assume this decoder to be used for h264, * so force it if possible. */ @@ -195,7 +197,22 @@ static const AVCodec *find_probe_decoder(AVFormatContext *s, const AVStream *st, return avcodec_find_decoder_by_name("h264"); #endif -return find_decoder(s, st, codec_id); +codec = find_decoder(s, st, codec_id); +if (!codec) +return NULL; + +if (codec->capabilities & AV_CODEC_CAP_AVOID_PROBING) { +const AVCodec *probe_codec = NULL; +while (probe_codec = av_codec_next(probe_codec)) { +if (probe_codec->id == codec_id && +av_codec_is_decoder(probe_codec) && +!(probe_codec->capabilities & (AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_EXPERIMENTAL))) { +return probe_codec; +} +} +} + +return codec; } int av_format_get_probe_score(const AVFormatContext *s) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec: add new AVOID_PROBING capability
ffmpeg | branch: master | Timo Rothenpieler | Thu Sep 22 12:09:26 2016 +0200| [30d3e36a46028d6d4aec5070d1fff89f8af5f9d9] | committer: Timo Rothenpieler avcodec: add new AVOID_PROBING capability Reviewed-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=30d3e36a46028d6d4aec5070d1fff89f8af5f9d9 --- doc/APIchanges | 3 +++ libavcodec/avcodec.h | 10 ++ libavcodec/version.h | 4 ++-- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index 158a0b2..5d577e4 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,6 +15,9 @@ libavutil: 2015-08-28 API changes, most recent first: +2016-09-xx - xxx - lavc 57.58.100 - avcodec.h + Add AV_CODEC_CAP_AVOID_PROBING codec capability flag. + 2016-09-xx - xxx - lavf 57.49.100 - avformat.h Add avformat_transfer_internal_stream_timing_info helper to help with stream copy. diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index db1061d..b174116 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -1036,6 +1036,16 @@ typedef struct RcOverride{ */ #define AV_CODEC_CAP_VARIABLE_FRAME_SIZE (1 << 16) /** + * Decoder is not a preferred choice for probing. + * This indicates that the decoder is not a good choice for probing. + * It could for example be an expensive to spin up hardware decoder, + * or it could simply not provide a lot of useful information about + * the stream. + * A decoder marked with this flag should only be used as last resort + * choice for probing. + */ +#define AV_CODEC_CAP_AVOID_PROBING (1 << 17) +/** * Codec is intra only. */ #define AV_CODEC_CAP_INTRA_ONLY 0x4000 diff --git a/libavcodec/version.h b/libavcodec/version.h index 9acf081..9e44eca 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -28,8 +28,8 @@ #include "libavutil/version.h" #define LIBAVCODEC_VERSION_MAJOR 57 -#define LIBAVCODEC_VERSION_MINOR 57 -#define LIBAVCODEC_VERSION_MICRO 101 +#define LIBAVCODEC_VERSION_MINOR 58 +#define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/cuvid: mark as avoid for probing
ffmpeg | branch: master | Timo Rothenpieler | Thu Sep 22 12:10:31 2016 +0200| [dcea61897647f2690dd76b3000841b5b0c032ab1] | committer: Timo Rothenpieler avcodec/cuvid: mark as avoid for probing > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dcea61897647f2690dd76b3000841b5b0c032ab1 --- libavcodec/cuvid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/cuvid.c b/libavcodec/cuvid.c index ddf8b72..bd66f9e 100644 --- a/libavcodec/cuvid.c +++ b/libavcodec/cuvid.c @@ -913,7 +913,7 @@ static const AVOption options[] = { .send_packet= cuvid_decode_packet, \ .receive_frame = cuvid_output_frame, \ .flush = cuvid_flush, \ -.capabilities = AV_CODEC_CAP_DELAY, \ +.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING, \ .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_CUDA, \ AV_PIX_FMT_NV12, \ AV_PIX_FMT_NONE }, \ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] compat/cuda: convert to unix line endings
ffmpeg | branch: master | Timo Rothenpieler | Fri Sep 23 11:43:00 2016 +0200| [7904859fd82178ef12e158bd14a22714cdffdf43] | committer: Timo Rothenpieler compat/cuda: convert to unix line endings > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7904859fd82178ef12e158bd14a22714cdffdf43 --- compat/cuda/cuviddec.h | 1654 compat/cuda/nvcuvid.h | 642 +-- 2 files changed, 1148 insertions(+), 1148 deletions(-) diff --git a/compat/cuda/cuviddec.h b/compat/cuda/cuviddec.h index a66826f..f9257ea 100644 --- a/compat/cuda/cuviddec.h +++ b/compat/cuda/cuviddec.h @@ -1,827 +1,827 @@ -/* - * This copyright notice applies to this header file only: - * - * Copyright (c) 2010-2016 NVIDIA Corporation - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, - * copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the software, and to permit persons to whom the - * software is furnished to do so, subject to the following - * conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file cuviddec.h - * NvCuvid API provides Video Decoding interface to NVIDIA GPU devices. - * \date 2015-2016 - * This file contains constants, structure definitions and function prototypes used for decoding. - */ - -#if !defined(__CUDA_VIDEO_H__) -#define __CUDA_VIDEO_H__ - -#ifndef __cuda_cuda_h__ -#include -#endif // __cuda_cuda_h__ - -#if defined(__x86_64) || defined(AMD64) || defined(_M_AMD64) -#if (CUDA_VERSION >= 3020) && (!defined(CUDA_FORCE_API_VERSION) || (CUDA_FORCE_API_VERSION >= 3020)) -#define __CUVID_DEVPTR64 -#endif -#endif - -#if defined(__cplusplus) -extern "C" { -#endif /* __cplusplus */ - -typedef void *CUvideodecoder; -typedef struct _CUcontextlock_st *CUvideoctxlock; - -/** - * \addtogroup VIDEO_DECODER Video Decoder - * @{ - */ - -/*! - * \enum cudaVideoCodec - * Video Codec Enums - */ -typedef enum cudaVideoCodec_enum { -cudaVideoCodec_MPEG1=0, /**< MPEG1 */ -cudaVideoCodec_MPEG2, /**< MPEG2 */ -cudaVideoCodec_MPEG4, /**< MPEG4 */ -cudaVideoCodec_VC1, /**< VC1 */ -cudaVideoCodec_H264,/**< H264 */ -cudaVideoCodec_JPEG,/**< JPEG */ -cudaVideoCodec_H264_SVC,/**< H264-SVC */ -cudaVideoCodec_H264_MVC,/**< H264-MVC */ -cudaVideoCodec_HEVC,/**< HEVC */ -cudaVideoCodec_VP8, /**< VP8 */ -cudaVideoCodec_VP9, /**< VP9 */ -cudaVideoCodec_NumCodecs, /**< Max COdecs */ -// Uncompressed YUV -cudaVideoCodec_YUV420 = (('I'<<24)|('Y'<<16)|('U'<<8)|('V')), /**< Y,U,V (4:2:0) */ -cudaVideoCodec_YV12 = (('Y'<<24)|('V'<<16)|('1'<<8)|('2')), /**< Y,V,U (4:2:0) */ -cudaVideoCodec_NV12 = (('N'<<24)|('V'<<16)|('1'<<8)|('2')), /**< Y,UV (4:2:0) */ -cudaVideoCodec_YUYV = (('Y'<<24)|('U'<<16)|('Y'<<8)|('V')), /**< YUYV/YUY2 (4:2:2) */ -cudaVideoCodec_UYVY = (('U'<<24)|('Y'<<16)|('V'<<8)|('Y'))/**< UYVY (4:2:2) */ -} cudaVideoCodec; - -/*! - * \enum cudaVideoSurfaceFormat - * Video Surface Formats Enums - */ -typedef enum cudaVideoSurfaceFormat_enum { -cudaVideoSurfaceFormat_NV12=0 /**< NV12 (currently the only supported output format) */ -} cudaVideoSurfaceFormat; - -/*! - * \enum cudaVideoDeinterlaceMode - * Deinterlacing Modes Enums - */ -typedef enum cudaVideoDeinterlaceMode_enum { -cudaVideoDeinterlaceMode_Weave=0, /**< Weave both fields (no deinterlacing) */ -cudaVideoDeinterlaceMode_Bob, /**< Drop one field */ -cudaVideoDeinterlaceMode_Adaptive /**< Adaptive deinterlacing */ -} cudaVideoDeinterlaceMode; - -/*! - * \enum cudaVideoChromaFormat - * Chroma Formats Enums - */ -typedef enum cudaVideoChromaFormat_enum { -cudaVideoChromaFormat_Monochrome=0, /**< MonoChrome */ -cudaVideoChromaFormat_420, /**< 4:2:0 */ -cudaVideoChromaFormat_422, /**< 4:2:2 */ -cudaVideoChromaFormat_444/**< 4:4:4 */ -} cudaVideoChroma
[FFmpeg-cvslog] tests/fate: Add fate-ffmpeg-bsf-remove-* tests
ffmpeg | branch: master | Michael Niedermayer | Fri Sep 23 12:57:33 2016 +0200| [a5fafabc8411f2394652b99aed15de57225f4682] | committer: Michael Niedermayer tests/fate: Add fate-ffmpeg-bsf-remove-* tests Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a5fafabc8411f2394652b99aed15de57225f4682 --- tests/fate/ffmpeg.mak | 14 ++ tests/ref/fate/ffmpeg-bsf-remove-a | 33 + tests/ref/fate/ffmpeg-bsf-remove-e | 32 tests/ref/fate/ffmpeg-bsf-remove-k | 33 + tests/ref/fate/ffmpeg-bsf-remove-r | 33 + 5 files changed, 145 insertions(+) diff --git a/tests/fate/ffmpeg.mak b/tests/fate/ffmpeg.mak index 3782f82..e913ca8 100644 --- a/tests/fate/ffmpeg.mak +++ b/tests/fate/ffmpeg.mak @@ -89,5 +89,19 @@ fate-adtstoasc_ticket3715: $(TARGET_SAMPLES)/aac/foo.aac fate-adtstoasc_ticket3715: CMD = transcode "aac" $(TARGET_SAMPLES)/aac/foo.aac\ mov "-c copy -bsf:a aac_adtstoasc" "-codec copy" +FATE_SAMPLES_FFMPEG-$(call ALLYES, MPEGPS_DEMUXER AVI_MUXER REMOVE_EXTRADATA_BSF) += fate-ffmpeg-bsf-remove-k fate-ffmpeg-bsf-remove-a fate-ffmpeg-bsf-remove-r fate-ffmpeg-bsf-remove-e +fate-ffmpeg-bsf-remove-k: $(TARGET_SAMPLES)/mpeg2/matrixbench_mpeg2.lq1.mpg +fate-ffmpeg-bsf-remove-k: CMD = transcode "mpeg" $(TARGET_SAMPLES)/mpeg2/matrixbench_mpeg2.lq1.mpg\ + avi "-vbsf remove_extra=k" "-codec copy" +fate-ffmpeg-bsf-remove-a: $(TARGET_SAMPLES)/mpeg2/matrixbench_mpeg2.lq1.mpg +fate-ffmpeg-bsf-remove-a: CMD = transcode "mpeg" $(TARGET_SAMPLES)/mpeg2/matrixbench_mpeg2.lq1.mpg\ + avi "-vbsf remove_extra=a" "-codec copy" +fate-ffmpeg-bsf-remove-r: $(TARGET_SAMPLES)/mpeg2/matrixbench_mpeg2.lq1.mpg +fate-ffmpeg-bsf-remove-r: CMD = transcode "mpeg" $(TARGET_SAMPLES)/mpeg2/matrixbench_mpeg2.lq1.mpg\ + avi "-vbsf remove_extra=r" "-codec copy" +fate-ffmpeg-bsf-remove-e: $(TARGET_SAMPLES)/mpeg2/matrixbench_mpeg2.lq1.mpg +fate-ffmpeg-bsf-remove-e: CMD = transcode "mpeg" $(TARGET_SAMPLES)/mpeg2/matrixbench_mpeg2.lq1.mpg\ + avi "-vbsf remove_extra=e" "-codec copy" + FATE_SAMPLES_FFMPEG-yes += $(FATE_STREAMCOPY-yes) diff --git a/tests/ref/fate/ffmpeg-bsf-remove-a b/tests/ref/fate/ffmpeg-bsf-remove-a new file mode 100644 index 000..8d362d3 --- /dev/null +++ b/tests/ref/fate/ffmpeg-bsf-remove-a @@ -0,0 +1,33 @@ +6196f1d6b59d16c045de627221d8685f *tests/data/fate/ffmpeg-bsf-remove-a.avi +130072 tests/data/fate/ffmpeg-bsf-remove-a.avi +#extradata 0: 30, 0x4a4d065a +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: mpeg4 +#dimensions 0: 716x236 +#sar 0: 1/1 +0, 0, 0,1,20194, 0x174f64ac +0, 1, 1,1,17878, 0xc081a405, F=0x0 +0, 2, 2,1,22723, 0x60935d28, F=0x0 +0, 3, 3,1,18655, 0xe5c33ada, F=0x0 +0, 4, 4,1,12928, 0x84d6a9d7, F=0x0 +0, 5, 5,1, 4788, 0xbf9e1939, F=0x0 +0, 6, 6,1, 3160, 0x867423c7, F=0x0 +0, 7, 7,1, 2049, 0x523ffd85, F=0x0 +0, 8, 8,1, 1440, 0x363ff725, F=0x0 +0, 9, 9,1, 1300, 0x0d3c9c74, F=0x0 +0, 10, 10,1, 1081, 0xbfb0365c, F=0x0 +0, 11, 11,1, 1011, 0x9d310f90, F=0x0 +0, 12, 12,1, 2543, 0x64500a0f +0, 13, 13,1, 881, 0x7492d262, F=0x0 +0, 14, 14,1, 896, 0x1ff1d335, F=0x0 +0, 15, 15,1, 973, 0x72c1fc04, F=0x0 +0, 16, 16,1, 1075, 0xa5881d73, F=0x0 +0, 17, 17,1, 933, 0xf0aae974, F=0x0 +0, 18, 18,1, 1079, 0xbdce1b40, F=0x0 +0, 19, 19,1, 964, 0x323fe4ab, F=0x0 +0, 20, 20,1, 1015, 0x78a4fe96, F=0x0 +0, 21, 21,1, 990, 0x9cd4ff25, F=0x0 +0, 22, 22,1, 1093, 0x98712e2e, F=0x0 +0, 23, 23,1, 1200, 0x37957156, F=0x0 +0, 24, 24,1, 2881, 0xbb1feefb diff --git a/tests/ref/fate/ffmpeg-bsf-remove-e b/tests/ref/fate/ffmpeg-bsf-remove-e new file mode 100644 index 000..4cf04f7 --- /dev/null +++ b/tests/ref/fate/ffmpeg-bsf-remove-e @@ -0,0 +1,32 @@ +d6c688432b88ca62ea8abb885272af52 *tests/data/fate/ffmpeg-bsf-remove-e.avi +129982 tests/data/fate/ffmpeg-bsf-remove-e.avi +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: mpeg4 +#dimensions 0: 716x236 +#sar 0: 1/1 +0, 0, -9223372036854775808,1,20164, 0x66bf5e52 +0, 1, -9223372036854775808,1,17878, 0xc081a405, F=0x0 +0,
[FFmpeg-cvslog] x86/h264_weight: use appropriate register size for weight parameters
ffmpeg | branch: master | Hendrik Leppkes | Fri Sep 23 09:52:48 2016 +0200| [5ae0ad001a653e71b14c92a0d7861de87901752c] | committer: Hendrik Leppkes x86/h264_weight: use appropriate register size for weight parameters Fixes trac 5579 Reviewed-by: Ronald S. Bultje Acked-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5ae0ad001a653e71b14c92a0d7861de87901752c --- libavcodec/x86/h264_weight.asm | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavcodec/x86/h264_weight.asm b/libavcodec/x86/h264_weight.asm index 6c57d57..0975d74 100644 --- a/libavcodec/x86/h264_weight.asm +++ b/libavcodec/x86/h264_weight.asm @@ -134,16 +134,16 @@ WEIGHT_FUNC_HALF_MM 8, 8 mov off_regd, r7m add off_regd, 1 or off_regd, 1 -addr4, 1 -cmpr6d, 128 +add r4d, 1 +cmp r6d, 128 je .nonnormal -cmpr5, 128 +cmp r5d, 128 jne .normal .nonnormal: -sarr5, 1 -sarr6, 1 +sar r5d, 1 +sar r6d, 1 sar off_regd, 1 -subr4, 1 +sub r4d, 1 .normal: %if cpuflag(ssse3) movd m4, r5d ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/remove_extradata_bsf: Fix AVoption parameter max value
ffmpeg | branch: master | James Almer | Fri Sep 23 16:13:48 2016 +0200| [d41c9b1c275f4d1ffe64fe61580d75749acf7fe6] | committer: Michael Niedermayer avcodec/remove_extradata_bsf: Fix AVoption parameter max value > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d41c9b1c275f4d1ffe64fe61580d75749acf7fe6 --- libavcodec/remove_extradata_bsf.c | 2 +- tests/ref/fate/ffmpeg-bsf-remove-k | 55 +++--- 2 files changed, 28 insertions(+), 29 deletions(-) diff --git a/libavcodec/remove_extradata_bsf.c b/libavcodec/remove_extradata_bsf.c index dd4cf17..a54bbdb 100644 --- a/libavcodec/remove_extradata_bsf.c +++ b/libavcodec/remove_extradata_bsf.c @@ -95,7 +95,7 @@ static void remove_extradata_close(AVBSFContext *ctx) #define OFFSET(x) offsetof(RemoveExtradataContext, x) static const AVOption options[] = { -{ "freq", NULL, OFFSET(freq), AV_OPT_TYPE_INT, { .i64 = REMOVE_FREQ_KEYFRAME }, REMOVE_FREQ_KEYFRAME, REMOVE_FREQ_ALL, 0, "freq" }, +{ "freq", NULL, OFFSET(freq), AV_OPT_TYPE_INT, { .i64 = REMOVE_FREQ_KEYFRAME }, REMOVE_FREQ_KEYFRAME, REMOVE_FREQ_NONKEYFRAME, 0, "freq" }, { "k",NULL, 0, AV_OPT_TYPE_CONST, { .i64 = REMOVE_FREQ_NONKEYFRAME }, .unit = "freq" }, { "keyframe", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = REMOVE_FREQ_KEYFRAME }, .unit = "freq" }, { "e",NULL, 0, AV_OPT_TYPE_CONST, { .i64 = REMOVE_FREQ_ALL }, .unit = "freq" }, diff --git a/tests/ref/fate/ffmpeg-bsf-remove-k b/tests/ref/fate/ffmpeg-bsf-remove-k index 9c1f54e..bc2295a 100644 --- a/tests/ref/fate/ffmpeg-bsf-remove-k +++ b/tests/ref/fate/ffmpeg-bsf-remove-k @@ -1,33 +1,32 @@ -6196f1d6b59d16c045de627221d8685f *tests/data/fate/ffmpeg-bsf-remove-k.avi -130072 tests/data/fate/ffmpeg-bsf-remove-k.avi -#extradata 0: 30, 0x4a4d065a +d6c688432b88ca62ea8abb885272af52 *tests/data/fate/ffmpeg-bsf-remove-k.avi +129982 tests/data/fate/ffmpeg-bsf-remove-k.avi #tb 0: 1/25 #media_type 0: video #codec_id 0: mpeg4 #dimensions 0: 716x236 #sar 0: 1/1 -0, 0, 0,1,20194, 0x174f64ac -0, 1, 1,1,17878, 0xc081a405, F=0x0 -0, 2, 2,1,22723, 0x60935d28, F=0x0 -0, 3, 3,1,18655, 0xe5c33ada, F=0x0 -0, 4, 4,1,12928, 0x84d6a9d7, F=0x0 -0, 5, 5,1, 4788, 0xbf9e1939, F=0x0 -0, 6, 6,1, 3160, 0x867423c7, F=0x0 -0, 7, 7,1, 2049, 0x523ffd85, F=0x0 -0, 8, 8,1, 1440, 0x363ff725, F=0x0 -0, 9, 9,1, 1300, 0x0d3c9c74, F=0x0 -0, 10, 10,1, 1081, 0xbfb0365c, F=0x0 -0, 11, 11,1, 1011, 0x9d310f90, F=0x0 -0, 12, 12,1, 2543, 0x64500a0f -0, 13, 13,1, 881, 0x7492d262, F=0x0 -0, 14, 14,1, 896, 0x1ff1d335, F=0x0 -0, 15, 15,1, 973, 0x72c1fc04, F=0x0 -0, 16, 16,1, 1075, 0xa5881d73, F=0x0 -0, 17, 17,1, 933, 0xf0aae974, F=0x0 -0, 18, 18,1, 1079, 0xbdce1b40, F=0x0 -0, 19, 19,1, 964, 0x323fe4ab, F=0x0 -0, 20, 20,1, 1015, 0x78a4fe96, F=0x0 -0, 21, 21,1, 990, 0x9cd4ff25, F=0x0 -0, 22, 22,1, 1093, 0x98712e2e, F=0x0 -0, 23, 23,1, 1200, 0x37957156, F=0x0 -0, 24, 24,1, 2881, 0xbb1feefb +0, 0, -9223372036854775808,1,20164, 0x66bf5e52 +0, 1, -9223372036854775808,1,17878, 0xc081a405, F=0x0 +0, 2, -9223372036854775808,1,22723, 0x60935d28, F=0x0 +0, 3, -9223372036854775808,1,18655, 0xe5c33ada, F=0x0 +0, 4, -9223372036854775808,1,12928, 0x84d6a9d7, F=0x0 +0, 5, -9223372036854775808,1, 4788, 0xbf9e1939, F=0x0 +0, 6, -9223372036854775808,1, 3160, 0x867423c7, F=0x0 +0, 7, -9223372036854775808,1, 2049, 0x523ffd85, F=0x0 +0, 8, -9223372036854775808,1, 1440, 0x363ff725, F=0x0 +0, 9, -9223372036854775808,1, 1300, 0x0d3c9c74, F=0x0 +0, 10, -9223372036854775808,1, 1081, 0xbfb0365c, F=0x0 +0, 11, -9223372036854775808,1, 1011, 0x9d310f90, F=0x0 +0, 12, -9223372036854775808,1, 2513, 0xbcd803b5 +0, 13, -9223372036854775808,1, 881, 0x7492d262, F=0x0 +0, 14, -9223372036854775808,1, 896, 0x1ff1d335, F=0x0 +0, 15, -9223372036854775808,1, 973, 0x72c1fc04, F=0x0 +0, 16, -9223372036854775808,1, 1075, 0xa5881d73, F=0x0 +0, 17, -9223372036854775808,1
[FFmpeg-cvslog] tests/fate/ffmpeg: Remove dead automatic remove extradata test update the keyframe test
ffmpeg | branch: master | Michael Niedermayer | Fri Sep 23 16:26:56 2016 +0200| [1bd9b960ba74d4512edbbdaa84ae747f0d9007de] | committer: Michael Niedermayer tests/fate/ffmpeg: Remove dead automatic remove extradata test update the keyframe test Found-by: jamrial Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1bd9b960ba74d4512edbbdaa84ae747f0d9007de --- tests/fate/ffmpeg.mak | 7 ++- tests/ref/fate/ffmpeg-bsf-remove-a | 33 - 2 files changed, 2 insertions(+), 38 deletions(-) diff --git a/tests/fate/ffmpeg.mak b/tests/fate/ffmpeg.mak index e913ca8..da6d5de 100644 --- a/tests/fate/ffmpeg.mak +++ b/tests/fate/ffmpeg.mak @@ -89,16 +89,13 @@ fate-adtstoasc_ticket3715: $(TARGET_SAMPLES)/aac/foo.aac fate-adtstoasc_ticket3715: CMD = transcode "aac" $(TARGET_SAMPLES)/aac/foo.aac\ mov "-c copy -bsf:a aac_adtstoasc" "-codec copy" -FATE_SAMPLES_FFMPEG-$(call ALLYES, MPEGPS_DEMUXER AVI_MUXER REMOVE_EXTRADATA_BSF) += fate-ffmpeg-bsf-remove-k fate-ffmpeg-bsf-remove-a fate-ffmpeg-bsf-remove-r fate-ffmpeg-bsf-remove-e +FATE_SAMPLES_FFMPEG-$(call ALLYES, MPEGPS_DEMUXER AVI_MUXER REMOVE_EXTRADATA_BSF) += fate-ffmpeg-bsf-remove-k fate-ffmpeg-bsf-remove-r fate-ffmpeg-bsf-remove-e fate-ffmpeg-bsf-remove-k: $(TARGET_SAMPLES)/mpeg2/matrixbench_mpeg2.lq1.mpg fate-ffmpeg-bsf-remove-k: CMD = transcode "mpeg" $(TARGET_SAMPLES)/mpeg2/matrixbench_mpeg2.lq1.mpg\ avi "-vbsf remove_extra=k" "-codec copy" -fate-ffmpeg-bsf-remove-a: $(TARGET_SAMPLES)/mpeg2/matrixbench_mpeg2.lq1.mpg -fate-ffmpeg-bsf-remove-a: CMD = transcode "mpeg" $(TARGET_SAMPLES)/mpeg2/matrixbench_mpeg2.lq1.mpg\ - avi "-vbsf remove_extra=a" "-codec copy" fate-ffmpeg-bsf-remove-r: $(TARGET_SAMPLES)/mpeg2/matrixbench_mpeg2.lq1.mpg fate-ffmpeg-bsf-remove-r: CMD = transcode "mpeg" $(TARGET_SAMPLES)/mpeg2/matrixbench_mpeg2.lq1.mpg\ - avi "-vbsf remove_extra=r" "-codec copy" + avi "-vbsf remove_extra=keyframe" "-codec copy" fate-ffmpeg-bsf-remove-e: $(TARGET_SAMPLES)/mpeg2/matrixbench_mpeg2.lq1.mpg fate-ffmpeg-bsf-remove-e: CMD = transcode "mpeg" $(TARGET_SAMPLES)/mpeg2/matrixbench_mpeg2.lq1.mpg\ avi "-vbsf remove_extra=e" "-codec copy" diff --git a/tests/ref/fate/ffmpeg-bsf-remove-a b/tests/ref/fate/ffmpeg-bsf-remove-a deleted file mode 100644 index 8d362d3..000 --- a/tests/ref/fate/ffmpeg-bsf-remove-a +++ /dev/null @@ -1,33 +0,0 @@ -6196f1d6b59d16c045de627221d8685f *tests/data/fate/ffmpeg-bsf-remove-a.avi -130072 tests/data/fate/ffmpeg-bsf-remove-a.avi -#extradata 0: 30, 0x4a4d065a -#tb 0: 1/25 -#media_type 0: video -#codec_id 0: mpeg4 -#dimensions 0: 716x236 -#sar 0: 1/1 -0, 0, 0,1,20194, 0x174f64ac -0, 1, 1,1,17878, 0xc081a405, F=0x0 -0, 2, 2,1,22723, 0x60935d28, F=0x0 -0, 3, 3,1,18655, 0xe5c33ada, F=0x0 -0, 4, 4,1,12928, 0x84d6a9d7, F=0x0 -0, 5, 5,1, 4788, 0xbf9e1939, F=0x0 -0, 6, 6,1, 3160, 0x867423c7, F=0x0 -0, 7, 7,1, 2049, 0x523ffd85, F=0x0 -0, 8, 8,1, 1440, 0x363ff725, F=0x0 -0, 9, 9,1, 1300, 0x0d3c9c74, F=0x0 -0, 10, 10,1, 1081, 0xbfb0365c, F=0x0 -0, 11, 11,1, 1011, 0x9d310f90, F=0x0 -0, 12, 12,1, 2543, 0x64500a0f -0, 13, 13,1, 881, 0x7492d262, F=0x0 -0, 14, 14,1, 896, 0x1ff1d335, F=0x0 -0, 15, 15,1, 973, 0x72c1fc04, F=0x0 -0, 16, 16,1, 1075, 0xa5881d73, F=0x0 -0, 17, 17,1, 933, 0xf0aae974, F=0x0 -0, 18, 18,1, 1079, 0xbdce1b40, F=0x0 -0, 19, 19,1, 964, 0x323fe4ab, F=0x0 -0, 20, 20,1, 1015, 0x78a4fe96, F=0x0 -0, 21, 21,1, 990, 0x9cd4ff25, F=0x0 -0, 22, 22,1, 1093, 0x98712e2e, F=0x0 -0, 23, 23,1, 1200, 0x37957156, F=0x0 -0, 24, 24,1, 2881, 0xbb1feefb ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/cavsdsp: use av_clip_uint8() for idct
ffmpeg | branch: master | Michael Niedermayer | Mon Sep 19 15:25:38 2016 +0200| [0e318f110bcd6bb8e7de9127f2747272e60f48d7] | committer: Michael Niedermayer avcodec/cavsdsp: use av_clip_uint8() for idct Fixes out of array read Fixes: 1.swf Found-by: 连一汉 Tested-by: 连一汉 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0e318f110bcd6bb8e7de9127f2747272e60f48d7 --- libavcodec/cavsdsp.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/libavcodec/cavsdsp.c b/libavcodec/cavsdsp.c index 91f6d73..df9490a 100644 --- a/libavcodec/cavsdsp.c +++ b/libavcodec/cavsdsp.c @@ -188,7 +188,6 @@ static void cavs_filter_ch_c(uint8_t *d, int stride, int alpha, int beta, int tc static void cavs_idct8_add_c(uint8_t *dst, int16_t *block, int stride) { int i; int16_t (*src)[8] = (int16_t(*)[8])block; -const uint8_t *cm = ff_crop_tab + MAX_NEG_CROP; src[0][0] += 8; @@ -243,14 +242,14 @@ static void cavs_idct8_add_c(uint8_t *dst, int16_t *block, int stride) { const int b2 = a5 - a7; const int b3 = a4 - a6; -dst[i + 0*stride] = cm[ dst[i + 0*stride] + ((b0 + b4) >> 7)]; -dst[i + 1*stride] = cm[ dst[i + 1*stride] + ((b1 + b5) >> 7)]; -dst[i + 2*stride] = cm[ dst[i + 2*stride] + ((b2 + b6) >> 7)]; -dst[i + 3*stride] = cm[ dst[i + 3*stride] + ((b3 + b7) >> 7)]; -dst[i + 4*stride] = cm[ dst[i + 4*stride] + ((b3 - b7) >> 7)]; -dst[i + 5*stride] = cm[ dst[i + 5*stride] + ((b2 - b6) >> 7)]; -dst[i + 6*stride] = cm[ dst[i + 6*stride] + ((b1 - b5) >> 7)]; -dst[i + 7*stride] = cm[ dst[i + 7*stride] + ((b0 - b4) >> 7)]; +dst[i + 0*stride] = av_clip_uint8( dst[i + 0*stride] + ((b0 + b4) >> 7)); +dst[i + 1*stride] = av_clip_uint8( dst[i + 1*stride] + ((b1 + b5) >> 7)); +dst[i + 2*stride] = av_clip_uint8( dst[i + 2*stride] + ((b2 + b6) >> 7)); +dst[i + 3*stride] = av_clip_uint8( dst[i + 3*stride] + ((b3 + b7) >> 7)); +dst[i + 4*stride] = av_clip_uint8( dst[i + 4*stride] + ((b3 - b7) >> 7)); +dst[i + 5*stride] = av_clip_uint8( dst[i + 5*stride] + ((b2 - b6) >> 7)); +dst[i + 6*stride] = av_clip_uint8( dst[i + 6*stride] + ((b1 - b5) >> 7)); +dst[i + 7*stride] = av_clip_uint8( dst[i + 7*stride] + ((b0 - b4) >> 7)); } } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fate: add Test for h264_mp4toannexb (ticket2991)
ffmpeg | branch: master | Michael Niedermayer | Fri Sep 23 21:25:32 2016 +0200| [4a3b41bed0d11f0c5a8a6d5d6fa2ce1cfe6669b8] | committer: Michael Niedermayer fate: add Test for h264_mp4toannexb (ticket2991) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4a3b41bed0d11f0c5a8a6d5d6fa2ce1cfe6669b8 --- tests/fate/ffmpeg.mak | 5 ++ tests/ref/fate/h264_mp4toannexb_ticket2991 | 127 + 2 files changed, 132 insertions(+) diff --git a/tests/fate/ffmpeg.mak b/tests/fate/ffmpeg.mak index da6d5de..eb90090 100644 --- a/tests/fate/ffmpeg.mak +++ b/tests/fate/ffmpeg.mak @@ -89,6 +89,11 @@ fate-adtstoasc_ticket3715: $(TARGET_SAMPLES)/aac/foo.aac fate-adtstoasc_ticket3715: CMD = transcode "aac" $(TARGET_SAMPLES)/aac/foo.aac\ mov "-c copy -bsf:a aac_adtstoasc" "-codec copy" +FATE_SAMPLES_FFMPEG-$(call ALLYES, MOV_DEMUXER H264_MUXER H264_MP4TOANNEXB_BSF) += fate-h264_mp4toannexb_ticket2991 +fate-h264_mp4toannexb_ticket2991: $(TARGET_SAMPLES)/h264/wwwq_cut.mp4 +fate-h264_mp4toannexb_ticket2991: CMD = transcode "mp4" $(TARGET_SAMPLES)/h264/wwwq_cut.mp4\ + h264 "-c:v copy -bsf:v h264_mp4toannexb" "-codec copy" + FATE_SAMPLES_FFMPEG-$(call ALLYES, MPEGPS_DEMUXER AVI_MUXER REMOVE_EXTRADATA_BSF) += fate-ffmpeg-bsf-remove-k fate-ffmpeg-bsf-remove-r fate-ffmpeg-bsf-remove-e fate-ffmpeg-bsf-remove-k: $(TARGET_SAMPLES)/mpeg2/matrixbench_mpeg2.lq1.mpg fate-ffmpeg-bsf-remove-k: CMD = transcode "mpeg" $(TARGET_SAMPLES)/mpeg2/matrixbench_mpeg2.lq1.mpg\ diff --git a/tests/ref/fate/h264_mp4toannexb_ticket2991 b/tests/ref/fate/h264_mp4toannexb_ticket2991 new file mode 100644 index 000..27630d5 --- /dev/null +++ b/tests/ref/fate/h264_mp4toannexb_ticket2991 @@ -0,0 +1,127 @@ +f52716e8110147553567ee617bfe6af8 *tests/data/fate/h264_mp4toannexb_ticket2991.h264 +1999668 tests/data/fate/h264_mp4toannexb_ticket2991.h264 +#extradata 0: 79, 0x1ec61105 +#tb 0: 1/120 +#media_type 0: video +#codec_id 0: h264 +#dimensions 0: 1280x720 +#sar 0: 3/4 +0, 0, 0,48000,37126, 0xb020184c +0, 48000, 48000,40040, 6920, 0x8512361a, F=0x0 +0, 88040, 88040,40040, 7550, 0x1bc56ed4, F=0x0 +0, 128081, 128081,40040, 8752, 0xb8c6f0a1, F=0x0 +0, 168121, 168121,40040,13022, 0xe36b6255, F=0x0 +0, 208162, 208162,40040,12982, 0x7c993297, F=0x0 +0, 248202, 248202,40040,13982, 0x24fe5e0f, F=0x0 +0, 288242, 288242,40040,13958, 0x9a22230d, F=0x0 +0, 328283, 328283,40040,15346, 0xf0f1a59c, F=0x0 +0, 368323, 368323,40040,21016, 0x8d061e7f, F=0x0 +0, 408364, 408364,40040,14786, 0x7b1e889d, F=0x0 +0, 448404, 448404,40040,11917, 0xf7742a9d, F=0x0 +0, 488444, 488444,40040,11234, 0x83cbd9fd, F=0x0 +0, 528485, 528485,40040,17616, 0xfdf95104, F=0x0 +0, 568525, 568525,40040,10689, 0x9633d32b, F=0x0 +0, 608566, 608566,40040,45291, 0x543c2cf6 +0, 648606, 648606,40040,20837, 0x051abfab, F=0x0 +0, 688646, 688646,40040,21418, 0xe2a59d70, F=0x0 +0, 728687, 728687,40040,15643, 0x15cf2cec, F=0x0 +0, 768727, 768727,40040,11956, 0x5aef382e, F=0x0 +0, 808768, 808768,40040,15393, 0x951dd757, F=0x0 +0, 848808, 848808,40040,14839, 0x2d33151c, F=0x0 +0, 48, 48,40040,14580, 0x2a895aa6, F=0x0 +0, 928889, 928889,40040,17571, 0xb3a115f0, F=0x0 +0, 968929, 968929,40040,15621, 0x2cc6577d, F=0x0 +0,1008970,1008970,40040,13653, 0xb6a3ac6e, F=0x0 +0,1049010,1049010,40040,16274, 0xe8b9b09d, F=0x0 +0,1089050,1089050,40040,13130, 0xcbb6bb8e, F=0x0 +0,1129091,1129091,40040,16180, 0x5d188a7a, F=0x0 +0,1169131,1169131,40040,14961, 0x9ff2f463, F=0x0 +0,1209172,1209172,40040,54296, 0xe6ec30ed +0,1249212,1249212,40040,11500, 0x8c4852c9, F=0x0 +0,1289252,1289252,40040,12065, 0xfb7954c3, F=0x0 +0,1329293,1329293,40040,12532, 0xf0a935d3, F=0x0 +0,1369333,1369333,40040,16284, 0xc5c18561, F=0x0 +0,1409374,1409374,40040,17657, 0x08ce58cc, F=0x0 +0,1449414,1449414,40040,21336, 0xd0965202, F=0x0 +0,1489454,1489454,40040,18549, 0x9e9a42ef, F=0x0 +0,1529495,1529495,40040,14351, 0xa864d2be, F=0x0 +0,1569535,1569535,40040,15205, 0x5bd7b98e, F=0x0 +0,1609576,1609576,40040,18040, 0x287af301, F=0x0 +0,1649616,1649616,40040,15917, 0x2db52580, F=0x0 +0,1689656,1689656,40040,13250, 0xfed0deb8, F=0x0 +0,1729697,1729697,40040,13360, 0xbf92d476, F=0x0 +0,1769737,1769737,4
[FFmpeg-cvslog] ffprobe.c: Indicate decode-but-discard packets when doing -show_packets.
ffmpeg | branch: master | Sasi Inguva | Thu Sep 15 13:36:19 2016 -0700| [6a2cbf901461c4d2766618343e6f57739500393d] | committer: Michael Niedermayer ffprobe.c: Indicate decode-but-discard packets when doing -show_packets. Signed-off-by: Sasi Inguva Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6a2cbf901461c4d2766618343e6f57739500393d --- ffprobe.c | 3 +- tests/ref/fate/concat-demuxer-extended-lavf-mxf| 2 +- .../ref/fate/concat-demuxer-extended-lavf-mxf_d10 | 2 +- tests/ref/fate/concat-demuxer-simple1-lavf-mxf | 242 - tests/ref/fate/concat-demuxer-simple1-lavf-mxf_d10 | 140 +- tests/ref/fate/concat-demuxer-simple2-lavf-ts | 298 ++--- tests/ref/fate/ffprobe_compact | 28 +- tests/ref/fate/ffprobe_csv | 28 +- tests/ref/fate/ffprobe_default | 28 +- tests/ref/fate/ffprobe_flat| 28 +- tests/ref/fate/ffprobe_ini | 28 +- tests/ref/fate/ffprobe_json| 28 +- tests/ref/fate/ffprobe_xml | 28 +- 13 files changed, 442 insertions(+), 441 deletions(-) diff --git a/ffprobe.c b/ffprobe.c index 657867d..e64c66e 100644 --- a/ffprobe.c +++ b/ffprobe.c @@ -1815,7 +1815,8 @@ static void show_packet(WriterContext *w, InputFile *ifile, AVPacket *pkt, int p print_val("size", pkt->size, unit_byte_str); if (pkt->pos != -1) print_fmt("pos", "%"PRId64, pkt->pos); elseprint_str_opt("pos", "N/A"); -print_fmt("flags", "%c", pkt->flags & AV_PKT_FLAG_KEY ? 'K' : '_'); +print_fmt("flags", "%c%c", pkt->flags & AV_PKT_FLAG_KEY ? 'K' : '_', + pkt->flags & AV_PKT_FLAG_DISCARD ? 'D' : '_'); if (pkt->side_data_elems) { int size; diff --git a/tests/ref/fate/concat-demuxer-extended-lavf-mxf b/tests/ref/fate/concat-demuxer-extended-lavf-mxf index b894938..f7905aa 100644 --- a/tests/ref/fate/concat-demuxer-extended-lavf-mxf +++ b/tests/ref/fate/concat-demuxer-extended-lavf-mxf @@ -1 +1 @@ -0aa1ca6ff6e2e5aa926454d22fdaecd5 *tests/data/fate/concat-demuxer-extended-lavf-mxf.ffprobe +21eb3a629ff504b55c93a66879a31362 *tests/data/fate/concat-demuxer-extended-lavf-mxf.ffprobe diff --git a/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10 b/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10 index b378a2d..0c49f1f 100644 --- a/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10 +++ b/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10 @@ -1 +1 @@ -14c2b8d8f82f261c9627b33c481c0e8c *tests/data/fate/concat-demuxer-extended-lavf-mxf_d10.ffprobe +67a03ad49f1bd17131f751313639b61e *tests/data/fate/concat-demuxer-extended-lavf-mxf_d10.ffprobe diff --git a/tests/ref/fate/concat-demuxer-simple1-lavf-mxf b/tests/ref/fate/concat-demuxer-simple1-lavf-mxf index 3fc7957..6bba76a 100644 --- a/tests/ref/fate/concat-demuxer-simple1-lavf-mxf +++ b/tests/ref/fate/concat-demuxer-simple1-lavf-mxf @@ -1,124 +1,124 @@ -video|0|0|0.00|-1|-0.04|1|0.04|N/A|N/A|24801|6144|K -audio|1|0|0.00|0|0.00|1920|0.04|N/A|N/A|3840|31232|K -video|0|3|0.12|0|0.00|1|0.04|N/A|N/A|16743|35840|_ -audio|1|1920|0.04|1920|0.04|1920|0.04|N/A|N/A|3840|52736|K -video|0|1|0.04|1|0.04|1|0.04|N/A|N/A|13812|57344|_ -audio|1|3840|0.08|3840|0.08|1920|0.04|N/A|N/A|3840|71680|K -video|0|2|0.08|2|0.08|1|0.04|N/A|N/A|13607|76288|_ -audio|1|5760|0.12|5760|0.12|1920|0.04|N/A|N/A|3840|90112|K -video|0|6|0.24|3|0.12|1|0.04|N/A|N/A|16158|94720|_ -audio|1|7680|0.16|7680|0.16|1920|0.04|N/A|N/A|3840|04|K -video|0|4|0.16|4|0.16|1|0.04|N/A|N/A|13943|115712|_ -audio|1|9600|0.20|9600|0.20|1920|0.04|N/A|N/A|3840|130048|K -video|0|5|0.20|5|0.20|1|0.04|N/A|N/A|11223|134656|_ -audio|1|11520|0.24|11520|0.24|1920|0.04|N/A|N/A|3840|145920|K -video|0|9|0.36|6|0.24|1|0.04|N/A|N/A|20298|150528|_ -audio|1|13440|0.28|13440|0.28|1920|0.04|N/A|N/A|3840|171008|K -video|0|7|0.28|7|0.28|1|0.04|N/A|N/A|13341|175616|_ -audio|1|15360|0.32|15360|0.32|1920|0.04|N/A|N/A|3840|189440|K -video|0|8|0.32|8|0.32|1|0.04|N/A|N/A|12362|194048|_ -audio|1|17280|0.36|17280|0.36|1920|0.04|N/A|N/A|3840|206848|K -video|0|12|0.48|9|0.36|1|0.04|N/A|N/A|24786|211456|K -audio|1|19200|0.40|19200|0.40|1920|0.04|N/A|N/A|3840|236544|K -video|0|10|0.40|10|0.40|1|0.04|N/A|N/A|13377|241152|_ -audio|1|21120|0.44|21120|0.44|1920|0.04|N/A|N/A|3840|254976|K -video|0|11|0.44|11|0.44|1|0.04|N/A|N/A|15624|259584|_ -audio|1|23040|0.48|23040|0.48|1920|0.04|N/A|N/A|3840|275456|K -video|0|15|0.60|12|0.48|1|0.04|N/A|N/A|22597|280064|_ -
[FFmpeg-cvslog] avformat/hlsenc: refine EXT-X-BYTERANGE support for segments
ffmpeg | branch: master | Steven Liu | Mon Sep 19 07:00:42 2016 +0800| [1212e3468e7b66007a3a3f0363af5fd92718835a] | committer: Michael Niedermayer avformat/hlsenc: refine EXT-X-BYTERANGE support for segments refine EXT-X-BYTERANGE tag, the spec link: https://tools.ietf.org/html/draft-pantos-http-live-streaming-19#section-4.3.2.2 the apple doc: https://developer.apple.com/library/ios/technotes/tn2288/_index.html# //apple_ref/doc/uid/DTS40012238-CH1-BYTE_RANGE_SUPPORT_FOR_SEGMENTS command line: ./ffmpeg -i ~/Movies/objectC/a.mp4 -c copy -f hls -hls_time 7 -hls_list_size 0 -hls_segment_size 250 -t 40 output-test.m3u8 output: localhost:ffmpeg liuqi$ ll *.ts ;cat output-test.m3u8 -rw-r--r-- 1 liuqi staff 2792176 9 12 14:44 output-test0.ts -rw-r--r-- 1 liuqi staff 3112528 9 12 14:44 output-test3.ts -rw-r--r-- 1 liuqi staff 3377420 9 12 14:44 output-test6.ts -rw-r--r-- 1 liuqi staff 1228016 9 12 14:44 output-test7.ts #EXTM3U #EXT-X-VERSION:4 #EXT-X-TARGETDURATION:10 #EXT-X-MEDIA-SEQUENCE:0 #EXTINF:9.021000, #EXT-X-BYTERANGE:1334988@0 output-test0.ts #EXTINF:3.00, #EXT-X-BYTERANGE:721356@1334988 output-test0.ts #EXTINF:3.00, #EXT-X-BYTERANGE:735832@2056344 output-test0.ts #EXTINF:6.00, #EXT-X-BYTERANGE:1645940@0 output-test3.ts #EXTINF:3.00, #EXT-X-BYTERANGE:715152@1645940 output-test3.ts #EXTINF:3.00, #EXT-X-BYTERANGE:751436@2361092 output-test3.ts #EXTINF:9.00, #EXT-X-BYTERANGE:3377420@0 output-test6.ts #EXTINF:3.96, #EXT-X-BYTERANGE:1228016@0 output-test7.ts #EXT-X-ENDLIST localhost:ffmpeg liuqi$ ticket-id: #5839 Signed-off-by: Steven Liu Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1212e3468e7b66007a3a3f0363af5fd92718835a --- libavformat/hlsenc.c | 49 ++--- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 0ca5932..428bae4 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -104,6 +104,7 @@ typedef struct HLSContext { double duration; // last segment duration computed so far, in seconds int64_t start_pos;// last segment starting position int64_t size; // last segment size +int64_t max_seg_size; // every segment file max size int nb_entries; int discontinuity_set; @@ -396,6 +397,9 @@ static int hls_append_segment(struct AVFormatContext *s, HLSContext *hls, double } else hls->nb_entries++; +if (hls->max_seg_size > 0) { +return 0; +} hls->sequence++; return 0; @@ -476,7 +480,7 @@ static int hls_window(AVFormatContext *s, int last) AVIOContext *sub_out = NULL; char temp_filename[1024]; int64_t sequence = FFMAX(hls->start_sequence, hls->sequence - hls->nb_entries); -int version = hls->flags & HLS_SINGLE_FILE ? 4 : 3; +int version = 3; const char *proto = avio_find_protocol_name(s->filename); int use_rename = proto && !strcmp(proto, "file"); static unsigned warned_non_file; @@ -484,6 +488,12 @@ static int hls_window(AVFormatContext *s, int last) char *iv_string = NULL; AVDictionary *options = NULL; double prog_date_time = hls->initial_prog_date_time; +int byterange_mode = (hls->flags & HLS_SINGLE_FILE) || (hls->max_seg_size > 0); + +if (byterange_mode) { +version = 4; +sequence = 0; +} if (!use_rename && !warned_non_file++) av_log(s, AV_LOG_ERROR, "Cannot use rename on non file protocol, this may lead to races and temporarly partial files\n"); @@ -533,7 +543,7 @@ static int hls_window(AVFormatContext *s, int last) avio_printf(out, "#EXTINF:%ld,\n", lrint(en->duration)); else avio_printf(out, "#EXTINF:%f,\n", en->duration); -if (hls->flags & HLS_SINGLE_FILE) +if (byterange_mode) avio_printf(out, "#EXT-X-BYTERANGE:%"PRIi64"@%"PRIi64"\n", en->size, en->pos); if (hls->flags & HLS_PROGRAM_DATE_TIME) { @@ -584,7 +594,7 @@ static int hls_window(AVFormatContext *s, int last) for (en = hls->segments; en; en = en->next) { avio_printf(sub_out, "#EXTINF:%f,\n", en->duration); -if (hls->flags & HLS_SINGLE_FILE) +if (byterange_mode) avio_printf(sub_out, "#EXT-X-BYTERANGE:%"PRIi64"@%"PRIi64"\n", en->size, en->pos); if (hls->baseurl) @@ -621,6 +631,13 @@ static int hls_start(AVFormatContext *s) if (c->vtt_basename) av_strlcpy(vtt_oc->filename, c->vtt_basename, sizeof(vtt_oc->filename)); +} else if (c->max_seg_size > 0) { +if (av_get_frame_filename2(oc->filename, sizeof(oc->filename), +c->basename, c->wrap ? c->sequence % c->wrap : c->sequence, +AV_FRAME_FILENAME_FLAGS_MULTIPLE) < 0) { +a
[FFmpeg-cvslog] avformat/hls: Fix handling of EXT-X-BYTERANGE streams over 2GB
ffmpeg | branch: master | Anssi Hannula | Sat Sep 24 09:29:03 2016 +0300| [a6f5e25ad989550dff9493311d6ba08d882df079] | committer: Anssi Hannula avformat/hls: Fix handling of EXT-X-BYTERANGE streams over 2GB Replace uses of atoi() with strtoll() when trying to read values into int64_t variables. Fixes Kodi trac #16926: http://trac.kodi.tv/ticket/16926 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a6f5e25ad989550dff9493311d6ba08d882df079 --- libavformat/hls.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavformat/hls.c b/libavformat/hls.c index 1ad08a4..3c09dd8 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -417,10 +417,10 @@ static struct segment *new_init_section(struct playlist *pls, } if (info->byterange[0]) { -sec->size = atoi(info->byterange); +sec->size = strtoll(info->byterange, NULL, 10); ptr = strchr(info->byterange, '@'); if (ptr) -sec->url_offset = atoi(ptr+1); +sec->url_offset = strtoll(ptr+1, NULL, 10); } else { /* the entire file is the init section */ sec->size = -1; @@ -732,7 +732,7 @@ static int parse_playlist(HLSContext *c, const char *url, ret = ensure_playlist(c, &pls, url); if (ret < 0) goto fail; -pls->target_duration = atoi(ptr) * AV_TIME_BASE; +pls->target_duration = strtoll(ptr, NULL, 10) * AV_TIME_BASE; } else if (av_strstart(line, "#EXT-X-MEDIA-SEQUENCE:", &ptr)) { ret = ensure_playlist(c, &pls, url); if (ret < 0) @@ -761,10 +761,10 @@ static int parse_playlist(HLSContext *c, const char *url, is_segment = 1; duration = atof(ptr) * AV_TIME_BASE; } else if (av_strstart(line, "#EXT-X-BYTERANGE:", &ptr)) { -seg_size = atoi(ptr); +seg_size = strtoll(ptr, NULL, 10); ptr = strchr(ptr, '@'); if (ptr) -seg_offset = atoi(ptr+1); +seg_offset = strtoll(ptr+1, NULL, 10); } else if (av_strstart(line, "#", NULL)) { continue; } else if (line[0]) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog