[FFmpeg-cvslog] doc/filters: some more details and modified example to zmq/azmq
ffmpeg | branch: master | Bela Bodecs | Tue Apr 3 16:18:02 2018 +0200| [e54679b6c1def5a969d4a5c9db63b51efe7106d7] | committer: Lou Logan doc/filters: some more details and modified example to zmq/azmq Info about default value of bind_address option and its abbreviated version (b). Example modified to have named instanced filter and to show its use. Signed-off-by: Bela Bodecs Signed-off-by: Lou Logan > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e54679b6c1def5a969d4a5c9db63b51efe7106d7 --- doc/filters.texi | 28 ++-- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 7538ab3273..4438386f64 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -221,6 +221,7 @@ Here is a BNF description of the filtergraph syntax: @var{FILTERGRAPH} ::= [sws_flags=@var{flags};] @var{FILTERCHAIN} [;@var{FILTERGRAPH}] @end example +@anchor{filtergraph escaping} @section Notes on filtergraph escaping Filtergraph description composition entails several levels of @@ -20270,7 +20271,7 @@ filters in the filtergraph. @code{zmq} and @code{azmq} work as a pass-through filters. @code{zmq} must be inserted between two video filters, @code{azmq} between two -audio filters. +audio filters. Both are capable to send messages to any filter type. To enable these filters you need to install the libzmq library and headers and configure FFmpeg with @code{--enable-libzmq}. @@ -20280,7 +20281,10 @@ For more information about libzmq see: The @code{zmq} and @code{azmq} filters work as a libzmq server, which receives messages sent through a network interface defined by the -@option{bind_address} option. +@option{bind_address} (or the abbreviation "@option{b}") option. +Default value of this option is @file{tcp://localhost:}. You may +want to alter this value to your needs, but do not forget to escape any +':' signs (see @ref{filtergraph escaping}). The received message must be in the form: @example @@ -20288,7 +20292,10 @@ The received message must be in the form: @end example @var{TARGET} specifies the target of the command, usually the name of -the filter class or a specific filter instance name. +the filter class or a specific filter instance name. The default +filter instance name uses the pattern @samp{Parsed__}, +but you can override this by using the @samp{filter_name@@id} syntax +(see @ref{Filtergraph syntax}). @var{COMMAND} specifies the name of the command for the target filter. @@ -20310,14 +20317,17 @@ will send a reply to the client, adopting the format: Look at @file{tools/zmqsend} for an example of a zmq client which can be used to send commands processed by these filters. -Consider the following filtergraph generated by @command{ffplay} +Consider the following filtergraph generated by @command{ffplay}. +In this example the last overlay filter has an instance name. All other +filters will have default instance names. + @example ffplay -dumpgraph 1 -f lavfi " color=s=100x100:c=red [l]; color=s=100x100:c=blue [r]; nullsrc=s=200x100, zmq [bg]; -[bg][l] overlay [bg+l]; -[bg+l][r] overlay=x=100 " +[bg][l] overlay [bg+l]; +[bg+l][r] overlay@@my=x=100 " @end example To change the color of the left side of the video, the following @@ -20331,6 +20341,12 @@ To change the right side: echo Parsed_color_1 c pink | tools/zmqsend @end example +To change the position of the right side: +@example +echo overlay@@my x 150 | tools/zmqsend +@end example + + @c man end MULTIMEDIA FILTERS @chapter Multimedia Sources ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavf/amr: Stricter heuristic for auto-detection.
ffmpeg | branch: master | Carl Eugen Hoyos | Thu Apr 5 00:41:55 2018 +0200| [233f52fd2534e6844fd5831e3a6c7ca3a1c8fc2d] | committer: Carl Eugen Hoyos lavf/amr: Stricter heuristic for auto-detection. Fixes ticket #7125. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=233f52fd2534e6844fd5831e3a6c7ca3a1c8fc2d --- libavformat/amr.c | 10 ++ libavformat/version.h | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/libavformat/amr.c b/libavformat/amr.c index 8b4d736d2f..f954803d46 100644 --- a/libavformat/amr.c +++ b/libavformat/amr.c @@ -178,7 +178,7 @@ AVInputFormat ff_amr_demuxer = { #if CONFIG_AMRNB_DEMUXER static int amrnb_probe(AVProbeData *p) { -int mode, i = 0, valid = 0; +int mode, i = 0, valid = 0, invalid = 0; const uint8_t *b = p->buf; while (i < p->buf_size) { @@ -197,10 +197,11 @@ static int amrnb_probe(AVProbeData *p) } } else { valid = 0; +invalid++; i++; } } -if (valid > 100) +if (valid > 100 && valid > invalid) return AVPROBE_SCORE_EXTENSION / 2 + 1; return 0; } @@ -234,7 +235,7 @@ AVInputFormat ff_amrnb_demuxer = { #if CONFIG_AMRWB_DEMUXER static int amrwb_probe(AVProbeData *p) { -int mode, i = 0, valid = 0; +int mode, i = 0, valid = 0, invalid = 0; const uint8_t *b = p->buf; while (i < p->buf_size) { @@ -253,10 +254,11 @@ static int amrwb_probe(AVProbeData *p) } } else { valid = 0; +invalid++; i++; } } -if (valid > 100) +if (valid > 100 && valid > invalid) return AVPROBE_SCORE_EXTENSION / 2 - 1; return 0; } diff --git a/libavformat/version.h b/libavformat/version.h index b55d51c1b7..a96e13bc60 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -33,7 +33,7 @@ // Also please add any ticket numbers that you believe might be affected here #define LIBAVFORMAT_VERSION_MAJOR 58 #define LIBAVFORMAT_VERSION_MINOR 11 -#define LIBAVFORMAT_VERSION_MICRO 100 +#define LIBAVFORMAT_VERSION_MICRO 101 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ LIBAVFORMAT_VERSION_MINOR, \ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavfi,lavd: add gitignore for generated static component lists
ffmpeg | branch: master | Josh de Kock | Thu Apr 5 22:08:50 2018 +0100| [92fe0bf1e8f83899ae8123bf1adc82dd6211f33a] | committer: Josh de Kock lavfi,lavd: add gitignore for generated static component lists Signed-off-by: Josh de Kock > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=92fe0bf1e8f83899ae8123bf1adc82dd6211f33a --- libavdevice/.gitignore | 2 ++ libavfilter/.gitignore | 1 + 2 files changed, 3 insertions(+) diff --git a/libavdevice/.gitignore b/libavdevice/.gitignore new file mode 100644 index 00..08ac3eb86a --- /dev/null +++ b/libavdevice/.gitignore @@ -0,0 +1,2 @@ +/indev_list.c +/outdev_list.c diff --git a/libavfilter/.gitignore b/libavfilter/.gitignore new file mode 100644 index 00..26bddebc93 --- /dev/null +++ b/libavfilter/.gitignore @@ -0,0 +1 @@ +/filter_list.c ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Add Sega FILM muxer
ffmpeg | branch: master | Misty De Meo | Mon Apr 2 10:53:30 2018 -0700| [187ff5a10864f16b7872eca722e844e8f04ec57b] | committer: Josh de Kock Add Sega FILM muxer Signed-off-by: Josh de Kock > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=187ff5a10864f16b7872eca722e844e8f04ec57b --- Changelog | 1 + doc/general.texi | 2 +- libavformat/Makefile | 1 + libavformat/allformats.c | 1 + libavformat/segafilmenc.c | 398 ++ libavformat/version.h | 2 +- 6 files changed, 403 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index 200866d873..74c410a8e2 100644 --- a/Changelog +++ b/Changelog @@ -52,6 +52,7 @@ version : - E-AC-3 dependent frames support - bitstream filter for extracting E-AC-3 core - Haivision SRT protocol via libsrt +- segafilm muxer version 3.4: diff --git a/doc/general.texi b/doc/general.texi index 41c6a59e99..2583006b14 100644 --- a/doc/general.texi +++ b/doc/general.texi @@ -559,7 +559,7 @@ library: @item SAP @tab X @tab X @item SBG @tab @tab X @item SDP @tab @tab X -@item Sega FILM/CPK @tab @tab X +@item Sega FILM/CPK @tab X @tab X @tab Used in many Sega Saturn console games. @item Silicon Graphics Movie@tab @tab X @item Sierra SOL@tab @tab X diff --git a/libavformat/Makefile b/libavformat/Makefile index af0823a7db..3eeca5091d 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -462,6 +462,7 @@ OBJS-$(CONFIG_SDR2_DEMUXER) += sdr2.o OBJS-$(CONFIG_SDS_DEMUXER) += sdsdec.o OBJS-$(CONFIG_SDX_DEMUXER) += sdxdec.o OBJS-$(CONFIG_SEGAFILM_DEMUXER) += segafilm.o +OBJS-$(CONFIG_SEGAFILM_MUXER)+= segafilmenc.o OBJS-$(CONFIG_SEGMENT_MUXER) += segment.o OBJS-$(CONFIG_SHORTEN_DEMUXER) += shortendec.o rawdec.o OBJS-$(CONFIG_SIFF_DEMUXER) += siff.o diff --git a/libavformat/allformats.c b/libavformat/allformats.c index d8d733735a..d582778b3b 100644 --- a/libavformat/allformats.c +++ b/libavformat/allformats.c @@ -362,6 +362,7 @@ extern AVInputFormat ff_sdr2_demuxer; extern AVInputFormat ff_sds_demuxer; extern AVInputFormat ff_sdx_demuxer; extern AVInputFormat ff_segafilm_demuxer; +extern AVOutputFormat ff_segafilm_muxer; extern AVOutputFormat ff_segment_muxer; extern AVOutputFormat ff_stream_segment_muxer; extern AVInputFormat ff_shorten_demuxer; diff --git a/libavformat/segafilmenc.c b/libavformat/segafilmenc.c new file mode 100644 index 00..86c0ab0d1c --- /dev/null +++ b/libavformat/segafilmenc.c @@ -0,0 +1,398 @@ +/* + * Sega FILM Format (CPK) Muxer + * Copyright (C) 2003 The FFmpeg project + * Copyright (C) 2018 Misty De Meo + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file + * Sega FILM (.cpk) file muxer + * @author Misty De Meo + * + * @see For more information regarding the Sega FILM file format, visit: + * http://wiki.multimedia.cx/index.php?title=Sega_FILM + */ + +#include "libavutil/intreadwrite.h" +#include "avformat.h" +#include "internal.h" +#include "avio_internal.h" + +typedef struct FILMPacket { +int audio; +int keyframe; +int32_t pts; +int32_t duration; +int32_t size; +int32_t index; +struct FILMPacket *next; +} FILMPacket; + +typedef struct FILMOutputContext { +const AVClass *class; +int audio_index; +int video_index; +int64_t stab_pos; +FILMPacket *start; +FILMPacket *last; +int64_t packet_count; +} FILMOutputContext; + +static int film_write_packet_to_header(AVFormatContext *format_context, FILMPacket *pkt) +{ +AVIOContext *pb = format_context->pb; +/* The bits in these two 32-bit integers contain info about the contents of this sample */ +int32_t info1 = 0; +int32_t info2 = 0; + +if (pkt->audio) { +/* Always the same, carries no more information than "this is audio" */ +info1 = 0x; +info2 = 1; +} else { +info1 = pkt->pts; +info2 = pkt->duration; +/* The top bit being set indicates a key frame */ +if (pkt->keyframe) +
[FFmpeg-cvslog] avcodec/prores_ks : do not call estimate_alpha at each quantification step
ffmpeg | branch: master | Martin Vignali | Thu Apr 5 22:04:35 2018 +0200| [1425114af24d8402758ca11f7177d19a7f98df4d] | committer: Martin Vignali avcodec/prores_ks : do not call estimate_alpha at each quantification step also remove unused arg in estimate_alpha_plane Improve quality of Prores encoding > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1425114af24d8402758ca11f7177d19a7f98df4d --- libavcodec/proresenc_kostya.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c index 149dc81b3c..06d5aa31e8 100644 --- a/libavcodec/proresenc_kostya.c +++ b/libavcodec/proresenc_kostya.c @@ -712,10 +712,9 @@ static int est_alpha_diff(int cur, int prev, int abits) return dbits + 1; } -static int estimate_alpha_plane(ProresContext *ctx, int *error, +static int estimate_alpha_plane(ProresContext *ctx, const uint16_t *src, ptrdiff_t linesize, -int mbs_per_slice, int quant, -int16_t *blocks) +int mbs_per_slice, int16_t *blocks) { const int abits = ctx->alpha_bits; const int mask = (1 << abits) - 1; @@ -725,7 +724,6 @@ static int estimate_alpha_plane(ProresContext *ctx, int *error, int run = 0; int bits; -*error = 0; cur = blocks[idx++]; bits = est_alpha_diff(cur, prev, abits); prev = cur; @@ -774,6 +772,7 @@ static int find_slice_quant(AVCodecContext *avctx, int overquant; uint16_t *qmat; int linesize[4], line_add; +int alpha_bits = 0; if (ctx->pictures_per_frame == 1) line_add = 0; @@ -819,9 +818,12 @@ static int find_slice_quant(AVCodecContext *avctx, td->nodes[trellis_node + q].quant = q; } +if (ctx->alpha_bits) +alpha_bits = estimate_alpha_plane(ctx, src, linesize[3], + mbs_per_slice, td->blocks[3]); // todo: maybe perform coarser quantising to fit into frame size when needed for (q = min_quant; q <= max_quant; q++) { -bits = 0; +bits = alpha_bits; error = 0; for (i = 0; i < ctx->num_planes - !!ctx->alpha_bits; i++) { bits += estimate_slice_plane(ctx, &error, i, @@ -830,9 +832,6 @@ static int find_slice_quant(AVCodecContext *avctx, num_cblocks[i], plane_factor[i], ctx->quants[q], td); } -if (ctx->alpha_bits) -bits += estimate_alpha_plane(ctx, &error, src, linesize[3], - mbs_per_slice, q, td->blocks[3]); if (bits > 65000 * 8) error = SCORE_LIMIT; @@ -845,7 +844,7 @@ static int find_slice_quant(AVCodecContext *avctx, overquant = max_quant; } else { for (q = max_quant + 1; q < 128; q++) { -bits = 0; +bits = alpha_bits; error = 0; if (q < MAX_STORED_Q) { qmat = ctx->quants[q]; @@ -861,9 +860,6 @@ static int find_slice_quant(AVCodecContext *avctx, num_cblocks[i], plane_factor[i], qmat, td); } -if (ctx->alpha_bits) -bits += estimate_alpha_plane(ctx, &error, src, linesize[3], - mbs_per_slice, q, td->blocks[3]); if (bits <= ctx->bits_per_mb * mbs_per_slice) break; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/x86/vf_blend : reorganize DIFFERENCE macro to reduce line duplication between 8bit and 16 bit version
ffmpeg | branch: master | Martin Vignali | Sat Mar 17 19:24:49 2018 +0100| [8eb0bb11083320cc12bcc23104a384984c4a9d64] | committer: Martin Vignali avfilter/x86/vf_blend : reorganize DIFFERENCE macro to reduce line duplication between 8bit and 16 bit version > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8eb0bb11083320cc12bcc23104a384984c4a9d64 --- libavfilter/x86/vf_blend.asm | 38 -- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/libavfilter/x86/vf_blend.asm b/libavfilter/x86/vf_blend.asm index 5d9a909192..9cd5ee7acb 100644 --- a/libavfilter/x86/vf_blend.asm +++ b/libavfilter/x86/vf_blend.asm @@ -295,8 +295,9 @@ BLEND_INIT %1, 4, %3 BLEND_END %endmacro -%macro DIFFERENCE 1-2 -BLEND_INIT %1, 5, %2 +; %1 name , %2 src (b or w), %3 inter (w or d), %4 (1 if 16bit, not set if 8 bit) +%macro DIFFERENCE 3-4 +BLEND_INIT %1, 5, %4 pxor m2, m2 .nextrow: movxq, widthq @@ -304,26 +305,19 @@ BLEND_INIT %1, 5, %2 .loop: movum0, [topq + xq] movum1, [bottomq + xq] -%if %0 == 2 ; 16 bit -punpckhwd m3, m0, m2 -punpcklwd m0, m2 -punpckhwd m4, m1, m2 -punpcklwd m1, m2 -psubd m0, m1 -psubd m3, m4 +punpckh%2%3 m3, m0, m2 +punpckl%2%3 m0, m2 +punpckh%2%3 m4, m1, m2 +punpckl%2%3 m1, m2 +psub%3 m0, m1 +psub%3 m3, m4 +%if %0 == 4; 16 bit pabsd m0, m0 pabsd m3, m3 -packusdwm0, m3 %else -punpckhbw m3, m0, m2 -punpcklbw m0, m2 -punpckhbw m4, m1, m2 -punpcklbw m1, m2 -psubw m0, m1 -psubw m3, m4 ABS2m0, m3, m1, m4 -packuswbm0, m3 %endif +packus%3%2 m0, m3 mova [dstq + xq], m0 add xq, mmsize jl .loop @@ -397,7 +391,7 @@ AVERAGE GRAINMERGE HARDMIX PHOENIX phoenix, b -DIFFERENCE difference +DIFFERENCE difference, b, w DIVIDE BLEND_ABS @@ -411,7 +405,7 @@ BLEND_SIMPLE xor_16, xor,1 %endif INIT_XMM ssse3 -DIFFERENCE difference +DIFFERENCE difference, b, w BLEND_ABS INIT_XMM sse4 @@ -419,7 +413,7 @@ INIT_XMM sse4 BLEND_SIMPLE darken_16, minuw, 1 BLEND_SIMPLE lighten_16, maxuw, 1 PHOENIX phoenix_16, w, 1 -DIFFERENCE difference_16, 1 +DIFFERENCE difference_16, w, d, 1 %endif %if HAVE_AVX2_EXTERNAL @@ -439,7 +433,7 @@ GRAINMERGE HARDMIX PHOENIX phoenix, b -DIFFERENCE difference +DIFFERENCE difference, b, w BLEND_ABS %if ARCH_X86_64 @@ -451,6 +445,6 @@ BLEND_SIMPLE or_16, or, 1 BLEND_SIMPLE subtract_16, subusw, 1 BLEND_SIMPLE xor_16, xor,1 PHOENIX phoenix_16, w, 1 -DIFFERENCE difference_16, 1 +DIFFERENCE difference_16, w, d, 1 %endif %endif ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] checkasm/vf_blend : add test for 16 bit version of
ffmpeg | branch: master | Martin Vignali | Sat Mar 17 19:37:46 2018 +0100| [595505083a0211eab97528331125ad28718e8938] | committer: Martin Vignali checkasm/vf_blend : add test for 16 bit version of grainextract grainmerge average extremity negation > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=595505083a0211eab97528331125ad28718e8938 --- tests/checkasm/vf_blend.c | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/checkasm/vf_blend.c b/tests/checkasm/vf_blend.c index 79bdf9f163..912f3a2c38 100644 --- a/tests/checkasm/vf_blend.c +++ b/tests/checkasm/vf_blend.c @@ -124,9 +124,14 @@ void checkasm_check_blend(void) report("8bit"); check_and_report(addition_16, BLEND_ADDITION, 2) +check_and_report(grainmerge_16, BLEND_GRAINMERGE, 2) check_and_report(and_16, BLEND_AND, 2) +check_and_report(average_16, BLEND_AVERAGE, 2) check_and_report(darken_16, BLEND_DARKEN, 2) +check_and_report(grainextract_16, BLEND_GRAINEXTRACT, 2) check_and_report(difference_16, BLEND_DIFFERENCE, 2) +check_and_report(extremity_16, BLEND_EXTREMITY, 2) +check_and_report(negation_16, BLEND_NEGATION, 2) check_and_report(lighten_16, BLEND_LIGHTEN, 2) check_and_report(or_16, BLEND_OR, 2) check_and_report(phoenix_16, BLEND_PHOENIX, 2) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/x86/vf_blend : add SIMD for 16 bit version of
ffmpeg | branch: master | Martin Vignali | Sat Mar 17 19:37:06 2018 +0100| [f3df42e81d367547756e7955e36c8af7c9c18db2] | committer: Martin Vignali avfilter/x86/vf_blend : add SIMD for 16 bit version of grainextract grainmerge average extremity negation > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f3df42e81d367547756e7955e36c8af7c9c18db2 --- libavfilter/x86/vf_blend.asm| 168 ++-- libavfilter/x86/vf_blend_init.c | 20 + 2 files changed, 128 insertions(+), 60 deletions(-) diff --git a/libavfilter/x86/vf_blend.asm b/libavfilter/x86/vf_blend.asm index 9cd5ee7acb..251bbb5a12 100644 --- a/libavfilter/x86/vf_blend.asm +++ b/libavfilter/x86/vf_blend.asm @@ -27,6 +27,8 @@ SECTION_RODATA ps_255: times 4 dd 255.0 +pd_32768 : times 4 dd 32768 +pd_65535 : times 4 dd 65535 pw_1: times 8 dw 1 pw_128: times 8 dw 128 pw_255: times 8 dw 255 @@ -79,26 +81,33 @@ BLEND_INIT %1, 2, %3 BLEND_END %endmacro -%macro GRAINEXTRACT 0 -BLEND_INIT grainextract, 6 +; %1 name , %2 src (b or w), %3 inter (w or d), %4 (1 if 16bit, not set if 8 bit) +%macro GRAINEXTRACT 3-4 +BLEND_INIT %1, 6, %4 pxor m4, m4 +%if %0 == 4 ; 16 bit +VBROADCASTI128 m5, [pd_32768] +%else VBROADCASTI128 m5, [pw_128] +%endif .nextrow: movxq, widthq .loop: movu m1, [topq + xq] movu m3, [bottomq + xq] -punpcklbw m0, m1, m4 -punpckhbw m1, m4 -punpcklbw m2, m3, m4 -punpckhbw m3, m4 -paddw m0, m5 -paddw m1, m5 -psubw m0, m2 -psubw m1, m3 +punpckl%2%3 m0, m1, m4 +punpckh%2%3 m1, m4 +punpckl%2%3 m2, m3, m4 +punpckh%2%3 m3, m4 + +padd%3 m0, m5 +padd%3 m1, m5 +psub%3 m0, m2 +psub%3 m1, m3 + +packus%3%2 m0, m1 -packuswb m0, m1 mova [dstq + xq], m0 addxq, mmsize jl .loop @@ -172,8 +181,9 @@ BLEND_INIT screen, 7 BLEND_END %endmacro -%macro AVERAGE 0 -BLEND_INIT average, 3 +;%1 name, %2 (b or w), %3 (set if 16 bit) +%macro AVERAGE 2-3 +BLEND_INIT %1, 3, %3 pcmpeqbm2, m2 .nextrow: @@ -184,7 +194,7 @@ BLEND_INIT average, 3 movu m1, [bottomq + xq] pxor m0, m2 pxor m1, m2 -pavgb m0, m1 +pavg%2 m0, m1 pxor m0, m2 mova [dstq + xq], m0 addxq, mmsize @@ -192,29 +202,34 @@ BLEND_INIT average, 3 BLEND_END %endmacro - -%macro GRAINMERGE 0 -BLEND_INIT grainmerge, 6 +; %1 name , %2 src (b or w), %3 inter (w or d), %4 (1 if 16bit, not set if 8 bit) +%macro GRAINMERGE 3-4 +BLEND_INIT %1, 6, %4 pxor m4, m4 - +%if %0 == 4 ; 16 bit +VBROADCASTI128 m5, [pd_32768] +%else VBROADCASTI128 m5, [pw_128] +%endif .nextrow: movxq, widthq .loop: movu m1, [topq + xq] movu m3, [bottomq + xq] -punpcklbw m0, m1, m4 -punpckhbw m1, m4 -punpcklbw m2, m3, m4 -punpckhbw m3, m4 -paddw m0, m2 -paddw m1, m3 -psubw m0, m5 -psubw m1, m5 +punpckl%2%3m0, m1, m4 +punpckh%2%3m1, m4 +punpckl%2%3m2, m3, m4 +punpckh%2%3m3, m4 + +padd%3 m0, m2 +padd%3 m1, m3 +psub%3 m0, m5 +psub%3 m1, m5 + +packus%3%2 m0, m1 -packuswb m0, m1 mova [dstq + xq], m0 addxq, mmsize jl .loop @@ -324,52 +339,73 @@ BLEND_INIT %1, 5, %4 BLEND_END %endmacro -%macro BLEND_ABS 0 -BLEND_INIT extremity, 8 +; %1 name , %2 src (b or w), %3 inter (w or d), %4 (1 if 16bit, not set if 8 bit) +%macro EXTREMITY 3-4 +BLEND_INIT %1, 8, %4 pxor m2, m2 +%if %0 == 4; 16 bit +VBROADCASTI128 m4, [pd_65535] +%else VBROADCASTI128 m4, [pw_255] +%endif .nextrow: movxq, widthq .loop: movum0, [topq + xq] movum1, [bottomq + xq] -punpckhbw m5, m0, m2 -punpcklbw m0, m2 -punpckhbw m6, m1, m2 -punpcklbw m1, m2 -psubw m3, m4, m0 -psubw m7, m4, m5 -psubw m3, m1 -psubw m7, m6 +punpckh%2%3 m5, m0, m2 +punpckl%2%3 m0, m2 +punpckh%2%3 m6, m1, m2 +punpckl%2%3 m1, m2 +psub%3 m3, m4, m0 +psub%3 m7, m4, m5 +psub%3 m3, m1 +psub%3 m7, m6 +%if %0 == 4; 16 bit +pabsd m3, m3 +pabsd m7, m7 +%else ABS2m3, m7, m1, m6 -pack
[FFmpeg-cvslog] avcodec/openh264enc.c: generate IDR frame in response to I frame pict_type
ffmpeg | branch: master | Valery Kot | Fri Mar 16 14:50:34 2018 +0100| [67fd8df4197e50720223f9715594a1fa31f48b54] | committer: James Almer avcodec/openh264enc.c: generate IDR frame in response to I frame pict_type Signed-off-by: Valery Kot > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=67fd8df4197e50720223f9715594a1fa31f48b54 --- libavcodec/libopenh264enc.c | 4 1 file changed, 4 insertions(+) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index fdadb101f5..83c3f0ce20 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -246,6 +246,10 @@ static int svc_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, sp.iPicWidth = avctx->width; sp.iPicHeight = avctx->height; +if (frame->pict_type == AV_PICTURE_TYPE_I) { +(*s->encoder)->ForceIntraFrame(s->encoder, true); +} + encoded = (*s->encoder)->EncodeFrame(s->encoder, &sp, &fbi); if (encoded != cmResultSuccess) { av_log(avctx, AV_LOG_ERROR, "EncodeFrame failed\n"); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/mov: Fix parsing of tfdt when using sample descriptors.
ffmpeg | branch: master | Jacob Trimble | Wed Apr 4 12:30:56 2018 -0700| [b08c132a9c590cf5c3905a48b12527765fc91647] | committer: Michael Niedermayer avformat/mov: Fix parsing of tfdt when using sample descriptors. Signed-off-by: Jacob Trimble Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b08c132a9c590cf5c3905a48b12527765fc91647 --- libavformat/mov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index e7c32e6148..97b1462aab 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -4601,7 +4601,7 @@ static int mov_read_tfdt(MOVContext *c, AVIOContext *pb, MOVAtom atom) return AVERROR_INVALIDDATA; } sc = st->priv_data; -if (sc->pseudo_stream_id + 1 != frag->stsd_id) +if (sc->pseudo_stream_id + 1 != frag->stsd_id && sc->pseudo_stream_id != -1) return 0; version = avio_r8(pb); avio_rb24(pb); /* flags */ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc/developer: update link to "sign-off" info
ffmpeg | branch: master | Lou Logan | Thu Apr 5 10:00:42 2018 -0800| [a2356e509184d79ba477ce774bb7be8b6b66f692] | committer: Lou Logan doc/developer: update link to "sign-off" info Found by Hendrik Schreiber. Signed-off-by: Lou Logan > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a2356e509184d79ba477ce774bb7be8b6b66f692 --- doc/developer.texi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/developer.texi b/doc/developer.texi index 66b2463306..0fc9c3f21c 100644 --- a/doc/developer.texi +++ b/doc/developer.texi @@ -562,9 +562,9 @@ Does @code{make fate} pass with the patch applied? Was the patch generated with git format-patch or send-email? @item -Did you sign off your patch? (git commit -s) -See @url{http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob_plain;f=Documentation/SubmittingPatches} for the meaning -of sign off. +Did you sign-off your patch? (@code{git commit -s}) +See @uref{https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/Documentation/process/submitting-patches.rst, Sign your work} for the meaning +of @dfn{sign-off}. @item Did you provide a clear git commit log message? ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/decode: fix warning when decoding pseudo paletted formats
ffmpeg | branch: master | wm4 | Wed Apr 4 18:07:03 2018 +0200| [709e0291d659d089527ec7c048f9b2608183df64] | committer: wm4 avcodec/decode: fix warning when decoding pseudo paletted formats The pseudo palette allocation is optional now. But if it's still allocated (like the internal get_buffer2 implementation does, for compatibility), it shouldn't print a warning. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=709e0291d659d089527ec7c048f9b2608183df64 --- libavcodec/decode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index d883a5f9fc..421a8f1a35 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -1779,6 +1779,8 @@ static void validate_avframe_allocation(AVCodecContext *avctx, AVFrame *frame) int flags = desc ? desc->flags : 0; if (num_planes == 1 && (flags & AV_PIX_FMT_FLAG_PAL)) num_planes = 2; +if ((flags & FF_PSEUDOPAL) && frame->data[1]) +num_planes = 2; for (i = 0; i < num_planes; i++) { av_assert0(frame->data[i]); } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog