History

avcodec/x86/vvc/vvcdsp_init: fix unresolved external symbol on ARCH_X86_32

Wu Jianhua committed 2 years ago

Commit 33728761 parent 7f920141 file · +40 −38Browse files

Unified · Split

libavcodec/x86/vvc/vvcdsp_init.c+40−38
@@ -31,6 +31,7 @@ · 30 unmodified lines
3131 #include "libavcodec/vvc/vvcdsp.h"
3232 #include "libavcodec/x86/h26x/h2656dsp.h"
3333
34+#if ARCH_X86_64
3435 #define FW_PUT(name, depth, opt) \
3536 static void ff_vvc_put_ ## name ## _ ## depth ## _##opt(int16_t *dst, const uint8_t *src, ptrdiff_t srcstride, \
3637 int height, const int8_t *hf, const int8_t *vf, int width) \
@@ -204,51 +205,52 @@ AVG_FUNCS(16, 12, avx2) · 167 unmodified lines
204205 c->inter.avg = bf(avg, bd, opt); \
205206 c->inter.w_avg = bf(w_avg, bd, opt); \
206207 } while (0)
208+#endif
207209
208210 void ff_vvc_dsp_init_x86(VVCDSPContext *const c, const int bd)
209211 {
212+#if ARCH_X86_64
210213 const int cpu_flags = av_get_cpu_flags();
211214
212− if (ARCH_X86_64) {
213− if (bd == 8) {
214− if (EXTERNAL_SSE4(cpu_flags)) {
215− MC_LINK_SSE4(8);
216− }
217− if (EXTERNAL_AVX2_FAST(cpu_flags)) {
218− MC_LINKS_AVX2(8);
219− }
220− } else if (bd == 10) {
221− if (EXTERNAL_SSE4(cpu_flags)) {
222− MC_LINK_SSE4(10);
223− }
224− if (EXTERNAL_AVX2_FAST(cpu_flags)) {
225− MC_LINKS_AVX2(10);
226− MC_LINKS_16BPC_AVX2(10);
227− }
228− } else if (bd == 12) {
229− if (EXTERNAL_SSE4(cpu_flags)) {
230− MC_LINK_SSE4(12);
231− }
232− if (EXTERNAL_AVX2_FAST(cpu_flags)) {
233− MC_LINKS_AVX2(12);
234− MC_LINKS_16BPC_AVX2(12);
235− }
215+ if (bd == 8) {
216+ if (EXTERNAL_SSE4(cpu_flags)) {
217+ MC_LINK_SSE4(8);
236218 }
219+ if (EXTERNAL_AVX2_FAST(cpu_flags)) {
220+ MC_LINKS_AVX2(8);
221+ }
222+ } else if (bd == 10) {
223+ if (EXTERNAL_SSE4(cpu_flags)) {
224+ MC_LINK_SSE4(10);
225+ }
226+ if (EXTERNAL_AVX2_FAST(cpu_flags)) {
227+ MC_LINKS_AVX2(10);
228+ MC_LINKS_16BPC_AVX2(10);
229+ }
230+ } else if (bd == 12) {
231+ if (EXTERNAL_SSE4(cpu_flags)) {
232+ MC_LINK_SSE4(12);
233+ }
234+ if (EXTERNAL_AVX2_FAST(cpu_flags)) {
235+ MC_LINKS_AVX2(12);
236+ MC_LINKS_16BPC_AVX2(12);
237+ }
238+ }
237239
238− if (EXTERNAL_AVX2(cpu_flags)) {
239− switch (bd) {
240− case 8:
241− AVG_INIT(8, avx2);
242− break;
243− case 10:
244− AVG_INIT(10, avx2);
245− break;
246− case 12:
247− AVG_INIT(12, avx2);
248− break;
249− default:
250− break;
251− }
240+ if (EXTERNAL_AVX2(cpu_flags)) {
241+ switch (bd) {
242+ case 8:
243+ AVG_INIT(8, avx2);
244+ break;
245+ case 10:
246+ AVG_INIT(10, avx2);
247+ break;
248+ case 12:
249+ AVG_INIT(12, avx2);
250+ break;
251+ default:
252+ break;
252253 }
253254 }
255+#endif
254256 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t