From patchwork Sat Apr 18 22:37:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 19076 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id D9FB944BAB4 for ; Sun, 19 Apr 2020 01:58:03 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B97B068B86B; Sun, 19 Apr 2020 01:58:03 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe06-3.mx.upcmail.net (vie01a-dmta-pe06-3.mx.upcmail.net [84.116.36.16]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8B0F068B7A7 for ; Sun, 19 Apr 2020 01:57:57 +0300 (EEST) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe06.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1jPw6q-00014r-2m for ffmpeg-devel@ffmpeg.org; Sun, 19 Apr 2020 00:38:48 +0200 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id Pw5rjFrZ06Jy6Pw5rjUvIw; Sun, 19 Apr 2020 00:37:47 +0200 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.3 cv=GKl27dFK c=1 sm=1 tr=0 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=TeiCpzSft4vvAhOGoNgA:9 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 19 Apr 2020 00:37:44 +0200 Message-Id: <20200418223747.1211-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 X-CMAE-Envelope: MS4wfE1+ePbq4AX9kdJ+HKhCPmjWNy7lpE2fb2vpAa1a+1sGMDLiYu/hy3watmP3ojeUdSe9An485Mim4r2XPA7xeBtmPK/tlIYg4gHF19yUTQyhoIQOutW2 CwQnJ8/9csRnBDQyPKdmiDWJV8LC2xq4mjxNPTRugcesWmHJuFer2y1a Subject: [FFmpeg-devel] [PATCH 1/4] avfilter/vf_spp: Remove unused AVCodecContext X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Michael Niedermayer --- libavfilter/vf_spp.c | 7 +------ libavfilter/vf_spp.h | 2 -- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/libavfilter/vf_spp.c b/libavfilter/vf_spp.c index 7381938f7f..1b934aa9d7 100644 --- a/libavfilter/vf_spp.c +++ b/libavfilter/vf_spp.c @@ -460,9 +460,8 @@ static av_cold int init_dict(AVFilterContext *ctx, AVDictionary **opts) SPPContext *s = ctx->priv; int ret; - s->avctx = avcodec_alloc_context3(NULL); s->dct = avcodec_dct_alloc(); - if (!s->avctx || !s->dct) + if (!s->dct) return AVERROR(ENOMEM); if (opts) { @@ -489,10 +488,6 @@ static av_cold void uninit(AVFilterContext *ctx) av_freep(&s->temp); av_freep(&s->src); - if (s->avctx) { - avcodec_close(s->avctx); - av_freep(&s->avctx); - } av_freep(&s->dct); av_freep(&s->non_b_qp_table); } diff --git a/libavfilter/vf_spp.h b/libavfilter/vf_spp.h index c03073a4e1..879ed40f03 100644 --- a/libavfilter/vf_spp.h +++ b/libavfilter/vf_spp.h @@ -22,7 +22,6 @@ #ifndef AVFILTER_SPP_H #define AVFILTER_SPP_H -#include "libavcodec/avcodec.h" #include "libavcodec/avdct.h" #include "avfilter.h" @@ -38,7 +37,6 @@ typedef struct SPPContext { int temp_linesize; uint8_t *src; uint16_t *temp; - AVCodecContext *avctx; AVDCT *dct; int8_t *non_b_qp_table; int non_b_qp_alloc_size; From patchwork Sat Apr 18 22:37:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 19075 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 6A61C448768 for ; Sun, 19 Apr 2020 01:44:30 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3F1AF68B821; Sun, 19 Apr 2020 01:44:30 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe02-2.mx.upcmail.net (vie01a-dmta-pe02-2.mx.upcmail.net [62.179.121.158]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D925968B5FA for ; Sun, 19 Apr 2020 01:44:23 +0300 (EEST) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe02.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1jPw6q-0005D6-2m for ffmpeg-devel@ffmpeg.org; Sun, 19 Apr 2020 00:38:48 +0200 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id Pw5sjFra06Jy6Pw5sjUvJD; Sun, 19 Apr 2020 00:37:48 +0200 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.3 cv=GKl27dFK c=1 sm=1 tr=0 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=TcOyT9ENJ9u_gle8Tu0A:9 a=pHzHmUro8NiASowvMSCR:22 a=xoEH_sTeL_Rfw54TyV31:22 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 19 Apr 2020 00:37:45 +0200 Message-Id: <20200418223747.1211-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200418223747.1211-1-michael@niedermayer.cc> References: <20200418223747.1211-1-michael@niedermayer.cc> X-CMAE-Envelope: MS4wfE1+ePbq4AX9kdJ+HKhCPmjWNy7lpE2fb2vpAa1a+1sGMDLiYu/hy3watmP3ojeUdSe9An485Mim4r2XPA7xeBtmPK/tlIYg4gHF19yUTQyhoIQOutW2 CwQnJ8/9csRnBDQyPKdmiDWJV8LC2xq4mjxNPTRugcesWmHJuFer2y1a Subject: [FFmpeg-devel] [PATCH 2/4] avfilter/vf_spp: Fix endian-dependance in add_block() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Michael Niedermayer --- libavfilter/vf_spp.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_spp.c b/libavfilter/vf_spp.c index 1b934aa9d7..6bee91b309 100644 --- a/libavfilter/vf_spp.c +++ b/libavfilter/vf_spp.c @@ -223,10 +223,14 @@ static inline void add_block(uint16_t *dst, int linesize, const int16_t block[64 int y; for (y = 0; y < 8; y++) { - *(uint32_t *)&dst[0 + y*linesize] += *(uint32_t *)&block[0 + y*8]; - *(uint32_t *)&dst[2 + y*linesize] += *(uint32_t *)&block[2 + y*8]; - *(uint32_t *)&dst[4 + y*linesize] += *(uint32_t *)&block[4 + y*8]; - *(uint32_t *)&dst[6 + y*linesize] += *(uint32_t *)&block[6 + y*8]; + dst[0 + y*linesize] += block[0 + y*8]; + dst[1 + y*linesize] += block[1 + y*8]; + dst[2 + y*linesize] += block[2 + y*8]; + dst[3 + y*linesize] += block[3 + y*8]; + dst[4 + y*linesize] += block[4 + y*8]; + dst[5 + y*linesize] += block[5 + y*8]; + dst[6 + y*linesize] += block[6 + y*8]; + dst[7 + y*linesize] += block[7 + y*8]; } } From patchwork Sat Apr 18 22:37:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 19073 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 94679449626 for ; Sun, 19 Apr 2020 01:38:55 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7A3C568B86B; Sun, 19 Apr 2020 01:38:55 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe01-3.mx.upcmail.net (vie01a-dmta-pe01-3.mx.upcmail.net [62.179.121.156]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F343C68B7D3 for ; Sun, 19 Apr 2020 01:38:48 +0300 (EEST) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe01.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1jPw6q-0006wv-2m for ffmpeg-devel@ffmpeg.org; Sun, 19 Apr 2020 00:38:48 +0200 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id Pw5sjFra76Jy6Pw5sjUvJG; Sun, 19 Apr 2020 00:37:48 +0200 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.3 cv=GKl27dFK c=1 sm=1 tr=0 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=llujQ9FM6-Bu4rm-zhcA:9 a=pHzHmUro8NiASowvMSCR:22 a=Ew2E2A-JSTLzCXPT_086:22 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 19 Apr 2020 00:37:46 +0200 Message-Id: <20200418223747.1211-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200418223747.1211-1-michael@niedermayer.cc> References: <20200418223747.1211-1-michael@niedermayer.cc> X-CMAE-Envelope: MS4wfE1+ePbq4AX9kdJ+HKhCPmjWNy7lpE2fb2vpAa1a+1sGMDLiYu/hy3watmP3ojeUdSe9An485Mim4r2XPA7xeBtmPK/tlIYg4gHF19yUTQyhoIQOutW2 CwQnJ8/9csRnBDQyPKdmiDWJV8LC2xq4mjxNPTRugcesWmHJuFer2y1a Subject: [FFmpeg-devel] [PATCH 3/4] tests: Add pp7, spp tests based on pp test X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- tests/fate/filter-video.mak | 8 ++++++++ tests/ref/fate/filter-pp7 | 10 ++++++++++ tests/ref/fate/filter-spp | 10 ++++++++++ 3 files changed, 28 insertions(+) create mode 100644 tests/ref/fate/filter-pp7 create mode 100644 tests/ref/fate/filter-spp diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak index 2da27f714a..bca5e3510a 100644 --- a/tests/fate/filter-video.mak +++ b/tests/fate/filter-video.mak @@ -543,6 +543,14 @@ fate-filter-pp4: CMD = video_filter "pp=be/ci" fate-filter-pp5: CMD = video_filter "pp=md" fate-filter-pp6: CMD = video_filter "pp=be/fd" +FATE_FILTER_VSYNTH-$(CONFIG_PP7_FILTER) += fate-filter-pp7 +fate-filter-pp7: fate-vsynth1-mpeg4-qprd +fate-filter-pp7: CMD = framecrc -flags bitexact -idct simple -i $(TARGET_PATH)/tests/data/fate/vsynth1-mpeg4-qprd.avi -frames:v 5 -flags +bitexact -vf "pp7" + +FATE_FILTER_VSYNTH-$(CONFIG_SPP_FILTER) += fate-filter-spp +fate-filter-spp: fate-vsynth1-mpeg4-qprd +fate-filter-spp: CMD = framecrc -flags bitexact -idct simple -i $(TARGET_PATH)/tests/data/fate/vsynth1-mpeg4-qprd.avi -frames:v 5 -flags +bitexact -vf "spp=idct=simple:dct=int" + FATE_FILTER_VSYNTH-$(call ALLYES, QP_FILTER PP_FILTER) += fate-filter-qp fate-filter-qp: CMD = video_filter "qp=17,pp=be/hb/vb/tn/l5/al" diff --git a/tests/ref/fate/filter-pp7 b/tests/ref/fate/filter-pp7 new file mode 100644 index 0000000000..d8eefe98ac --- /dev/null +++ b/tests/ref/fate/filter-pp7 @@ -0,0 +1,10 @@ +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 352x288 +#sar 0: 1/1 +0, 1, 1, 1, 152064, 0x4c5d7fe0 +0, 2, 2, 1, 152064, 0xc8857ae1 +0, 3, 3, 1, 152064, 0x3232f092 +0, 4, 4, 1, 152064, 0x5bc481c7 +0, 5, 5, 1, 152064, 0x91fec184 diff --git a/tests/ref/fate/filter-spp b/tests/ref/fate/filter-spp new file mode 100644 index 0000000000..e32159a702 --- /dev/null +++ b/tests/ref/fate/filter-spp @@ -0,0 +1,10 @@ +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 352x288 +#sar 0: 1/1 +0, 1, 1, 1, 152064, 0xecd18291 +0, 2, 2, 1, 152064, 0xea34708a +0, 3, 3, 1, 152064, 0xd73debe7 +0, 4, 4, 1, 152064, 0x47f57fbb +0, 5, 5, 1, 152064, 0x508dba95 From patchwork Sat Apr 18 22:37:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 19072 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id C1FEE449626 for ; Sun, 19 Apr 2020 01:38:54 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A1BAC68B83C; Sun, 19 Apr 2020 01:38:54 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe01-3.mx.upcmail.net (vie01a-dmta-pe01-3.mx.upcmail.net [62.179.121.156]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 01A6E68B813 for ; Sun, 19 Apr 2020 01:38:48 +0300 (EEST) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe01.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1jPw6q-000755-2r for ffmpeg-devel@ffmpeg.org; Sun, 19 Apr 2020 00:38:48 +0200 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id Pw5sjFraJ6Jy6Pw5sjUvJK; Sun, 19 Apr 2020 00:37:48 +0200 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.3 cv=GKl27dFK c=1 sm=1 tr=0 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=zpPHUV9X5XnFOfp_fVMA:9 a=pHzHmUro8NiASowvMSCR:22 a=Ew2E2A-JSTLzCXPT_086:22 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 19 Apr 2020 00:37:47 +0200 Message-Id: <20200418223747.1211-4-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200418223747.1211-1-michael@niedermayer.cc> References: <20200418223747.1211-1-michael@niedermayer.cc> X-CMAE-Envelope: MS4wfE1+ePbq4AX9kdJ+HKhCPmjWNy7lpE2fb2vpAa1a+1sGMDLiYu/hy3watmP3ojeUdSe9An485Mim4r2XPA7xeBtmPK/tlIYg4gHF19yUTQyhoIQOutW2 CwQnJ8/9csRnBDQyPKdmiDWJV8LC2xq4mjxNPTRugcesWmHJuFer2y1a Subject: [FFmpeg-devel] [PATCH 4/4] test: Add codecview test X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- tests/fate/filter-video.mak | 4 ++++ tests/ref/fate/filter-codecview | 10 ++++++++++ 2 files changed, 14 insertions(+) create mode 100644 tests/ref/fate/filter-codecview diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak index bca5e3510a..0e8ca110a1 100644 --- a/tests/fate/filter-video.mak +++ b/tests/fate/filter-video.mak @@ -551,6 +551,10 @@ FATE_FILTER_VSYNTH-$(CONFIG_SPP_FILTER) += fate-filter-spp fate-filter-spp: fate-vsynth1-mpeg4-qprd fate-filter-spp: CMD = framecrc -flags bitexact -idct simple -i $(TARGET_PATH)/tests/data/fate/vsynth1-mpeg4-qprd.avi -frames:v 5 -flags +bitexact -vf "spp=idct=simple:dct=int" +FATE_FILTER_VSYNTH-$(CONFIG_CODECVIEW_FILTER) += fate-filter-codecview +fate-filter-codecview: fate-vsynth1-mpeg4-qprd +fate-filter-codecview: CMD = framecrc -flags bitexact -idct simple -flags2 +export_mvs -i $(TARGET_PATH)/tests/data/fate/vsynth1-mpeg4-qprd.avi -frames:v 5 -flags +bitexact -vf codecview=mv=pf+bf+bb + FATE_FILTER_VSYNTH-$(call ALLYES, QP_FILTER PP_FILTER) += fate-filter-qp fate-filter-qp: CMD = video_filter "qp=17,pp=be/hb/vb/tn/l5/al" diff --git a/tests/ref/fate/filter-codecview b/tests/ref/fate/filter-codecview new file mode 100644 index 0000000000..4f6ba741ae --- /dev/null +++ b/tests/ref/fate/filter-codecview @@ -0,0 +1,10 @@ +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 352x288 +#sar 0: 1/1 +0, 1, 1, 1, 152064, 0x69a58723 +0, 2, 2, 1, 152064, 0xb42d52c3 +0, 3, 3, 1, 152064, 0x9376ce65 +0, 4, 4, 1, 152064, 0x796543f9 +0, 5, 5, 1, 152064, 0x5027b118