[FFmpeg-cvslog] avfilter/vf_hflip : move context func init in ff_hflip_init
ffmpeg | branch: master | Martin Vignali | Mon Dec 11 11:22:56 2017 +0100| [46f534bdee3439a1a803392b83fb867fcbc0adce] | committer: Martin Vignali avfilter/vf_hflip : move context func init in ff_hflip_init > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=46f534bdee3439a1a803392b83fb867fcbc0adce --- libavfilter/hflip.h| 1 + libavfilter/vf_hflip.c | 14 ++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/libavfilter/hflip.h b/libavfilter/hflip.h index cbe1fb3d8c..204090dbb4 100644 --- a/libavfilter/hflip.h +++ b/libavfilter/hflip.h @@ -33,6 +33,7 @@ typedef struct FlipContext { void (*flip_line[4])(const uint8_t *src, uint8_t *dst, int w); } FlipContext; +int ff_hflip_init(FlipContext *s, int step[4], int nb_planes); void ff_hflip_init_x86(FlipContext *s, int step[4], int nb_planes); #endif /* AVFILTER_HFLIP_H */ diff --git a/libavfilter/vf_hflip.c b/libavfilter/vf_hflip.c index 957ddd9900..b77afc77fc 100644 --- a/libavfilter/vf_hflip.c +++ b/libavfilter/vf_hflip.c @@ -131,7 +131,7 @@ static int config_props(AVFilterLink *inlink) const AVPixFmtDescriptor *pix_desc = av_pix_fmt_desc_get(inlink->format); const int hsub = pix_desc->log2_chroma_w; const int vsub = pix_desc->log2_chroma_h; -int nb_planes, i; +int nb_planes; av_image_fill_max_pixsteps(s->max_step, NULL, pix_desc); s->planewidth[0] = s->planewidth[3] = inlink->w; @@ -141,8 +141,15 @@ static int config_props(AVFilterLink *inlink) nb_planes = av_pix_fmt_count_planes(inlink->format); +return ff_hflip_init(s, s->max_step, nb_planes); +} + +int ff_hflip_init(FlipContext *s, int step[4], int nb_planes) +{ +int i; + for (i = 0; i < nb_planes; i++) { -switch (s->max_step[i]) { +switch (step[i]) { case 1: s->flip_line[i] = hflip_byte_c; break; case 2: s->flip_line[i] = hflip_short_c; break; case 3: s->flip_line[i] = hflip_b24_c; break; @@ -153,9 +160,8 @@ static int config_props(AVFilterLink *inlink) return AVERROR_BUG; } } - if (ARCH_X86) -ff_hflip_init_x86(s, s->max_step, nb_planes); +ff_hflip_init_x86(s, step, nb_planes); return 0; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] checkasm/vf_hflip : add test for vf_hflip byte and short simd
ffmpeg | branch: master | Martin Vignali | Mon Dec 11 11:26:44 2017 +0100| [cefb7e00608d691e7c0396c636195135c55ce231] | committer: Martin Vignali checkasm/vf_hflip : add test for vf_hflip byte and short simd > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cefb7e00608d691e7c0396c636195135c55ce231 --- tests/checkasm/Makefile | 1 + tests/checkasm/checkasm.c | 3 ++ tests/checkasm/checkasm.h | 1 + tests/checkasm/vf_hflip.c | 76 +++ tests/fate/checkasm.mak | 1 + 5 files changed, 82 insertions(+) diff --git a/tests/checkasm/Makefile b/tests/checkasm/Makefile index f35359daa9..3525094545 100644 --- a/tests/checkasm/Makefile +++ b/tests/checkasm/Makefile @@ -32,6 +32,7 @@ CHECKASMOBJS-$(CONFIG_AVCODEC) += $(AVCODECOBJS-yes) # libavfilter tests AVFILTEROBJS-$(CONFIG_BLEND_FILTER) += vf_blend.o AVFILTEROBJS-$(CONFIG_COLORSPACE_FILTER) += vf_colorspace.o +AVFILTEROBJS-$(CONFIG_HFLIP_FILTER) += vf_hflip.o AVFILTEROBJS-$(CONFIG_THRESHOLD_FILTER) += vf_threshold.o CHECKASMOBJS-$(CONFIG_AVFILTER) += $(AVFILTEROBJS-yes) diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c index 384092a2e4..45a70aa87f 100644 --- a/tests/checkasm/checkasm.c +++ b/tests/checkasm/checkasm.c @@ -152,6 +152,9 @@ static const struct { #if CONFIG_COLORSPACE_FILTER { "vf_colorspace", checkasm_check_colorspace }, #endif +#if CONFIG_HFLIP_FILTER +{ "vf_hflip", checkasm_check_vf_hflip }, +#endif #if CONFIG_THRESHOLD_FILTER { "vf_threshold", checkasm_check_vf_threshold }, #endif diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h index 8fe42d5750..cfe9bfb355 100644 --- a/tests/checkasm/checkasm.h +++ b/tests/checkasm/checkasm.h @@ -65,6 +65,7 @@ void checkasm_check_sbrdsp(void); void checkasm_check_synth_filter(void); void checkasm_check_utvideodsp(void); void checkasm_check_v210enc(void); +void checkasm_check_vf_hflip(void); void checkasm_check_vf_threshold(void); void checkasm_check_vp8dsp(void); void checkasm_check_vp9dsp(void); diff --git a/tests/checkasm/vf_hflip.c b/tests/checkasm/vf_hflip.c new file mode 100644 index 00..6bb4d09d64 --- /dev/null +++ b/tests/checkasm/vf_hflip.c @@ -0,0 +1,76 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 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 General Public License for more details. + * + * You should have received a copy of the GNU 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. + */ + +#include +#include "checkasm.h" +#include "libavfilter/hflip.h" +#include "libavutil/intreadwrite.h" + +#define WIDTH 256 +#define WIDTH_PADDED 256 + 32 + +#define randomize_buffers(buf, size) \ +do { \ +int j;\ +uint8_t *tmp_buf = (uint8_t *)buf;\ +for (j = 0; j < size; j++)\ +tmp_buf[j] = rnd() & 0xFF;\ +} while (0) + +static void check_hflip(int step, const char * report_name){ +LOCAL_ALIGNED_32(uint8_t, src, [WIDTH_PADDED]); +LOCAL_ALIGNED_32(uint8_t, dst_ref, [WIDTH_PADDED]); +LOCAL_ALIGNED_32(uint8_t, dst_new, [WIDTH_PADDED]); +int w = WIDTH; +int i; +int step_array[4] = {1, 1, 1, 1}; +FlipContext s; + +declare_func(void, const uint8_t *src, uint8_t *dst, int w); + +memset(src, 0, WIDTH_PADDED); +memset(dst_ref, 0, WIDTH_PADDED); +memset(dst_new, 0, WIDTH_PADDED); +randomize_buffers(src, WIDTH_PADDED); + +if (step == 2) { +w /= 2; +for (i = 0; i < 4; i++) +step_array[i] = step; +} + +ff_hflip_init(&s, step_array, 4); + +if (check_func(s.flip_line[0], "hflip_%s", report_name)) { +for (i = 1; i < w; i++) { +call_ref(src + (w - 1) * step, dst_ref, i); +call_new(src + (w - 1) * step, dst_new, i); +if (memcmp(dst_ref, dst_new, i * step)) +fail(); +} +bench_new(src + (w - 1) * step, dst_new, w); +} +} +void checkasm_check_vf_hflip(void) +{ +check_hflip(1, "byte"); +report("hflip_byte"); + +check_hflip(2, "short"); +report("hflip_short"); +} diff --git a/tests/fate/checkasm.mak b/tests/fate/checkasm.mak index 3db745366c..9216c71cb8 100644 --- a/tests/fate/checkasm.mak +++ b/tests/fate/checkasm.mak @@ -22,6 +22,7 @@ FATE_CHECKASM = fate-checkasm-aacpsdsp \
[FFmpeg-cvslog] libavfilter/af_dcshift.c: Fixed repeated spelling error
ffmpeg | branch: master | Kelly Ledford | Tue Dec 12 11:31:23 2017 -0800| [bc219082bb04b9a4725bfe7e78ce0950244e6e84] | committer: Michael Niedermayer libavfilter/af_dcshift.c: Fixed repeated spelling error 'threshhold' should be 'threshold' Signed-off-by: Kelly Ledford Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bc219082bb04b9a4725bfe7e78ce0950244e6e84 --- libavfilter/af_dcshift.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libavfilter/af_dcshift.c b/libavfilter/af_dcshift.c index 6d33daee0b..e007efe05e 100644 --- a/libavfilter/af_dcshift.c +++ b/libavfilter/af_dcshift.c @@ -28,7 +28,7 @@ typedef struct DCShiftContext { const AVClass *class; double dcshift; -double limiterthreshhold; +double limiterthreshold; double limitergain; } DCShiftContext; @@ -47,7 +47,7 @@ static av_cold int init(AVFilterContext *ctx) { DCShiftContext *s = ctx->priv; -s->limiterthreshhold = INT32_MAX * (1.0 - (fabs(s->dcshift) - s->limitergain)); +s->limiterthreshold = INT32_MAX * (1.0 - (fabs(s->dcshift) - s->limitergain)); return 0; } @@ -111,14 +111,14 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) d = src[j]; -if (d > s->limiterthreshhold && dcshift > 0) { -d = (d - s->limiterthreshhold) * s->limitergain / - (INT32_MAX - s->limiterthreshhold) + - s->limiterthreshhold + dcshift; -} else if (d < -s->limiterthreshhold && dcshift < 0) { -d = (d + s->limiterthreshhold) * s->limitergain / - (INT32_MAX - s->limiterthreshhold) - - s->limiterthreshhold + dcshift; +if (d > s->limiterthreshold && dcshift > 0) { +d = (d - s->limiterthreshold) * s->limitergain / + (INT32_MAX - s->limiterthreshold) + + s->limiterthreshold + dcshift; +} else if (d < -s->limiterthreshold && dcshift < 0) { +d = (d + s->limiterthreshold) * s->limitergain / + (INT32_MAX - s->limiterthreshold) - + s->limiterthreshold + dcshift; } else { d = dcshift * INT32_MAX + d; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] patcheck: Add 'threshhold' to common typo list
ffmpeg | branch: master | Kelly Ledford | Tue Dec 12 11:31:24 2017 -0800| [309ddcbe61662282d91098029e7f9796acec208c] | committer: Michael Niedermayer patcheck: Add 'threshhold' to common typo list Signed-off-by: Kelly Ledford Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=309ddcbe61662282d91098029e7f9796acec208c --- tools/patcheck | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/patcheck b/tools/patcheck index 26137d6b21..101a542ff3 100755 --- a/tools/patcheck +++ b/tools/patcheck @@ -68,7 +68,7 @@ $EGREP $OPT '^\+ *(const *|)static' $*| $EGREP --color=always '[^=]= *(0|NULL)[^ cat $TMP hiegrep '# *ifdef * (HAVE|CONFIG)_' 'ifdefs that should be #if' $* -hiegrep '\b(awnser|cant|dont|wont|doesnt|usefull|successfull|occured|teh|alot|wether|skiped|skiping|heigth|informations|colums|loosy|loosing|ouput|seperate|preceed|upto|paket|posible|unkown|inpossible|dimention|acheive|funtions|overriden|outputing|seperation|initalize|compatibilty|bistream|knwon|unknwon|choosen|additonal|gurantee|availble|wich|begining|milisecond|missmatch)\b' 'common typos' $* +hiegrep '\b(awnser|cant|dont|wont|doesnt|usefull|successfull|occured|teh|alot|wether|skiped|skiping|heigth|informations|colums|loosy|loosing|ouput|seperate|preceed|upto|paket|posible|unkown|inpossible|dimention|acheive|funtions|overriden|outputing|seperation|initalize|compatibilty|bistream|knwon|unknwon|choosen|additonal|gurantee|availble|wich|begining|milisecond|missmatch|threshhold)\b' 'common typos' $* hiegrep 'av_log\( *NULL' 'Missing context in av_log' $* hiegrep '[^sn]printf' 'Please use av_log' $* ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] ivfenc: add AV1 support
ffmpeg | branch: master | Tristan Matthews | Sun Dec 10 18:28:50 2017 -0500| [e8f0a463b0d27a4d74c0d9f1857e72a8033d1069] | committer: Rostislav Pehlivanov ivfenc: add AV1 support libaom tools work with ivf files. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e8f0a463b0d27a4d74c0d9f1857e72a8033d1069 --- libavformat/ivfenc.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libavformat/ivfenc.c b/libavformat/ivfenc.c index fdc0ee03e1..f591327a21 100644 --- a/libavformat/ivfenc.c +++ b/libavformat/ivfenc.c @@ -37,14 +37,17 @@ static int ivf_write_header(AVFormatContext *s) } par = s->streams[0]->codecpar; if (par->codec_type != AVMEDIA_TYPE_VIDEO || -!(par->codec_id == AV_CODEC_ID_VP8 || par->codec_id == AV_CODEC_ID_VP9)) { -av_log(s, AV_LOG_ERROR, "Currently only VP8 and VP9 are supported!\n"); +!(par->codec_id == AV_CODEC_ID_VP8 || par->codec_id == AV_CODEC_ID_VP9 || + par->codec_id == AV_CODEC_ID_AV1)) { +av_log(s, AV_LOG_ERROR, "Currently only VP8, VP9 and AV1 are supported!\n"); return AVERROR(EINVAL); } avio_write(pb, "DKIF", 4); avio_wl16(pb, 0); // version avio_wl16(pb, 32); // header length -avio_wl32(pb, par->codec_tag ? par->codec_tag : par->codec_id == AV_CODEC_ID_VP9 ? AV_RL32("VP90") : AV_RL32("VP80")); +avio_wl32(pb, par->codec_tag ? par->codec_tag : + par->codec_id == AV_CODEC_ID_VP9 ? AV_RL32("VP90") : + par->codec_id == AV_CODEC_ID_VP8 ? AV_RL32("VP80") : AV_RL32("AV01")); avio_wl16(pb, par->width); avio_wl16(pb, par->height); avio_wl32(pb, s->streams[0]->time_base.den); @@ -100,6 +103,7 @@ static int ivf_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt) static const AVCodecTag codec_ivf_tags[] = { { AV_CODEC_ID_VP8, MKTAG('V', 'P', '8', '0') }, { AV_CODEC_ID_VP9, MKTAG('V', 'P', '9', '0') }, +{ AV_CODEC_ID_AV1, MKTAG('A', 'V', '0', '1') }, { AV_CODEC_ID_NONE, 0 } }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] libavcodec/decode: remove duplicate includes
ffmpeg | branch: master | Michael Niedermayer | Wed Dec 13 21:51:31 2017 +0100| [f7617d4b83c08958b373324d270c0504aa1be8ee] | committer: Michael Niedermayer libavcodec/decode: remove duplicate includes Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f7617d4b83c08958b373324d270c0504aa1be8ee --- libavcodec/decode.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/libavcodec/decode.h b/libavcodec/decode.h index 424e85e914..15271c529a 100644 --- a/libavcodec/decode.h +++ b/libavcodec/decode.h @@ -23,9 +23,6 @@ #include "libavutil/buffer.h" #include "libavutil/frame.h" - -#include "libavutil/buffer.h" -#include "libavutil/frame.h" #include "libavutil/hwcontext.h" #include "avcodec.h" ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavf/mpegts: mark packets with TEI flag as corrupted
ffmpeg | branch: master | Rodger Combs | Thu Oct 19 01:58:10 2017 -0500| [2e391a576c1fc2e8816990924c6e4c21ccf75a82] | committer: Rodger Combs lavf/mpegts: mark packets with TEI flag as corrupted > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2e391a576c1fc2e8816990924c6e4c21ccf75a82 --- libavformat/mpegts.c | 8 1 file changed, 8 insertions(+) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 53cbcfb543..0a3ad05726 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -2296,6 +2296,14 @@ static int handle_packet(MpegTSContext *ts, const uint8_t *packet) } } +if (packet[1] & 0x80) { +av_log(ts->stream, AV_LOG_DEBUG, "Packet had TEI flag set; marking as corrupt\n"); +if (tss->type == MPEGTS_PES) { +PESContext *pc = tss->u.pes_filter.opaque; +pc->flags |= AV_PKT_FLAG_CORRUPT; +} +} + p = packet + 4; if (has_adaptation) { int64_t pcr_h; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog