Skip to content

Commit 6ec64a2

Browse files
committed
Removed odd functions
1 parent f485ce9 commit 6ec64a2

File tree

6 files changed

+4
-146
lines changed

6 files changed

+4
-146
lines changed

include/lsp-plug.in/dsp/common/3dmath.h

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
* (C) 2020 Vladimir Sadovnikov <sadko4u@gmail.com>
2+
* Copyright (C) 2025 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2025 Vladimir Sadovnikov <sadko4u@gmail.com>
44
*
55
* This file is part of lsp-dsp-lib
66
* Created on: 31 мар. 2020 г.
@@ -177,36 +177,6 @@ LSP_DSP_LIB_SYMBOL(void, vector_mul_v2, LSP_DSP_LIB_TYPE(vector3d_t) *r, const L
177177
*/
178178
LSP_DSP_LIB_SYMBOL(void, vector_mul_vv, LSP_DSP_LIB_TYPE(vector3d_t) *r, const LSP_DSP_LIB_TYPE(vector3d_t) *vv);
179179

180-
/** Init segment using coordinates of 2 points
181-
*
182-
* @param s segment to initialize
183-
* @param x0 point 1 X coordinate
184-
* @param y0 point 1 Y coordinate
185-
* @param z0 point 1 Z coordinate
186-
* @param x1 point 2 X coordinate
187-
* @param y1 point 2 Y coordinate
188-
* @param z1 point 2 Z coordinate
189-
*/
190-
LSP_DSP_LIB_SYMBOL(void, init_segment_xyz, LSP_DSP_LIB_TYPE(segment3d_t) *s,
191-
float x0, float y0, float z0,
192-
float x1, float y1, float z1
193-
);
194-
195-
/** Init segment using two points
196-
*
197-
* @param s segment to initialize
198-
* @param p1 point 1
199-
* @param p2 point 2
200-
*/
201-
LSP_DSP_LIB_SYMBOL(void, init_segment_p2, LSP_DSP_LIB_TYPE(segment3d_t) *s, const LSP_DSP_LIB_TYPE(point3d_t) *p1, const LSP_DSP_LIB_TYPE(point3d_t) *p2);
202-
203-
/** Init segment using array of two points
204-
*
205-
* @param s segment to initialize
206-
* @param p array of points
207-
*/
208-
LSP_DSP_LIB_SYMBOL(void, init_segment_pv, LSP_DSP_LIB_TYPE(segment3d_t) *s, const LSP_DSP_LIB_TYPE(point3d_t) *p);
209-
210180
/** Initialize matrix (make copy)
211181
*
212182
* @param dst destination matrix

include/lsp-plug.in/dsp/common/3dmath/types.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ typedef struct LSP_DSP_LIB_TYPE(bound_box3d_t)
5858
LSP_DSP_LIB_TYPE(point3d_t) p[8]; // Bounding-box contains 8 points
5959
} LSP_DSP_LIB_TYPE(bound_box3d_t);
6060

61-
typedef struct LSP_DSP_LIB_TYPE(segment3d_t)
62-
{
63-
LSP_DSP_LIB_TYPE(point3d_t) p[2];
64-
} LSP_DSP_LIB_TYPE(segment3d_t);
6561

6662
typedef struct LSP_DSP_LIB_TYPE(triangle3d_t)
6763
{

include/private/dsp/arch/generic/3dmath.h

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -339,34 +339,6 @@ namespace lsp
339339
normalize_vector(&l->v);
340340
}
341341

342-
void init_segment_xyz(segment3d_t *s,
343-
float x0, float y0, float z0,
344-
float x1, float y1, float z1
345-
)
346-
{
347-
s->p[0].x = x0;
348-
s->p[0].y = y0;
349-
s->p[0].z = z0;
350-
s->p[0].w = 0.0f;
351-
352-
s->p[1].x = x1;
353-
s->p[1].y = y1;
354-
s->p[1].z = z1;
355-
s->p[1].w = 0.0f;
356-
}
357-
358-
void init_segment_p2(segment3d_t *s, const point3d_t *p1, const point3d_t *p2)
359-
{
360-
s->p[0] = *p1;
361-
s->p[1] = *p2;
362-
}
363-
364-
void init_segment_pv(segment3d_t *s, const point3d_t *p)
365-
{
366-
s->p[0] = p[0];
367-
s->p[1] = p[1];
368-
}
369-
370342
void calc_triangle3d_params(triangle3d_t *t)
371343
{
372344
// Calculate edge parameters

include/private/dsp/arch/x86/sse/3dmath.h

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -933,78 +933,6 @@ namespace lsp
933933
);
934934
}
935935

936-
void init_segment_xyz(segment3d_t *s,
937-
float x0, float y0, float z0,
938-
float x1, float y1, float z1
939-
)
940-
{
941-
float x7;
942-
943-
ARCH_X86_ASM
944-
(
945-
// xmm0 = x0 ? ? ?
946-
// xmm1 = y0 ? ? ?
947-
// xmm2 = z0 ? ? ?
948-
// xmm3 = x1 ? ? ?
949-
// xmm4 = y1 ? ? ?
950-
// xmm5 = z1 ? ? ?
951-
__ASM_EMIT("movaps %[idm0], %[x7]") // xmm7 = 1 0 0 0
952-
__ASM_EMIT("movlhps %[x1], %[x0]") // xmm0 = x0 ? y0 ?
953-
__ASM_EMIT("movlhps %[x4], %[x3]") // xmm3 = x1 ? y1 ?
954-
__ASM_EMIT("movlhps %[x7], %[x2]") // xmm2 = z0 ? 1 0
955-
__ASM_EMIT("movlhps %[x7], %[x5]") // xmm5 = z1 ? 1 0
956-
__ASM_EMIT("shufps $0xc8, %[x2], %[x0]") // xmm2 = x0 y0 z0 0
957-
__ASM_EMIT("shufps $0xc8, %[x5], %[x3]") // xmm5 = x1 y1 z1 0
958-
__ASM_EMIT("movups %[x2], 0x00(%[s])")
959-
__ASM_EMIT("movups %[x5], 0x10(%[s])")
960-
961-
: [x0] "+x" (x0), [x1] "+x" (y0), [x2] "+x" (z0),
962-
[x3] "+x" (x1), [x4] "+x" (y1), [x5] "+x" (z1),
963-
[x7] "=&x" (x7)
964-
: [s] "r" (s),
965-
[idm0] "m" (IDENTITY0)
966-
: "memory"
967-
);
968-
}
969-
970-
void init_segment_p2(segment3d_t *s, const point3d_t *p1, const point3d_t *p2)
971-
{
972-
float x0, x1;
973-
974-
ARCH_X86_ASM
975-
(
976-
__ASM_EMIT("movups 0x00(%[p1]), %[x0]") // xmm0 = x0 y0 z0 w0
977-
__ASM_EMIT("movups 0x00(%[p2]), %[x1]") // xmm1 = x1 y1 z1 w1
978-
__ASM_EMIT("movups %[x0], 0x00(%[s])")
979-
__ASM_EMIT("movups %[x1], 0x10(%[s])")
980-
981-
: [x0] "=&x" (x0), [x1] "=&x" (x1)
982-
: [s] "r" (s),
983-
[p1] "r" (p1),
984-
[p2] "r" (p2)
985-
: "memory"
986-
);
987-
}
988-
989-
void init_segment_pv(segment3d_t *s, const point3d_t *p)
990-
{
991-
float x0, x1;
992-
993-
ARCH_X86_ASM
994-
(
995-
__ASM_EMIT("movups 0x00(%[p]), %[x0]") // xmm0 = x0 y0 z0 w0
996-
__ASM_EMIT("movups 0x10(%[p]), %[x1]") // xmm1 = x1 y1 z1 w1
997-
__ASM_EMIT("movups %[x0], 0x00(%[s])")
998-
__ASM_EMIT("movups %[x1], 0x10(%[s])")
999-
1000-
: [x0] "=&x" (x0), [x1] "=&x" (x1)
1001-
: [s] "r" (s),
1002-
[p] "r" (p)
1003-
: "memory"
1004-
);
1005-
}
1006-
1007-
1008936
void init_matrix3d(matrix3d_t *dst, const matrix3d_t *src)
1009937
{
1010938
ARCH_X86_ASM

src/main/generic/generic.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -498,10 +498,6 @@ namespace lsp
498498
EXPORT1(init_normal3d_dxyz);
499499
EXPORT1(init_normal3d);
500500

501-
EXPORT1(init_segment_xyz);
502-
EXPORT1(init_segment_p2);
503-
EXPORT1(init_segment_pv);
504-
505501
EXPORT1(init_matrix3d);
506502
EXPORT1(init_matrix3d_zero);
507503
EXPORT1(init_matrix3d_one);

src/main/x86/sse.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
* (C) 2024 Vladimir Sadovnikov <sadko4u@gmail.com>
2+
* Copyright (C) 2025 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2025 Vladimir Sadovnikov <sadko4u@gmail.com>
44
*
55
* This file is part of lsp-dsp-lib
66
* Created on: 31 мар. 2020 г.
@@ -432,10 +432,6 @@
432432
EXPORT1(calc_ray_pv);
433433
EXPORT1(calc_ray);
434434

435-
EXPORT1(init_segment_xyz);
436-
EXPORT1(init_segment_p2);
437-
EXPORT1(init_segment_pv);
438-
439435
EXPORT1(init_matrix3d);
440436
EXPORT1(init_matrix3d_zero);
441437
EXPORT1(init_matrix3d_one);

0 commit comments

Comments
 (0)