Re: [FFmpeg-devel] [PATCH 1/2] checkasm: add sbrdsp tests
On 7/5/2017 7:52 AM, Hendrik Leppkes wrote: > On Wed, Jul 5, 2017 at 11:40 AM, Paul B Maholwrote: >> >> I get segfauls in sbrdsp code after some recent commit. > > Indeed, fate also shows almost all AAC tests failing on x86_64 systems. > > - Hendrik Yeah, got a bit overzealous in an unrelated commit with some micro-optimization that didn't break checkasm. Should be reverted now, sorry for dropping the yellow paint bucket on fate. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] checkasm: add sbrdsp tests
On Wed, Jul 5, 2017 at 11:40 AM, Paul B Maholwrote: > On 7/5/17, James Almer wrote: >> On 7/4/2017 10:45 PM, Michael Niedermayer wrote: >>> On Tue, Jul 04, 2017 at 03:15:56PM -0300, James Almer wrote: On 7/4/2017 2:31 PM, Michael Niedermayer wrote: > On Mon, Jul 03, 2017 at 02:32:28PM +0200, Matthieu Bouron wrote: >> On Fri, Jun 30, 2017 at 05:16:37PM +0200, Matthieu Bouron wrote: >>> On Fri, Jun 30, 2017 at 03:55:52PM +0200, Michael Niedermayer wrote: On Thu, Jun 29, 2017 at 10:53:06PM -0300, James Almer wrote: > On 6/29/2017 10:14 PM, Henrik Gramner wrote: >> On Fri, Jun 30, 2017 at 1:58 AM, Michael Niedermayer >> wrote: >>> Program received signal SIGSEGV, Segmentation fault. >>> 0x00684919 in ff_sbr_hf_gen_sse () >> >>>0x00684909 : sub%r9,%r8 >> >>> => 0x00684919 : movaps >>> (%rsi,%r8,1),%xmm0 >> >>> r9 0xdeadbeef0080 -2401053092612145024 >> >> Another case of a 32-bit int being used as part of a 64-bit >> operation. > > I can't reproduce it on my ArchLinux x86_64 environment for some > reason, > but based on what you said i assume the attached patch should fix > it. no crash occurs here with this, so it seems fixed >>> >>> Should i push the patchset or wait a little bit longer ? >> >> Patchset applied. > > it seems theres some issue still in this: > > checkasm: using random seed 3655967467 > MMX: > - audiodsp.audiodsp [OK] > - blockdsp.blockdsp [OK] > - h264dsp.idct [OK] > - h264pred.pred4x4 [OK] > - h264pred.pred8x8 [OK] > - h264pred.pred16x16[OK] > - pixblockdsp.get_pixels[OK] > - pixblockdsp.diff_pixels [OK] > - vp8dsp.idct [OK] > - vp8dsp.mc [OK] > - vp9dsp.ipred [OK] > - vp9dsp.itxfm [OK] > - vp9dsp.mc [OK] > MMXEXT: > - audiodsp.audiodsp [OK] > - h264dsp.idct [OK] > - h264pred.pred4x4 [OK] > - h264pred.pred8x8 [OK] > - h264pred.pred16x16[OK] > - h264pred.pred8x8l [OK] > - h264qpel.put [OK] > - h264qpel.avg [OK] > - hevc_add_res.add_residual [OK] > - hevc_idct.idct_dc [OK] > - vp8dsp.mc [OK] > - vp9dsp.ipred [OK] > - vp9dsp.itxfm [OK] > - vp9dsp.loopfilter [OK] > - vp9dsp.mc [OK] > SSE: > - aacpsdsp.add_squares [OK] > - aacpsdsp.mul_pair_single [OK] > - aacpsdsp.hybrid_analysis [OK] > - sbrdsp.sum64x5[OK] > - sbrdsp.sum_square [OK] > - sbrdsp.neg_odd_64 [OK] > - sbrdsp.qmf_post_shuffle [OK] > - sbrdsp.qmf_deint_neg [OK] > - sbrdsp.qmf_deint_bfly [OK] > - sbrdsp.autocorrelate [OK] > - sbrdsp.hf_gen [OK] > - sbrdsp.hf_g_filt [OK] > - audiodsp.audiodsp [OK] > - blockdsp.blockdsp [OK] > - fmtconvert.fmtconvert [OK] > - h264pred.pred16x16[OK] > - vp8dsp.idct [OK] > - vp8dsp.mc [OK] > - vp9dsp.ipred [OK] > - vp9dsp.mc [OK] > - float_dsp.vector_fmul [OK] > - float_dsp.vector_fmac [OK] > - float_dsp.butterflies_float [OK] > - float_dsp.scalarproduct_float [OK] > SSE2: > - sbrdsp.qmf_pre_shuffle[OK] > - sbrdsp.qmf_deint_bfly [OK] > > Program received signal SIGSEGV, Segmentation fault. > apply_noise_main.loop () at libavcodec/x86/sbrdsp.asm:418 > 418 movu m7, [Yq + 2*count + mmsize] > (gdb) bt > Python Exception No module named > gdb.frames: > #0 apply_noise_main.loop () at libavcodec/x86/sbrdsp.asm:418 > #1 0x0043659b in checkasm_checked_call () at > tests/checkasm/x86/checkasm.asm:77 > #2 0xdeadbeefdeadbeef in ?? () > #3 0xdeadbeefdeadbeef in ?? () > #4 0xdeadbeefdeadbeef in ?? () > #5 0xdeadbeefdeadbeef in ?? () > #6 0xdeadbeefdeadbeef in ?? () > #7 0xdeadbeefdeadbeef in ?? () > #8 0xdeadbeefdeadbeef in ?? () > #9 0xdeadbeefdeadbeef in ?? () > #10 0xdeadbeefdeadbeef in ?? () > #11 0xdeadbeefdeadbeef in ?? () > #12 0xdeadbeefdeadbeef in ?? () >
Re: [FFmpeg-devel] [PATCH 1/2] checkasm: add sbrdsp tests
On 7/5/17, James Almerwrote: > On 7/4/2017 10:45 PM, Michael Niedermayer wrote: >> On Tue, Jul 04, 2017 at 03:15:56PM -0300, James Almer wrote: >>> On 7/4/2017 2:31 PM, Michael Niedermayer wrote: On Mon, Jul 03, 2017 at 02:32:28PM +0200, Matthieu Bouron wrote: > On Fri, Jun 30, 2017 at 05:16:37PM +0200, Matthieu Bouron wrote: >> On Fri, Jun 30, 2017 at 03:55:52PM +0200, Michael Niedermayer wrote: >>> On Thu, Jun 29, 2017 at 10:53:06PM -0300, James Almer wrote: On 6/29/2017 10:14 PM, Henrik Gramner wrote: > On Fri, Jun 30, 2017 at 1:58 AM, Michael Niedermayer > wrote: >> Program received signal SIGSEGV, Segmentation fault. >> 0x00684919 in ff_sbr_hf_gen_sse () > >>0x00684909 : sub%r9,%r8 > >> => 0x00684919 : movaps >> (%rsi,%r8,1),%xmm0 > >> r9 0xdeadbeef0080 -2401053092612145024 > > Another case of a 32-bit int being used as part of a 64-bit > operation. I can't reproduce it on my ArchLinux x86_64 environment for some reason, but based on what you said i assume the attached patch should fix it. >>> >>> no crash occurs here with this, so it seems fixed >> >> Should i push the patchset or wait a little bit longer ? > > Patchset applied. it seems theres some issue still in this: checkasm: using random seed 3655967467 MMX: - audiodsp.audiodsp [OK] - blockdsp.blockdsp [OK] - h264dsp.idct [OK] - h264pred.pred4x4 [OK] - h264pred.pred8x8 [OK] - h264pred.pred16x16[OK] - pixblockdsp.get_pixels[OK] - pixblockdsp.diff_pixels [OK] - vp8dsp.idct [OK] - vp8dsp.mc [OK] - vp9dsp.ipred [OK] - vp9dsp.itxfm [OK] - vp9dsp.mc [OK] MMXEXT: - audiodsp.audiodsp [OK] - h264dsp.idct [OK] - h264pred.pred4x4 [OK] - h264pred.pred8x8 [OK] - h264pred.pred16x16[OK] - h264pred.pred8x8l [OK] - h264qpel.put [OK] - h264qpel.avg [OK] - hevc_add_res.add_residual [OK] - hevc_idct.idct_dc [OK] - vp8dsp.mc [OK] - vp9dsp.ipred [OK] - vp9dsp.itxfm [OK] - vp9dsp.loopfilter [OK] - vp9dsp.mc [OK] SSE: - aacpsdsp.add_squares [OK] - aacpsdsp.mul_pair_single [OK] - aacpsdsp.hybrid_analysis [OK] - sbrdsp.sum64x5[OK] - sbrdsp.sum_square [OK] - sbrdsp.neg_odd_64 [OK] - sbrdsp.qmf_post_shuffle [OK] - sbrdsp.qmf_deint_neg [OK] - sbrdsp.qmf_deint_bfly [OK] - sbrdsp.autocorrelate [OK] - sbrdsp.hf_gen [OK] - sbrdsp.hf_g_filt [OK] - audiodsp.audiodsp [OK] - blockdsp.blockdsp [OK] - fmtconvert.fmtconvert [OK] - h264pred.pred16x16[OK] - vp8dsp.idct [OK] - vp8dsp.mc [OK] - vp9dsp.ipred [OK] - vp9dsp.mc [OK] - float_dsp.vector_fmul [OK] - float_dsp.vector_fmac [OK] - float_dsp.butterflies_float [OK] - float_dsp.scalarproduct_float [OK] SSE2: - sbrdsp.qmf_pre_shuffle[OK] - sbrdsp.qmf_deint_bfly [OK] Program received signal SIGSEGV, Segmentation fault. apply_noise_main.loop () at libavcodec/x86/sbrdsp.asm:418 418 movu m7, [Yq + 2*count + mmsize] (gdb) bt Python Exception No module named gdb.frames: #0 apply_noise_main.loop () at libavcodec/x86/sbrdsp.asm:418 #1 0x0043659b in checkasm_checked_call () at tests/checkasm/x86/checkasm.asm:77 #2 0xdeadbeefdeadbeef in ?? () #3 0xdeadbeefdeadbeef in ?? () #4 0xdeadbeefdeadbeef in ?? () #5 0xdeadbeefdeadbeef in ?? () #6 0xdeadbeefdeadbeef in ?? () #7 0xdeadbeefdeadbeef in ?? () #8 0xdeadbeefdeadbeef in ?? () #9 0xdeadbeefdeadbeef in ?? () #10 0xdeadbeefdeadbeef in ?? () #11 0xdeadbeefdeadbeef in ?? () #12 0xdeadbeefdeadbeef in ?? () #13 0xdeadbeefdeadbeef in ?? () #14 0xdeadbeefdeadbeef in ?? () #15 0xdeadbeefdeadbeef in ?? () #16 0xdeadbeefdeadbeef in ?? () #17 0xdeadbeefdeadbeef in ?? () #18
Re: [FFmpeg-devel] [PATCH 1/2] checkasm: add sbrdsp tests
On 7/4/2017 10:45 PM, Michael Niedermayer wrote: > On Tue, Jul 04, 2017 at 03:15:56PM -0300, James Almer wrote: >> On 7/4/2017 2:31 PM, Michael Niedermayer wrote: >>> On Mon, Jul 03, 2017 at 02:32:28PM +0200, Matthieu Bouron wrote: On Fri, Jun 30, 2017 at 05:16:37PM +0200, Matthieu Bouron wrote: > On Fri, Jun 30, 2017 at 03:55:52PM +0200, Michael Niedermayer wrote: >> On Thu, Jun 29, 2017 at 10:53:06PM -0300, James Almer wrote: >>> On 6/29/2017 10:14 PM, Henrik Gramner wrote: On Fri, Jun 30, 2017 at 1:58 AM, Michael Niedermayerwrote: > Program received signal SIGSEGV, Segmentation fault. > 0x00684919 in ff_sbr_hf_gen_sse () >0x00684909 : sub%r9,%r8 > => 0x00684919 : movaps > (%rsi,%r8,1),%xmm0 > r9 0xdeadbeef0080 -2401053092612145024 Another case of a 32-bit int being used as part of a 64-bit operation. >>> >>> I can't reproduce it on my ArchLinux x86_64 environment for some reason, >>> but based on what you said i assume the attached patch should fix it. >> >> no crash occurs here with this, so it seems fixed > > Should i push the patchset or wait a little bit longer ? Patchset applied. >>> >>> it seems theres some issue still in this: >>> >>> checkasm: using random seed 3655967467 >>> MMX: >>> - audiodsp.audiodsp [OK] >>> - blockdsp.blockdsp [OK] >>> - h264dsp.idct [OK] >>> - h264pred.pred4x4 [OK] >>> - h264pred.pred8x8 [OK] >>> - h264pred.pred16x16[OK] >>> - pixblockdsp.get_pixels[OK] >>> - pixblockdsp.diff_pixels [OK] >>> - vp8dsp.idct [OK] >>> - vp8dsp.mc [OK] >>> - vp9dsp.ipred [OK] >>> - vp9dsp.itxfm [OK] >>> - vp9dsp.mc [OK] >>> MMXEXT: >>> - audiodsp.audiodsp [OK] >>> - h264dsp.idct [OK] >>> - h264pred.pred4x4 [OK] >>> - h264pred.pred8x8 [OK] >>> - h264pred.pred16x16[OK] >>> - h264pred.pred8x8l [OK] >>> - h264qpel.put [OK] >>> - h264qpel.avg [OK] >>> - hevc_add_res.add_residual [OK] >>> - hevc_idct.idct_dc [OK] >>> - vp8dsp.mc [OK] >>> - vp9dsp.ipred [OK] >>> - vp9dsp.itxfm [OK] >>> - vp9dsp.loopfilter [OK] >>> - vp9dsp.mc [OK] >>> SSE: >>> - aacpsdsp.add_squares [OK] >>> - aacpsdsp.mul_pair_single [OK] >>> - aacpsdsp.hybrid_analysis [OK] >>> - sbrdsp.sum64x5[OK] >>> - sbrdsp.sum_square [OK] >>> - sbrdsp.neg_odd_64 [OK] >>> - sbrdsp.qmf_post_shuffle [OK] >>> - sbrdsp.qmf_deint_neg [OK] >>> - sbrdsp.qmf_deint_bfly [OK] >>> - sbrdsp.autocorrelate [OK] >>> - sbrdsp.hf_gen [OK] >>> - sbrdsp.hf_g_filt [OK] >>> - audiodsp.audiodsp [OK] >>> - blockdsp.blockdsp [OK] >>> - fmtconvert.fmtconvert [OK] >>> - h264pred.pred16x16[OK] >>> - vp8dsp.idct [OK] >>> - vp8dsp.mc [OK] >>> - vp9dsp.ipred [OK] >>> - vp9dsp.mc [OK] >>> - float_dsp.vector_fmul [OK] >>> - float_dsp.vector_fmac [OK] >>> - float_dsp.butterflies_float [OK] >>> - float_dsp.scalarproduct_float [OK] >>> SSE2: >>> - sbrdsp.qmf_pre_shuffle[OK] >>> - sbrdsp.qmf_deint_bfly [OK] >>> >>> Program received signal SIGSEGV, Segmentation fault. >>> apply_noise_main.loop () at libavcodec/x86/sbrdsp.asm:418 >>> 418 movu m7, [Yq + 2*count + mmsize] >>> (gdb) bt >>> Python Exception No module named gdb.frames: >>> #0 apply_noise_main.loop () at libavcodec/x86/sbrdsp.asm:418 >>> #1 0x0043659b in checkasm_checked_call () at >>> tests/checkasm/x86/checkasm.asm:77 >>> #2 0xdeadbeefdeadbeef in ?? () >>> #3 0xdeadbeefdeadbeef in ?? () >>> #4 0xdeadbeefdeadbeef in ?? () >>> #5 0xdeadbeefdeadbeef in ?? () >>> #6 0xdeadbeefdeadbeef in ?? () >>> #7 0xdeadbeefdeadbeef in ?? () >>> #8 0xdeadbeefdeadbeef in ?? () >>> #9 0xdeadbeefdeadbeef in ?? () >>> #10 0xdeadbeefdeadbeef in ?? () >>> #11 0xdeadbeefdeadbeef in ?? () >>> #12 0xdeadbeefdeadbeef in ?? () >>> #13 0xdeadbeefdeadbeef in ?? () >>> #14 0xdeadbeefdeadbeef in ?? () >>> #15 0xdeadbeefdeadbeef in ?? () >>> #16 0xdeadbeefdeadbeef in ?? () >>> #17 0xdeadbeefdeadbeef in ?? () >>> #18 0xdeadbeefdeadbeef in ?? () >>> #19 0x7fffd870 in ?? () >>> #20 0x7fffcc70 in ?? () >>> #21 0x7fffce70 in ?? () >>> #22 0x in ?? () >>> (gdb) info all-registers >>>
Re: [FFmpeg-devel] [PATCH 1/2] checkasm: add sbrdsp tests
On Tue, Jul 04, 2017 at 03:15:56PM -0300, James Almer wrote: > On 7/4/2017 2:31 PM, Michael Niedermayer wrote: > > On Mon, Jul 03, 2017 at 02:32:28PM +0200, Matthieu Bouron wrote: > >> On Fri, Jun 30, 2017 at 05:16:37PM +0200, Matthieu Bouron wrote: > >>> On Fri, Jun 30, 2017 at 03:55:52PM +0200, Michael Niedermayer wrote: > On Thu, Jun 29, 2017 at 10:53:06PM -0300, James Almer wrote: > > On 6/29/2017 10:14 PM, Henrik Gramner wrote: > >> On Fri, Jun 30, 2017 at 1:58 AM, Michael Niedermayer > >>wrote: > >>> Program received signal SIGSEGV, Segmentation fault. > >>> 0x00684919 in ff_sbr_hf_gen_sse () > >> > >>>0x00684909 : sub%r9,%r8 > >> > >>> => 0x00684919 : movaps > >>> (%rsi,%r8,1),%xmm0 > >> > >>> r9 0xdeadbeef0080 -2401053092612145024 > >> > >> Another case of a 32-bit int being used as part of a 64-bit operation. > > > > I can't reproduce it on my ArchLinux x86_64 environment for some reason, > > but based on what you said i assume the attached patch should fix it. > > no crash occurs here with this, so it seems fixed > >>> > >>> Should i push the patchset or wait a little bit longer ? > >> > >> Patchset applied. > > > > it seems theres some issue still in this: > > > > checkasm: using random seed 3655967467 > > MMX: > > - audiodsp.audiodsp [OK] > > - blockdsp.blockdsp [OK] > > - h264dsp.idct [OK] > > - h264pred.pred4x4 [OK] > > - h264pred.pred8x8 [OK] > > - h264pred.pred16x16[OK] > > - pixblockdsp.get_pixels[OK] > > - pixblockdsp.diff_pixels [OK] > > - vp8dsp.idct [OK] > > - vp8dsp.mc [OK] > > - vp9dsp.ipred [OK] > > - vp9dsp.itxfm [OK] > > - vp9dsp.mc [OK] > > MMXEXT: > > - audiodsp.audiodsp [OK] > > - h264dsp.idct [OK] > > - h264pred.pred4x4 [OK] > > - h264pred.pred8x8 [OK] > > - h264pred.pred16x16[OK] > > - h264pred.pred8x8l [OK] > > - h264qpel.put [OK] > > - h264qpel.avg [OK] > > - hevc_add_res.add_residual [OK] > > - hevc_idct.idct_dc [OK] > > - vp8dsp.mc [OK] > > - vp9dsp.ipred [OK] > > - vp9dsp.itxfm [OK] > > - vp9dsp.loopfilter [OK] > > - vp9dsp.mc [OK] > > SSE: > > - aacpsdsp.add_squares [OK] > > - aacpsdsp.mul_pair_single [OK] > > - aacpsdsp.hybrid_analysis [OK] > > - sbrdsp.sum64x5[OK] > > - sbrdsp.sum_square [OK] > > - sbrdsp.neg_odd_64 [OK] > > - sbrdsp.qmf_post_shuffle [OK] > > - sbrdsp.qmf_deint_neg [OK] > > - sbrdsp.qmf_deint_bfly [OK] > > - sbrdsp.autocorrelate [OK] > > - sbrdsp.hf_gen [OK] > > - sbrdsp.hf_g_filt [OK] > > - audiodsp.audiodsp [OK] > > - blockdsp.blockdsp [OK] > > - fmtconvert.fmtconvert [OK] > > - h264pred.pred16x16[OK] > > - vp8dsp.idct [OK] > > - vp8dsp.mc [OK] > > - vp9dsp.ipred [OK] > > - vp9dsp.mc [OK] > > - float_dsp.vector_fmul [OK] > > - float_dsp.vector_fmac [OK] > > - float_dsp.butterflies_float [OK] > > - float_dsp.scalarproduct_float [OK] > > SSE2: > > - sbrdsp.qmf_pre_shuffle[OK] > > - sbrdsp.qmf_deint_bfly [OK] > > > > Program received signal SIGSEGV, Segmentation fault. > > apply_noise_main.loop () at libavcodec/x86/sbrdsp.asm:418 > > 418 movu m7, [Yq + 2*count + mmsize] > > (gdb) bt > > Python Exception No module named gdb.frames: > > #0 apply_noise_main.loop () at libavcodec/x86/sbrdsp.asm:418 > > #1 0x0043659b in checkasm_checked_call () at > > tests/checkasm/x86/checkasm.asm:77 > > #2 0xdeadbeefdeadbeef in ?? () > > #3 0xdeadbeefdeadbeef in ?? () > > #4 0xdeadbeefdeadbeef in ?? () > > #5 0xdeadbeefdeadbeef in ?? () > > #6 0xdeadbeefdeadbeef in ?? () > > #7 0xdeadbeefdeadbeef in ?? () > > #8 0xdeadbeefdeadbeef in ?? () > > #9 0xdeadbeefdeadbeef in ?? () > > #10 0xdeadbeefdeadbeef in ?? () > > #11 0xdeadbeefdeadbeef in ?? () > > #12 0xdeadbeefdeadbeef in ?? () > > #13 0xdeadbeefdeadbeef in ?? () > > #14 0xdeadbeefdeadbeef in ?? () > > #15 0xdeadbeefdeadbeef in ?? () > > #16 0xdeadbeefdeadbeef in ?? () > > #17 0xdeadbeefdeadbeef in ?? () > > #18 0xdeadbeefdeadbeef in ?? () > > #19 0x7fffd870 in ?? () > > #20 0x7fffcc70 in ?? () > > #21 0x7fffce70 in ?? () > > #22 0x in ?? () > > (gdb) info all-registers > > rax0x0 0 > > rbx
Re: [FFmpeg-devel] [PATCH 1/2] checkasm: add sbrdsp tests
On 7/4/2017 2:31 PM, Michael Niedermayer wrote: > On Mon, Jul 03, 2017 at 02:32:28PM +0200, Matthieu Bouron wrote: >> On Fri, Jun 30, 2017 at 05:16:37PM +0200, Matthieu Bouron wrote: >>> On Fri, Jun 30, 2017 at 03:55:52PM +0200, Michael Niedermayer wrote: On Thu, Jun 29, 2017 at 10:53:06PM -0300, James Almer wrote: > On 6/29/2017 10:14 PM, Henrik Gramner wrote: >> On Fri, Jun 30, 2017 at 1:58 AM, Michael Niedermayer >>wrote: >>> Program received signal SIGSEGV, Segmentation fault. >>> 0x00684919 in ff_sbr_hf_gen_sse () >> >>>0x00684909 : sub%r9,%r8 >> >>> => 0x00684919 : movaps >>> (%rsi,%r8,1),%xmm0 >> >>> r9 0xdeadbeef0080 -2401053092612145024 >> >> Another case of a 32-bit int being used as part of a 64-bit operation. > > I can't reproduce it on my ArchLinux x86_64 environment for some reason, > but based on what you said i assume the attached patch should fix it. no crash occurs here with this, so it seems fixed >>> >>> Should i push the patchset or wait a little bit longer ? >> >> Patchset applied. > > it seems theres some issue still in this: > > checkasm: using random seed 3655967467 > MMX: > - audiodsp.audiodsp [OK] > - blockdsp.blockdsp [OK] > - h264dsp.idct [OK] > - h264pred.pred4x4 [OK] > - h264pred.pred8x8 [OK] > - h264pred.pred16x16[OK] > - pixblockdsp.get_pixels[OK] > - pixblockdsp.diff_pixels [OK] > - vp8dsp.idct [OK] > - vp8dsp.mc [OK] > - vp9dsp.ipred [OK] > - vp9dsp.itxfm [OK] > - vp9dsp.mc [OK] > MMXEXT: > - audiodsp.audiodsp [OK] > - h264dsp.idct [OK] > - h264pred.pred4x4 [OK] > - h264pred.pred8x8 [OK] > - h264pred.pred16x16[OK] > - h264pred.pred8x8l [OK] > - h264qpel.put [OK] > - h264qpel.avg [OK] > - hevc_add_res.add_residual [OK] > - hevc_idct.idct_dc [OK] > - vp8dsp.mc [OK] > - vp9dsp.ipred [OK] > - vp9dsp.itxfm [OK] > - vp9dsp.loopfilter [OK] > - vp9dsp.mc [OK] > SSE: > - aacpsdsp.add_squares [OK] > - aacpsdsp.mul_pair_single [OK] > - aacpsdsp.hybrid_analysis [OK] > - sbrdsp.sum64x5[OK] > - sbrdsp.sum_square [OK] > - sbrdsp.neg_odd_64 [OK] > - sbrdsp.qmf_post_shuffle [OK] > - sbrdsp.qmf_deint_neg [OK] > - sbrdsp.qmf_deint_bfly [OK] > - sbrdsp.autocorrelate [OK] > - sbrdsp.hf_gen [OK] > - sbrdsp.hf_g_filt [OK] > - audiodsp.audiodsp [OK] > - blockdsp.blockdsp [OK] > - fmtconvert.fmtconvert [OK] > - h264pred.pred16x16[OK] > - vp8dsp.idct [OK] > - vp8dsp.mc [OK] > - vp9dsp.ipred [OK] > - vp9dsp.mc [OK] > - float_dsp.vector_fmul [OK] > - float_dsp.vector_fmac [OK] > - float_dsp.butterflies_float [OK] > - float_dsp.scalarproduct_float [OK] > SSE2: > - sbrdsp.qmf_pre_shuffle[OK] > - sbrdsp.qmf_deint_bfly [OK] > > Program received signal SIGSEGV, Segmentation fault. > apply_noise_main.loop () at libavcodec/x86/sbrdsp.asm:418 > 418 movu m7, [Yq + 2*count + mmsize] > (gdb) bt > Python Exception No module named gdb.frames: > #0 apply_noise_main.loop () at libavcodec/x86/sbrdsp.asm:418 > #1 0x0043659b in checkasm_checked_call () at > tests/checkasm/x86/checkasm.asm:77 > #2 0xdeadbeefdeadbeef in ?? () > #3 0xdeadbeefdeadbeef in ?? () > #4 0xdeadbeefdeadbeef in ?? () > #5 0xdeadbeefdeadbeef in ?? () > #6 0xdeadbeefdeadbeef in ?? () > #7 0xdeadbeefdeadbeef in ?? () > #8 0xdeadbeefdeadbeef in ?? () > #9 0xdeadbeefdeadbeef in ?? () > #10 0xdeadbeefdeadbeef in ?? () > #11 0xdeadbeefdeadbeef in ?? () > #12 0xdeadbeefdeadbeef in ?? () > #13 0xdeadbeefdeadbeef in ?? () > #14 0xdeadbeefdeadbeef in ?? () > #15 0xdeadbeefdeadbeef in ?? () > #16 0xdeadbeefdeadbeef in ?? () > #17 0xdeadbeefdeadbeef in ?? () > #18 0xdeadbeefdeadbeef in ?? () > #19 0x7fffd870 in ?? () > #20 0x7fffcc70 in ?? () > #21 0x7fffce70 in ?? () > #22 0x in ?? () > (gdb) info all-registers > rax0x0 0 > rbx0xed56bb2dcb3c7736 -1344681633365854410 > rcx0x8e82280 > rdx0x7ab77bbbd070 8842672440749314160 > rsi0x7ab77bbbce70 8842672440749313648 > rdi0xf56edc70 -761539929699263376 > rbp0x8bda43d3fd1a7e06
Re: [FFmpeg-devel] [PATCH 1/2] checkasm: add sbrdsp tests
On Mon, Jul 03, 2017 at 02:32:28PM +0200, Matthieu Bouron wrote: > On Fri, Jun 30, 2017 at 05:16:37PM +0200, Matthieu Bouron wrote: > > On Fri, Jun 30, 2017 at 03:55:52PM +0200, Michael Niedermayer wrote: > > > On Thu, Jun 29, 2017 at 10:53:06PM -0300, James Almer wrote: > > > > On 6/29/2017 10:14 PM, Henrik Gramner wrote: > > > > > On Fri, Jun 30, 2017 at 1:58 AM, Michael Niedermayer > > > > >wrote: > > > > >> Program received signal SIGSEGV, Segmentation fault. > > > > >> 0x00684919 in ff_sbr_hf_gen_sse () > > > > > > > > > >>0x00684909 : sub%r9,%r8 > > > > > > > > > >> => 0x00684919 : movaps > > > > >> (%rsi,%r8,1),%xmm0 > > > > > > > > > >> r9 0xdeadbeef0080 -2401053092612145024 > > > > > > > > > > Another case of a 32-bit int being used as part of a 64-bit operation. > > > > > > > > I can't reproduce it on my ArchLinux x86_64 environment for some reason, > > > > but based on what you said i assume the attached patch should fix it. > > > > > > no crash occurs here with this, so it seems fixed > > > > Should i push the patchset or wait a little bit longer ? > > Patchset applied. it seems theres some issue still in this: checkasm: using random seed 3655967467 MMX: - audiodsp.audiodsp [OK] - blockdsp.blockdsp [OK] - h264dsp.idct [OK] - h264pred.pred4x4 [OK] - h264pred.pred8x8 [OK] - h264pred.pred16x16[OK] - pixblockdsp.get_pixels[OK] - pixblockdsp.diff_pixels [OK] - vp8dsp.idct [OK] - vp8dsp.mc [OK] - vp9dsp.ipred [OK] - vp9dsp.itxfm [OK] - vp9dsp.mc [OK] MMXEXT: - audiodsp.audiodsp [OK] - h264dsp.idct [OK] - h264pred.pred4x4 [OK] - h264pred.pred8x8 [OK] - h264pred.pred16x16[OK] - h264pred.pred8x8l [OK] - h264qpel.put [OK] - h264qpel.avg [OK] - hevc_add_res.add_residual [OK] - hevc_idct.idct_dc [OK] - vp8dsp.mc [OK] - vp9dsp.ipred [OK] - vp9dsp.itxfm [OK] - vp9dsp.loopfilter [OK] - vp9dsp.mc [OK] SSE: - aacpsdsp.add_squares [OK] - aacpsdsp.mul_pair_single [OK] - aacpsdsp.hybrid_analysis [OK] - sbrdsp.sum64x5[OK] - sbrdsp.sum_square [OK] - sbrdsp.neg_odd_64 [OK] - sbrdsp.qmf_post_shuffle [OK] - sbrdsp.qmf_deint_neg [OK] - sbrdsp.qmf_deint_bfly [OK] - sbrdsp.autocorrelate [OK] - sbrdsp.hf_gen [OK] - sbrdsp.hf_g_filt [OK] - audiodsp.audiodsp [OK] - blockdsp.blockdsp [OK] - fmtconvert.fmtconvert [OK] - h264pred.pred16x16[OK] - vp8dsp.idct [OK] - vp8dsp.mc [OK] - vp9dsp.ipred [OK] - vp9dsp.mc [OK] - float_dsp.vector_fmul [OK] - float_dsp.vector_fmac [OK] - float_dsp.butterflies_float [OK] - float_dsp.scalarproduct_float [OK] SSE2: - sbrdsp.qmf_pre_shuffle[OK] - sbrdsp.qmf_deint_bfly [OK] Program received signal SIGSEGV, Segmentation fault. apply_noise_main.loop () at libavcodec/x86/sbrdsp.asm:418 418 movu m7, [Yq + 2*count + mmsize] (gdb) bt Python Exception No module named gdb.frames: #0 apply_noise_main.loop () at libavcodec/x86/sbrdsp.asm:418 #1 0x0043659b in checkasm_checked_call () at tests/checkasm/x86/checkasm.asm:77 #2 0xdeadbeefdeadbeef in ?? () #3 0xdeadbeefdeadbeef in ?? () #4 0xdeadbeefdeadbeef in ?? () #5 0xdeadbeefdeadbeef in ?? () #6 0xdeadbeefdeadbeef in ?? () #7 0xdeadbeefdeadbeef in ?? () #8 0xdeadbeefdeadbeef in ?? () #9 0xdeadbeefdeadbeef in ?? () #10 0xdeadbeefdeadbeef in ?? () #11 0xdeadbeefdeadbeef in ?? () #12 0xdeadbeefdeadbeef in ?? () #13 0xdeadbeefdeadbeef in ?? () #14 0xdeadbeefdeadbeef in ?? () #15 0xdeadbeefdeadbeef in ?? () #16 0xdeadbeefdeadbeef in ?? () #17 0xdeadbeefdeadbeef in ?? () #18 0xdeadbeefdeadbeef in ?? () #19 0x7fffd870 in ?? () #20 0x7fffcc70 in ?? () #21 0x7fffce70 in ?? () #22 0x in ?? () (gdb) info all-registers rax0x0 0 rbx0xed56bb2dcb3c7736 -1344681633365854410 rcx0x8e82280 rdx0x7ab77bbbd070 8842672440749314160 rsi0x7ab77bbbce70 8842672440749313648 rdi0xf56edc70 -761539929699263376 rbp0x8bda43d3fd1a7e06 0x8bda43d3fd1a7e06 rsp0x7fffcae8 0x7fffcae8 r8 0xdeadbeef -2401053092612145152 r9 0x8549044409c0 -8842531703260968512 r10
Re: [FFmpeg-devel] [PATCH 1/2] checkasm: add sbrdsp tests
On Fri, Jun 30, 2017 at 05:16:37PM +0200, Matthieu Bouron wrote: > On Fri, Jun 30, 2017 at 03:55:52PM +0200, Michael Niedermayer wrote: > > On Thu, Jun 29, 2017 at 10:53:06PM -0300, James Almer wrote: > > > On 6/29/2017 10:14 PM, Henrik Gramner wrote: > > > > On Fri, Jun 30, 2017 at 1:58 AM, Michael Niedermayer > > > >wrote: > > > >> Program received signal SIGSEGV, Segmentation fault. > > > >> 0x00684919 in ff_sbr_hf_gen_sse () > > > > > > > >>0x00684909 : sub%r9,%r8 > > > > > > > >> => 0x00684919 : movaps > > > >> (%rsi,%r8,1),%xmm0 > > > > > > > >> r9 0xdeadbeef0080 -2401053092612145024 > > > > > > > > Another case of a 32-bit int being used as part of a 64-bit operation. > > > > > > I can't reproduce it on my ArchLinux x86_64 environment for some reason, > > > but based on what you said i assume the attached patch should fix it. > > > > no crash occurs here with this, so it seems fixed > > Should i push the patchset or wait a little bit longer ? Patchset applied. -- Matthieu B. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] checkasm: add sbrdsp tests
On Fri, Jun 30, 2017 at 03:55:52PM +0200, Michael Niedermayer wrote: > On Thu, Jun 29, 2017 at 10:53:06PM -0300, James Almer wrote: > > On 6/29/2017 10:14 PM, Henrik Gramner wrote: > > > On Fri, Jun 30, 2017 at 1:58 AM, Michael Niedermayer > > >wrote: > > >> Program received signal SIGSEGV, Segmentation fault. > > >> 0x00684919 in ff_sbr_hf_gen_sse () > > > > > >>0x00684909 : sub%r9,%r8 > > > > > >> => 0x00684919 : movaps (%rsi,%r8,1),%xmm0 > > > > > >> r9 0xdeadbeef0080 -2401053092612145024 > > > > > > Another case of a 32-bit int being used as part of a 64-bit operation. > > > > I can't reproduce it on my ArchLinux x86_64 environment for some reason, > > but based on what you said i assume the attached patch should fix it. > > no crash occurs here with this, so it seems fixed Should i push the patchset or wait a little bit longer ? [...] -- Matthieu B. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] checkasm: add sbrdsp tests
On 6/30/2017 10:55 AM, Michael Niedermayer wrote: > On Thu, Jun 29, 2017 at 10:53:06PM -0300, James Almer wrote: >> On 6/29/2017 10:14 PM, Henrik Gramner wrote: >>> On Fri, Jun 30, 2017 at 1:58 AM, Michael Niedermayer >>>wrote: Program received signal SIGSEGV, Segmentation fault. 0x00684919 in ff_sbr_hf_gen_sse () >>> 0x00684909 : sub%r9,%r8 >>> => 0x00684919 : movaps (%rsi,%r8,1),%xmm0 >>> r9 0xdeadbeef0080 -2401053092612145024 >>> >>> Another case of a 32-bit int being used as part of a 64-bit operation. >> >> I can't reproduce it on my ArchLinux x86_64 environment for some reason, >> but based on what you said i assume the attached patch should fix it. > > no crash occurs here with this, so it seems fixed > > thx Applied then. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] checkasm: add sbrdsp tests
On Thu, Jun 29, 2017 at 10:53:06PM -0300, James Almer wrote: > On 6/29/2017 10:14 PM, Henrik Gramner wrote: > > On Fri, Jun 30, 2017 at 1:58 AM, Michael Niedermayer > >wrote: > >> Program received signal SIGSEGV, Segmentation fault. > >> 0x00684919 in ff_sbr_hf_gen_sse () > > > >>0x00684909 : sub%r9,%r8 > > > >> => 0x00684919 : movaps (%rsi,%r8,1),%xmm0 > > > >> r9 0xdeadbeef0080 -2401053092612145024 > > > > Another case of a 32-bit int being used as part of a 64-bit operation. > > I can't reproduce it on my ArchLinux x86_64 environment for some reason, > but based on what you said i assume the attached patch should fix it. no crash occurs here with this, so it seems fixed thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Let us carefully observe those good qualities wherein our enemies excel us and endeavor to excel them, by avoiding what is faulty, and imitating what is excellent in them. -- Plutarch signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] checkasm: add sbrdsp tests
On 6/29/2017 10:14 PM, Henrik Gramner wrote: > On Fri, Jun 30, 2017 at 1:58 AM, Michael Niedermayer >wrote: >> Program received signal SIGSEGV, Segmentation fault. >> 0x00684919 in ff_sbr_hf_gen_sse () > >>0x00684909 : sub%r9,%r8 > >> => 0x00684919 : movaps (%rsi,%r8,1),%xmm0 > >> r9 0xdeadbeef0080 -2401053092612145024 > > Another case of a 32-bit int being used as part of a 64-bit operation. I can't reproduce it on my ArchLinux x86_64 environment for some reason, but based on what you said i assume the attached patch should fix it. From f4646091b450b7c4c5479fbb4163ef89615a4a8d Mon Sep 17 00:00:00 2001 From: James Almer Date: Thu, 29 Jun 2017 22:51:04 -0300 Subject: [PATCH] x86/sbrdsp: zero extend start and end gprs in ff_sbr_hf_gen_sse Signed-off-by: James Almer --- libavcodec/x86/sbrdsp.asm | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/libavcodec/x86/sbrdsp.asm b/libavcodec/x86/sbrdsp.asm index d0f774b277..c716184b14 100644 --- a/libavcodec/x86/sbrdsp.asm +++ b/libavcodec/x86/sbrdsp.asm @@ -149,19 +149,19 @@ cglobal sbr_hf_gen, 4,4,8, X_high, X_low, alpha0, alpha1, BW, S, E ; start and end 6th and 7th args on stack movr2d, Sm movr3d, Em -%define start r2q -%define end r3q +DEFINE_ARGS X_high, X_low, start, end %else ; BW does not actually occupy a register, so shift by 1 -%define start BWq -%define end Sq +DEFINE_ARGS X_high, X_low, alpha0, alpha1, start, end +movsxd startq, startd +movsxdendq, endd %endif -sub start, end ; neg num of loops -leaX_highq, [X_highq + end*2*4] -lea X_lowq, [X_lowq + end*2*4 - 2*2*4] -shl start, 3; offset from num loops +sub startq, endq ; neg num of loops +leaX_highq, [X_highq + endq*2*4] +lea X_lowq, [X_lowq + endq*2*4 - 2*2*4] +shl startq, 3; offset from num loops -movam0, [X_lowq + start] +movam0, [X_lowq + startq] shufps m3, m3, q shufps m4, m4, q xorps m3, [ps_mask] @@ -169,7 +169,7 @@ cglobal sbr_hf_gen, 4,4,8, X_high, X_low, alpha0, alpha1, BW, S, E shufps m2, m2, q xorps m4, [ps_mask] .loop2: -movum7, [X_lowq + start + 8]; BbCc +movum7, [X_lowq + startq + 8] ; BbCc movam6, m0 movam5, m7 shufps m0, m0, q2301 ; aAbB @@ -179,12 +179,12 @@ cglobal sbr_hf_gen, 4,4,8, X_high, X_low, alpha0, alpha1, BW, S, E mulps m6, m2 mulps m5, m1 addps m7, m0 -movam0, [X_lowq + start +16]; CcDd +movam0, [X_lowq + startq + 16] ; CcDd addps m7, m0 addps m6, m5 addps m7, m6 -mova [X_highq + start], m7 -add start, 16 +mova [X_highq + startq], m7 +add startq, 16 jnz .loop2 RET -- 2.13.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] checkasm: add sbrdsp tests
On Fri, Jun 30, 2017 at 1:58 AM, Michael Niedermayerwrote: > Program received signal SIGSEGV, Segmentation fault. > 0x00684919 in ff_sbr_hf_gen_sse () >0x00684909 : sub%r9,%r8 > => 0x00684919 : movaps (%rsi,%r8,1),%xmm0 > r9 0xdeadbeef0080 -2401053092612145024 Another case of a 32-bit int being used as part of a 64-bit operation. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] checkasm: add sbrdsp tests
On Wed, Jun 28, 2017 at 02:48:55PM +0200, Matthieu Bouron wrote: > On Fri, Jun 23, 2017 at 05:01:35PM +0200, Matthieu Bouron wrote: > > On Thu, Jun 22, 2017 at 12:53:52PM -0300, James Almer wrote: > > > On 6/22/2017 9:56 AM, Matthieu Bouron wrote: > > > > --- > > > > > > > > The following patchset applies on top of Clément's aacpsdsp patchset. > > > > > > > > --- > > > > tests/checkasm/Makefile | 3 +- > > > > tests/checkasm/checkasm.c | 1 + > > > > tests/checkasm/checkasm.h | 1 + > > > > tests/checkasm/sbrdsp.c | 297 > > > > ++ > > > > 4 files changed, 301 insertions(+), 1 deletion(-) > > > > create mode 100644 tests/checkasm/sbrdsp.c > > > > > > > > diff --git a/tests/checkasm/Makefile b/tests/checkasm/Makefile > > > > index 638e811931..60e80ab738 100644 > > > > --- a/tests/checkasm/Makefile > > > > +++ b/tests/checkasm/Makefile > > > > @@ -13,7 +13,8 @@ AVCODECOBJS-$(CONFIG_VP8DSP)+= vp8dsp.o > > > > AVCODECOBJS-$(CONFIG_VIDEODSP) += videodsp.o > > > > > > > > # decoders/encoders > > > > -AVCODECOBJS-$(CONFIG_AAC_DECODER) += aacpsdsp.o > > > > +AVCODECOBJS-$(CONFIG_AAC_DECODER) += aacpsdsp.o \ > > > > + sbrdsp.o > > > > AVCODECOBJS-$(CONFIG_ALAC_DECODER) += alacdsp.o > > > > AVCODECOBJS-$(CONFIG_DCA_DECODER) += synth_filter.o > > > > AVCODECOBJS-$(CONFIG_JPEG2000_DECODER) += jpeg2000dsp.o > > > > diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c > > > > index e66744b162..29f201b1b3 100644 > > > > --- a/tests/checkasm/checkasm.c > > > > +++ b/tests/checkasm/checkasm.c > > > > @@ -67,6 +67,7 @@ static const struct { > > > > #if CONFIG_AVCODEC > > > > #if CONFIG_AAC_DECODER > > > > { "aacpsdsp", checkasm_check_aacpsdsp }, > > > > +{ "sbrdsp", checkasm_check_sbrdsp }, > > > > #endif > > > > #if CONFIG_ALAC_DECODER > > > > { "alacdsp", checkasm_check_alacdsp }, > > > > diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h > > > > index dfb0ce561c..fa51e71e4b 100644 > > > > --- a/tests/checkasm/checkasm.h > > > > +++ b/tests/checkasm/checkasm.h > > > > @@ -50,6 +50,7 @@ void checkasm_check_hevc_idct(void); > > > > void checkasm_check_jpeg2000dsp(void); > > > > void checkasm_check_llviddsp(void); > > > > void checkasm_check_pixblockdsp(void); > > > > +void checkasm_check_sbrdsp(void); > > > > void checkasm_check_synth_filter(void); > > > > void checkasm_check_v210enc(void); > > > > void checkasm_check_vp8dsp(void); > > > > diff --git a/tests/checkasm/sbrdsp.c b/tests/checkasm/sbrdsp.c > > > > new file mode 100644 > > > > index 00..8333510c6b > > > > --- /dev/null > > > > +++ b/tests/checkasm/sbrdsp.c > > > > @@ -0,0 +1,297 @@ > > > > +/* > > > > + * 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 "libavcodec/sbrdsp.h" > > > > + > > > > +#include "checkasm.h" > > > > + > > > > +#define randomize(buf, len) do {\ > > > > +int i; \ > > > > +for (i = 0; i < len; i++) { \ > > > > +const INTFLOAT f = (INTFLOAT)rnd() / UINT_MAX; \ > > > > +(buf)[i] = f; \ > > > > +} \ > > > > +} while (0) > > > > + > > > > +#define EPS 0.0001 > > > > + > > > > +static void test_sum64x5(void) > > > > +{ > > > > +LOCAL_ALIGNED_16(INTFLOAT, dst0, [64 + 256]); > > > > +LOCAL_ALIGNED_16(INTFLOAT, dst1, [64 + 256]); > > > > + > > > > +declare_func(void, INTFLOAT *z); > > > > + > > > > +randomize((INTFLOAT *)dst0, 64 + 256); > > > > +memcpy(dst1, dst0, (64 + 256) * sizeof(INTFLOAT)); > > > > +call_ref(dst0); > > > > +call_new(dst1); > > > > +if (!float_near_abs_eps_array(dst0, dst1, EPS, 64 + 256)) > > > > +fail(); > > > > +bench_new(dst1); > > > > +} > > > > + > > > > +static void test_sum_square(void) > > > > +{ > > > > +INTFLOAT res0; > > > > +INTFLOAT
Re: [FFmpeg-devel] [PATCH 1/2] checkasm: add sbrdsp tests
On Fri, Jun 23, 2017 at 05:01:35PM +0200, Matthieu Bouron wrote: > On Thu, Jun 22, 2017 at 12:53:52PM -0300, James Almer wrote: > > On 6/22/2017 9:56 AM, Matthieu Bouron wrote: > > > --- > > > > > > The following patchset applies on top of Clément's aacpsdsp patchset. > > > > > > --- > > > tests/checkasm/Makefile | 3 +- > > > tests/checkasm/checkasm.c | 1 + > > > tests/checkasm/checkasm.h | 1 + > > > tests/checkasm/sbrdsp.c | 297 > > > ++ > > > 4 files changed, 301 insertions(+), 1 deletion(-) > > > create mode 100644 tests/checkasm/sbrdsp.c > > > > > > diff --git a/tests/checkasm/Makefile b/tests/checkasm/Makefile > > > index 638e811931..60e80ab738 100644 > > > --- a/tests/checkasm/Makefile > > > +++ b/tests/checkasm/Makefile > > > @@ -13,7 +13,8 @@ AVCODECOBJS-$(CONFIG_VP8DSP)+= vp8dsp.o > > > AVCODECOBJS-$(CONFIG_VIDEODSP) += videodsp.o > > > > > > # decoders/encoders > > > -AVCODECOBJS-$(CONFIG_AAC_DECODER) += aacpsdsp.o > > > +AVCODECOBJS-$(CONFIG_AAC_DECODER) += aacpsdsp.o \ > > > + sbrdsp.o > > > AVCODECOBJS-$(CONFIG_ALAC_DECODER) += alacdsp.o > > > AVCODECOBJS-$(CONFIG_DCA_DECODER) += synth_filter.o > > > AVCODECOBJS-$(CONFIG_JPEG2000_DECODER) += jpeg2000dsp.o > > > diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c > > > index e66744b162..29f201b1b3 100644 > > > --- a/tests/checkasm/checkasm.c > > > +++ b/tests/checkasm/checkasm.c > > > @@ -67,6 +67,7 @@ static const struct { > > > #if CONFIG_AVCODEC > > > #if CONFIG_AAC_DECODER > > > { "aacpsdsp", checkasm_check_aacpsdsp }, > > > +{ "sbrdsp", checkasm_check_sbrdsp }, > > > #endif > > > #if CONFIG_ALAC_DECODER > > > { "alacdsp", checkasm_check_alacdsp }, > > > diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h > > > index dfb0ce561c..fa51e71e4b 100644 > > > --- a/tests/checkasm/checkasm.h > > > +++ b/tests/checkasm/checkasm.h > > > @@ -50,6 +50,7 @@ void checkasm_check_hevc_idct(void); > > > void checkasm_check_jpeg2000dsp(void); > > > void checkasm_check_llviddsp(void); > > > void checkasm_check_pixblockdsp(void); > > > +void checkasm_check_sbrdsp(void); > > > void checkasm_check_synth_filter(void); > > > void checkasm_check_v210enc(void); > > > void checkasm_check_vp8dsp(void); > > > diff --git a/tests/checkasm/sbrdsp.c b/tests/checkasm/sbrdsp.c > > > new file mode 100644 > > > index 00..8333510c6b > > > --- /dev/null > > > +++ b/tests/checkasm/sbrdsp.c > > > @@ -0,0 +1,297 @@ > > > +/* > > > + * 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 "libavcodec/sbrdsp.h" > > > + > > > +#include "checkasm.h" > > > + > > > +#define randomize(buf, len) do {\ > > > +int i; \ > > > +for (i = 0; i < len; i++) { \ > > > +const INTFLOAT f = (INTFLOAT)rnd() / UINT_MAX; \ > > > +(buf)[i] = f; \ > > > +} \ > > > +} while (0) > > > + > > > +#define EPS 0.0001 > > > + > > > +static void test_sum64x5(void) > > > +{ > > > +LOCAL_ALIGNED_16(INTFLOAT, dst0, [64 + 256]); > > > +LOCAL_ALIGNED_16(INTFLOAT, dst1, [64 + 256]); > > > + > > > +declare_func(void, INTFLOAT *z); > > > + > > > +randomize((INTFLOAT *)dst0, 64 + 256); > > > +memcpy(dst1, dst0, (64 + 256) * sizeof(INTFLOAT)); > > > +call_ref(dst0); > > > +call_new(dst1); > > > +if (!float_near_abs_eps_array(dst0, dst1, EPS, 64 + 256)) > > > +fail(); > > > +bench_new(dst1); > > > +} > > > + > > > +static void test_sum_square(void) > > > +{ > > > +INTFLOAT res0; > > > +INTFLOAT res1; > > > +LOCAL_ALIGNED_16(INTFLOAT, src, [256], [2]); > > > + > > > +declare_func(INTFLOAT, INTFLOAT (*x)[2], int n); > > > + > > > +randomize((INTFLOAT *)src, 256 * 2); > > > +res0 = call_ref(src, 256); > > > +res1 = call_new(src, 256); > > > > This one is failing on
Re: [FFmpeg-devel] [PATCH 1/2] checkasm: add sbrdsp tests
On Thu, Jun 22, 2017 at 12:53:52PM -0300, James Almer wrote: > On 6/22/2017 9:56 AM, Matthieu Bouron wrote: > > --- > > > > The following patchset applies on top of Clément's aacpsdsp patchset. > > > > --- > > tests/checkasm/Makefile | 3 +- > > tests/checkasm/checkasm.c | 1 + > > tests/checkasm/checkasm.h | 1 + > > tests/checkasm/sbrdsp.c | 297 > > ++ > > 4 files changed, 301 insertions(+), 1 deletion(-) > > create mode 100644 tests/checkasm/sbrdsp.c > > > > diff --git a/tests/checkasm/Makefile b/tests/checkasm/Makefile > > index 638e811931..60e80ab738 100644 > > --- a/tests/checkasm/Makefile > > +++ b/tests/checkasm/Makefile > > @@ -13,7 +13,8 @@ AVCODECOBJS-$(CONFIG_VP8DSP)+= vp8dsp.o > > AVCODECOBJS-$(CONFIG_VIDEODSP) += videodsp.o > > > > # decoders/encoders > > -AVCODECOBJS-$(CONFIG_AAC_DECODER) += aacpsdsp.o > > +AVCODECOBJS-$(CONFIG_AAC_DECODER) += aacpsdsp.o \ > > + sbrdsp.o > > AVCODECOBJS-$(CONFIG_ALAC_DECODER) += alacdsp.o > > AVCODECOBJS-$(CONFIG_DCA_DECODER) += synth_filter.o > > AVCODECOBJS-$(CONFIG_JPEG2000_DECODER) += jpeg2000dsp.o > > diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c > > index e66744b162..29f201b1b3 100644 > > --- a/tests/checkasm/checkasm.c > > +++ b/tests/checkasm/checkasm.c > > @@ -67,6 +67,7 @@ static const struct { > > #if CONFIG_AVCODEC > > #if CONFIG_AAC_DECODER > > { "aacpsdsp", checkasm_check_aacpsdsp }, > > +{ "sbrdsp", checkasm_check_sbrdsp }, > > #endif > > #if CONFIG_ALAC_DECODER > > { "alacdsp", checkasm_check_alacdsp }, > > diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h > > index dfb0ce561c..fa51e71e4b 100644 > > --- a/tests/checkasm/checkasm.h > > +++ b/tests/checkasm/checkasm.h > > @@ -50,6 +50,7 @@ void checkasm_check_hevc_idct(void); > > void checkasm_check_jpeg2000dsp(void); > > void checkasm_check_llviddsp(void); > > void checkasm_check_pixblockdsp(void); > > +void checkasm_check_sbrdsp(void); > > void checkasm_check_synth_filter(void); > > void checkasm_check_v210enc(void); > > void checkasm_check_vp8dsp(void); > > diff --git a/tests/checkasm/sbrdsp.c b/tests/checkasm/sbrdsp.c > > new file mode 100644 > > index 00..8333510c6b > > --- /dev/null > > +++ b/tests/checkasm/sbrdsp.c > > @@ -0,0 +1,297 @@ > > +/* > > + * 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 "libavcodec/sbrdsp.h" > > + > > +#include "checkasm.h" > > + > > +#define randomize(buf, len) do {\ > > +int i; \ > > +for (i = 0; i < len; i++) { \ > > +const INTFLOAT f = (INTFLOAT)rnd() / UINT_MAX; \ > > +(buf)[i] = f; \ > > +} \ > > +} while (0) > > + > > +#define EPS 0.0001 > > + > > +static void test_sum64x5(void) > > +{ > > +LOCAL_ALIGNED_16(INTFLOAT, dst0, [64 + 256]); > > +LOCAL_ALIGNED_16(INTFLOAT, dst1, [64 + 256]); > > + > > +declare_func(void, INTFLOAT *z); > > + > > +randomize((INTFLOAT *)dst0, 64 + 256); > > +memcpy(dst1, dst0, (64 + 256) * sizeof(INTFLOAT)); > > +call_ref(dst0); > > +call_new(dst1); > > +if (!float_near_abs_eps_array(dst0, dst1, EPS, 64 + 256)) > > +fail(); > > +bench_new(dst1); > > +} > > + > > +static void test_sum_square(void) > > +{ > > +INTFLOAT res0; > > +INTFLOAT res1; > > +LOCAL_ALIGNED_16(INTFLOAT, src, [256], [2]); > > + > > +declare_func(INTFLOAT, INTFLOAT (*x)[2], int n); > > + > > +randomize((INTFLOAT *)src, 256 * 2); > > +res0 = call_ref(src, 256); > > +res1 = call_new(src, 256); > > This one is failing on x86 because the second argument has garbage in > the upper 32 bits of the grp. > > The solution is to either change n from int to ptrdiff_t, or zero the > upper bits of n in ff_sbr_sum_square_sse(), which can be done implicitly > in the first instruction. > > > +if (!float_near_abs_eps(res0, res1, EPS))
Re: [FFmpeg-devel] [PATCH 1/2] checkasm: add sbrdsp tests
On 6/22/2017 9:56 AM, Matthieu Bouron wrote: > --- > > The following patchset applies on top of Clément's aacpsdsp patchset. > > --- > tests/checkasm/Makefile | 3 +- > tests/checkasm/checkasm.c | 1 + > tests/checkasm/checkasm.h | 1 + > tests/checkasm/sbrdsp.c | 297 > ++ > 4 files changed, 301 insertions(+), 1 deletion(-) > create mode 100644 tests/checkasm/sbrdsp.c > > diff --git a/tests/checkasm/Makefile b/tests/checkasm/Makefile > index 638e811931..60e80ab738 100644 > --- a/tests/checkasm/Makefile > +++ b/tests/checkasm/Makefile > @@ -13,7 +13,8 @@ AVCODECOBJS-$(CONFIG_VP8DSP)+= vp8dsp.o > AVCODECOBJS-$(CONFIG_VIDEODSP) += videodsp.o > > # decoders/encoders > -AVCODECOBJS-$(CONFIG_AAC_DECODER) += aacpsdsp.o > +AVCODECOBJS-$(CONFIG_AAC_DECODER) += aacpsdsp.o \ > + sbrdsp.o > AVCODECOBJS-$(CONFIG_ALAC_DECODER) += alacdsp.o > AVCODECOBJS-$(CONFIG_DCA_DECODER) += synth_filter.o > AVCODECOBJS-$(CONFIG_JPEG2000_DECODER) += jpeg2000dsp.o > diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c > index e66744b162..29f201b1b3 100644 > --- a/tests/checkasm/checkasm.c > +++ b/tests/checkasm/checkasm.c > @@ -67,6 +67,7 @@ static const struct { > #if CONFIG_AVCODEC > #if CONFIG_AAC_DECODER > { "aacpsdsp", checkasm_check_aacpsdsp }, > +{ "sbrdsp", checkasm_check_sbrdsp }, > #endif > #if CONFIG_ALAC_DECODER > { "alacdsp", checkasm_check_alacdsp }, > diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h > index dfb0ce561c..fa51e71e4b 100644 > --- a/tests/checkasm/checkasm.h > +++ b/tests/checkasm/checkasm.h > @@ -50,6 +50,7 @@ void checkasm_check_hevc_idct(void); > void checkasm_check_jpeg2000dsp(void); > void checkasm_check_llviddsp(void); > void checkasm_check_pixblockdsp(void); > +void checkasm_check_sbrdsp(void); > void checkasm_check_synth_filter(void); > void checkasm_check_v210enc(void); > void checkasm_check_vp8dsp(void); > diff --git a/tests/checkasm/sbrdsp.c b/tests/checkasm/sbrdsp.c > new file mode 100644 > index 00..8333510c6b > --- /dev/null > +++ b/tests/checkasm/sbrdsp.c > @@ -0,0 +1,297 @@ > +/* > + * 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 "libavcodec/sbrdsp.h" > + > +#include "checkasm.h" > + > +#define randomize(buf, len) do {\ > +int i; \ > +for (i = 0; i < len; i++) { \ > +const INTFLOAT f = (INTFLOAT)rnd() / UINT_MAX; \ > +(buf)[i] = f; \ > +} \ > +} while (0) > + > +#define EPS 0.0001 > + > +static void test_sum64x5(void) > +{ > +LOCAL_ALIGNED_16(INTFLOAT, dst0, [64 + 256]); > +LOCAL_ALIGNED_16(INTFLOAT, dst1, [64 + 256]); > + > +declare_func(void, INTFLOAT *z); > + > +randomize((INTFLOAT *)dst0, 64 + 256); > +memcpy(dst1, dst0, (64 + 256) * sizeof(INTFLOAT)); > +call_ref(dst0); > +call_new(dst1); > +if (!float_near_abs_eps_array(dst0, dst1, EPS, 64 + 256)) > +fail(); > +bench_new(dst1); > +} > + > +static void test_sum_square(void) > +{ > +INTFLOAT res0; > +INTFLOAT res1; > +LOCAL_ALIGNED_16(INTFLOAT, src, [256], [2]); > + > +declare_func(INTFLOAT, INTFLOAT (*x)[2], int n); > + > +randomize((INTFLOAT *)src, 256 * 2); > +res0 = call_ref(src, 256); > +res1 = call_new(src, 256); This one is failing on x86 because the second argument has garbage in the upper 32 bits of the grp. The solution is to either change n from int to ptrdiff_t, or zero the upper bits of n in ff_sbr_sum_square_sse(), which can be done implicitly in the first instruction. > +if (!float_near_abs_eps(res0, res1, EPS)) > +fail(); > +bench_new(src, 256); > +} > + > +static void test_neg_odd_64(void) > +{ > +LOCAL_ALIGNED_16(INTFLOAT, dst0, [64]); > +LOCAL_ALIGNED_16(INTFLOAT, dst1, [64]); > + > +declare_func(void, INTFLOAT *x); > + > +randomize((INTFLOAT *)dst0, 64); > +memcpy(dst1, dst0, (64) *