Re: [FFmpeg-devel] [PATCH]v6 Opus Pyramid Vector Quantization Search in x86 SIMD asm

2017-08-06 Thread Henrik Gramner
On Sat, Aug 5, 2017 at 12:58 AM, Ivan Kalvachev wrote: > 8 packed, 8 scalar. > > Unless I miss something (and as I've said before, > I'm not confident enough to mess with that code.) > > (AVX does extend to 32 variants, but they are not > SSE compatible, so no need to emulate them.) Oh, right. I

Re: [FFmpeg-devel] [PATCH]v6 Opus Pyramid Vector Quantization Search in x86 SIMD asm

2017-08-05 Thread Ivan Kalvachev
On 8/5/17, Hendrik Leppkes wrote: > On Sat, Aug 5, 2017 at 12:21 PM, Ivan Kalvachev > wrote: >> On 8/5/17, Rostislav Pehlivanov wrote: >>> On 4 August 2017 at 23:58, Ivan Kalvachev wrote: >>> >> I had it mixed before, but I changed it to be consistent. >> Some new avx instruction

Re: [FFmpeg-devel] [PATCH]v6 Opus Pyramid Vector Quantization Search in x86 SIMD asm

2017-08-05 Thread Hendrik Leppkes
On Sat, Aug 5, 2017 at 12:21 PM, Ivan Kalvachev wrote: > On 8/5/17, Rostislav Pehlivanov wrote: >> On 4 August 2017 at 23:58, Ivan Kalvachev wrote: >> >>> >>> >> I had it mixed before, but I changed it to be consistent. >>> >> Some new avx instruction are not overloaded or >>> >> available witho

Re: [FFmpeg-devel] [PATCH]v6 Opus Pyramid Vector Quantization Search in x86 SIMD asm

2017-08-05 Thread Ivan Kalvachev
On 8/5/17, Rostislav Pehlivanov wrote: > On 4 August 2017 at 23:58, Ivan Kalvachev wrote: > >> >> >> I had it mixed before, but I changed it to be consistent. >> >> Some new avx instruction are not overloaded or >> >> available without their "v-" prefix. >> >> e.g. x86util uses vpbroadcastw in SP

Re: [FFmpeg-devel] [PATCH]v6 Opus Pyramid Vector Quantization Search in x86 SIMD asm

2017-08-04 Thread Rostislav Pehlivanov
On 4 August 2017 at 23:58, Ivan Kalvachev wrote: > > >> I had it mixed before, but I changed it to be consistent. > >> Some new avx instruction are not overloaded or > >> available without their "v-" prefix. > >> e.g. x86util uses vpbroadcastw in SPLATW. > > > > Every instruction that has both a

Re: [FFmpeg-devel] [PATCH]v6 Opus Pyramid Vector Quantization Search in x86 SIMD asm

2017-08-04 Thread Ivan Kalvachev
On 8/4/17, Henrik Gramner wrote: > On Thu, Aug 3, 2017 at 11:36 PM, Ivan Kalvachev > wrote: >>> 1234_1234_1234_123 >>> VBROADCASTSS ym1, xm1 >>> BLENDVPS m1, m2, m3 >>> >>> is the most commonly used alignment. >> >> I see that a lot of .asm files use different alignments.

Re: [FFmpeg-devel] [PATCH]v6 Opus Pyramid Vector Quantization Search in x86 SIMD asm

2017-08-04 Thread Henrik Gramner
On Thu, Aug 3, 2017 at 11:36 PM, Ivan Kalvachev wrote: >> 1234_1234_1234_123 >> VBROADCASTSS ym1, xm1 >> BLENDVPS m1, m2, m3 >> >> is the most commonly used alignment. > > I see that a lot of .asm files use different alignments. > I'll try to pick something similar that I

Re: [FFmpeg-devel] [PATCH]v6 Opus Pyramid Vector Quantization Search in x86 SIMD asm

2017-08-03 Thread Ivan Kalvachev
On 8/2/17, Henrik Gramner wrote: > On Tue, Aug 1, 2017 at 11:46 PM, Ivan Kalvachev > wrote: >> On 7/31/17, Henrik Gramner wrote: >>> Use rN instead of rNq for numbered registers (q suffix is used for >>> named args only due to preprocessor limitations). >> >> Is this documented? > > Not sure, bu

Re: [FFmpeg-devel] [PATCH]v6 Opus Pyramid Vector Quantization Search in x86 SIMD asm

2017-08-02 Thread Henrik Gramner
On Tue, Aug 1, 2017 at 11:46 PM, Ivan Kalvachev wrote: > On 7/31/17, Henrik Gramner wrote: >> Use rN instead of rNq for numbered registers (q suffix is used for >> named args only due to preprocessor limitations). > > Is this documented? Not sure, but there's probably a bunch small things like t

Re: [FFmpeg-devel] [PATCH]v6 Opus Pyramid Vector Quantization Search in x86 SIMD asm

2017-08-01 Thread Ivan Kalvachev
On 7/31/17, Henrik Gramner wrote: > On Wed, Jul 26, 2017 at 4:56 PM, Ivan Kalvachev > wrote: >> +++ b/libavcodec/x86/opus_pvq_search.asm > > Generic minor stuff: > > Use rN instead of rNq for numbered registers (q suffix is used for > named args only due to preprocessor limitations). Done. Is t

Re: [FFmpeg-devel] [PATCH]v6 Opus Pyramid Vector Quantization Search in x86 SIMD asm

2017-07-31 Thread Henrik Gramner
On Wed, Jul 26, 2017 at 4:56 PM, Ivan Kalvachev wrote: > +++ b/libavcodec/x86/opus_pvq_search.asm Generic minor stuff: Use rN instead of rNq for numbered registers (q suffix is used for named args only due to preprocessor limitations). Use the same "standard" vertical alignment rules as most ex

Re: [FFmpeg-devel] [PATCH]v6 Opus Pyramid Vector Quantization Search in x86 SIMD asm

2017-07-27 Thread Ivan Kalvachev
On 7/27/17, Rostislav Pehlivanov wrote: > On 27 July 2017 at 09:38, Ivan Kalvachev wrote: > >> On 7/27/17, Rostislav Pehlivanov wrote: >> > On 26 July 2017 at 15:56, Ivan Kalvachev wrote: >> > >> >> +if (ARCH_X86 && CONFIG_OPUS_ENCODER) >> >> +ff_opus_dsp_init_x86(s); >> >> >> > >>

Re: [FFmpeg-devel] [PATCH]v6 Opus Pyramid Vector Quantization Search in x86 SIMD asm

2017-07-27 Thread Rostislav Pehlivanov
On 27 July 2017 at 09:38, Ivan Kalvachev wrote: > On 7/27/17, Rostislav Pehlivanov wrote: > > On 26 July 2017 at 15:56, Ivan Kalvachev wrote: > > > >> +if (ARCH_X86 && CONFIG_OPUS_ENCODER) > >> +ff_opus_dsp_init_x86(s); > >> > > > > Just change it to > > +if (ARCH_X86) > > > > T

Re: [FFmpeg-devel] [PATCH]v6 Opus Pyramid Vector Quantization Search in x86 SIMD asm

2017-07-27 Thread Ivan Kalvachev
On 7/27/17, Rostislav Pehlivanov wrote: > On 26 July 2017 at 15:56, Ivan Kalvachev wrote: > >> +if (ARCH_X86 && CONFIG_OPUS_ENCODER) >> +ff_opus_dsp_init_x86(s); >> > > Just change it to > +if (ARCH_X86) > > The init function is named opus_dsp, so it'll get used to other opus > th

Re: [FFmpeg-devel] [PATCH]v6 Opus Pyramid Vector Quantization Search in x86 SIMD asm

2017-07-26 Thread Rostislav Pehlivanov
On 26 July 2017 at 15:56, Ivan Kalvachev wrote: > +if (ARCH_X86 && CONFIG_OPUS_ENCODER) > +ff_opus_dsp_init_x86(s); > Just change it to +if (ARCH_X86) The init function is named opus_dsp, so it'll get used to other opus things, not just the encoder. The assembly code looks fin

[FFmpeg-devel] [PATCH]v6 Opus Pyramid Vector Quantization Search in x86 SIMD asm

2017-07-26 Thread Ivan Kalvachev
On 7/24/17, Ivan Kalvachev wrote: > On 7/23/17, Rostislav Pehlivanov wrote: >> On 22 July 2017 at 12:18, Ivan Kalvachev wrote: >> >>> This patch is ready for review and inclusion. >>> >>> >>> >>>+%macro emu_blendvps 3 ; dst/src_a, src_b, mask >>>+%macro lea_pic_base 2; reg, const_label >> Capita