From 0b22107d95042793a897b6a8823fe43bd55d68de Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Tue, 15 Jan 2013 16:06:00 +0100 Subject: [PATCH 1/3] rv34_parser: Adjust #if for disabling individual parsers As CONFIG_ values are always defined, they have to be checked via #if. --- libavcodec/rv34_parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/rv34_parser.c b/libavcodec/rv34_parser.c index ccb431426c..8af74431c0 100644 --- a/libavcodec/rv34_parser.c +++ b/libavcodec/rv34_parser.c @@ -76,7 +76,7 @@ static int rv34_parse(AVCodecParserContext *s, return buf_size; } -#ifdef CONFIG_RV30_PARSER +#if CONFIG_RV30_PARSER AVCodecParser ff_rv30_parser = { .codec_ids = { AV_CODEC_ID_RV30 }, .priv_data_size = sizeof(RV34ParseContext), @@ -84,7 +84,7 @@ AVCodecParser ff_rv30_parser = { }; #endif -#ifdef CONFIG_RV40_PARSER +#if CONFIG_RV40_PARSER AVCodecParser ff_rv40_parser = { .codec_ids = { AV_CODEC_ID_RV40 }, .priv_data_size = sizeof(RV34ParseContext), From 23098bbd509346708b998094daf1dd98339fbc4b Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Mon, 14 Jan 2013 13:43:15 -0500 Subject: [PATCH 2/3] vf_fps: add final flushed frames to the dropped frame count --- libavfilter/vf_fps.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c index dc20114804..8fd51bd42e 100644 --- a/libavfilter/vf_fps.c +++ b/libavfilter/vf_fps.c @@ -104,6 +104,7 @@ static av_cold void uninit(AVFilterContext *ctx) { FPSContext *s = ctx->priv; if (s->fifo) { + s->drop += av_fifo_size(s->fifo) / sizeof(AVFilterBufferRef*); flush_fifo(s->fifo); av_fifo_free(s->fifo); } From dae1d507af94261bafd3b11549884e5d1eca590e Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Fri, 27 Jul 2012 14:26:09 +0200 Subject: [PATCH 3/3] x86: Add PAVGB macro to abstract pavgb/pavgusb instruction via cpuflags --- libavcodec/x86/h264_chromamc.asm | 7 ++----- libavutil/x86/x86util.asm | 8 ++++++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/libavcodec/x86/h264_chromamc.asm b/libavcodec/x86/h264_chromamc.asm index 1be37dec78..440a473c6f 100644 --- a/libavcodec/x86/h264_chromamc.asm +++ b/libavcodec/x86/h264_chromamc.asm @@ -427,11 +427,11 @@ cglobal %1_%2_chroma_mc2, 6, 7, 0 %macro NOTHING 2-3 %endmacro %macro DIRECT_AVG 2 - PAVG %1, %2 + PAVGB %1, %2 %endmacro %macro COPY_AVG 3 movd %2, %3 - PAVG %1, %2 + PAVGB %1, %2 %endmacro INIT_MMX mmx @@ -448,7 +448,6 @@ chroma_mc2_mmx_func put, h264 %define CHROMAMC_AVG DIRECT_AVG %define CHROMAMC_AVG4 COPY_AVG -%define PAVG pavgb chroma_mc8_mmx_func avg, h264, _rnd chroma_mc8_mmx_func avg, vc1, _nornd chroma_mc8_mmx_func avg, rv40 @@ -456,7 +455,6 @@ chroma_mc4_mmx_func avg, h264 chroma_mc4_mmx_func avg, rv40 chroma_mc2_mmx_func avg, h264 -%define PAVG pavgusb INIT_MMX 3dnow chroma_mc8_mmx_func avg, h264, _rnd chroma_mc8_mmx_func avg, vc1, _nornd @@ -673,7 +671,6 @@ INIT_MMX ssse3 chroma_mc4_ssse3_func put, h264 %define CHROMAMC_AVG DIRECT_AVG -%define PAVG pavgb INIT_XMM ssse3 chroma_mc8_ssse3_func avg, h264, _rnd chroma_mc8_ssse3_func avg, vc1, _nornd diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm index 2f818fe61e..551c40a4b5 100644 --- a/libavutil/x86/x86util.asm +++ b/libavutil/x86/x86util.asm @@ -301,6 +301,14 @@ %endif %endmacro +%macro PAVGB 2 +%if cpuflag(mmxext) + pavgb %1, %2 +%elif cpuflag(3dnow) + pavgusb %1, %2 +%endif +%endmacro + %macro PSHUFLW 1+ %if mmsize == 8 pshufw %1