History

swscale/x86/swscale: Make M24 variables static

Andreas Rheinhardt committed 1 year ago

Commit 4afe61e1 parent 3797e922 files · +12 −12Browse files

Unified · Split

2 files
  1. libswscale/x86/swscale.c +3 −3
  2. libswscale/x86/swscale_template.c +9 −9
libswscale/x86/swscale.c+3−3
@@ -43,9 +43,9 @@ const DECLARE_ALIGNED(8, uint64_t, ff_dither8)[2] = { · 42 unmodified lines
43DECLARE_ASM_CONST(8, uint64_t, bF8)= 0xF8F8F8F8F8F8F8F8LL;43DECLARE_ASM_CONST(8, uint64_t, bF8)= 0xF8F8F8F8F8F8F8F8LL;
44DECLARE_ASM_CONST(8, uint64_t, bFC)= 0xFCFCFCFCFCFCFCFCLL;44DECLARE_ASM_CONST(8, uint64_t, bFC)= 0xFCFCFCFCFCFCFCFCLL;
45 45
46DECLARE_ASM_ALIGNED(8, const uint64_t, ff_M24A) = 0x00FF0000FF0000FFLL;46DECLARE_ASM_CONST(8, uint64_t, M24A) = 0x00FF0000FF0000FFLL;
47DECLARE_ASM_ALIGNED(8, const uint64_t, ff_M24B) = 0xFF0000FF0000FF00LL;47DECLARE_ASM_CONST(8, uint64_t, M24B) = 0xFF0000FF0000FF00LL;
48DECLARE_ASM_ALIGNED(8, const uint64_t, ff_M24C) = 0x0000FF0000FF0000LL;48DECLARE_ASM_CONST(8, uint64_t, M24C) = 0x0000FF0000FF0000LL;
49 49
50// MMXEXT versions50// MMXEXT versions
51#if HAVE_MMXEXT_INLINE51#if HAVE_MMXEXT_INLINE
libswscale/x86/swscale_template.c+9−9
@@ -541,8 +541,8 @@ static void RENAME(yuv2rgb555_X)(SwsInternal *c, const int16_t *lumFilter, · 540 unmodified lines
541 541
542#define WRITEBGR24MMXEXT(dst, dstw, index) \542#define WRITEBGR24MMXEXT(dst, dstw, index) \
543 /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */\543 /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */\
544 "movq "MANGLE(ff_M24A)", %%mm0 \n\t"\544 "movq "MANGLE(M24A)", %%mm0 \n\t"\
545 "movq "MANGLE(ff_M24C)", %%mm7 \n\t"\545 "movq "MANGLE(M24C)", %%mm7 \n\t"\
546 "pshufw $0x50, %%mm2, %%mm1 \n\t" /* B3 B2 B3 B2 B1 B0 B1 B0 */\546 "pshufw $0x50, %%mm2, %%mm1 \n\t" /* B3 B2 B3 B2 B1 B0 B1 B0 */\
547 "pshufw $0x50, %%mm4, %%mm3 \n\t" /* G3 G2 G3 G2 G1 G0 G1 G0 */\547 "pshufw $0x50, %%mm4, %%mm3 \n\t" /* G3 G2 G3 G2 G1 G0 G1 G0 */\
548 "pshufw $0x00, %%mm5, %%mm6 \n\t" /* R1 R0 R1 R0 R1 R0 R1 R0 */\548 "pshufw $0x00, %%mm5, %%mm6 \n\t" /* R1 R0 R1 R0 R1 R0 R1 R0 */\
@@ -561,7 +561,7 @@ static void RENAME(yuv2rgb555_X)(SwsInternal *c, const int16_t *lumFilter, · 12 unmodified lines
561 "pshufw $0x55, %%mm4, %%mm3 \n\t" /* G4 G3 G4 G3 G4 G3 G4 G3 */\561 "pshufw $0x55, %%mm4, %%mm3 \n\t" /* G4 G3 G4 G3 G4 G3 G4 G3 */\
562 "pshufw $0xA5, %%mm5, %%mm6 \n\t" /* R5 R4 R5 R4 R3 R2 R3 R2 */\562 "pshufw $0xA5, %%mm5, %%mm6 \n\t" /* R5 R4 R5 R4 R3 R2 R3 R2 */\
563\563\
564 "pand "MANGLE(ff_M24B)", %%mm1 \n\t" /* B5 B4 B3 */\564 "pand "MANGLE(M24B)", %%mm1 \n\t" /* B5 B4 B3 */\
565 "pand %%mm7, %%mm3 \n\t" /* G4 G3 */\565 "pand %%mm7, %%mm3 \n\t" /* G4 G3 */\
566 "pand %%mm0, %%mm6 \n\t" /* R4 R3 R2 */\566 "pand %%mm0, %%mm6 \n\t" /* R4 R3 R2 */\
567\567\
@@ -575,7 +575,7 @@ static void RENAME(yuv2rgb555_X)(SwsInternal *c, const int16_t *lumFilter, · 7 unmodified lines
575\575\
576 "pand %%mm7, %%mm1 \n\t" /* B7 B6 */\576 "pand %%mm7, %%mm1 \n\t" /* B7 B6 */\
577 "pand %%mm0, %%mm3 \n\t" /* G7 G6 G5 */\577 "pand %%mm0, %%mm3 \n\t" /* G7 G6 G5 */\
578 "pand "MANGLE(ff_M24B)", %%mm6 \n\t" /* R7 R6 R5 */\578 "pand "MANGLE(M24B)", %%mm6 \n\t" /* R7 R6 R5 */\
579\579\
580 "por %%mm1, %%mm3 \n\t"\580 "por %%mm1, %%mm3 \n\t"\
581 "por %%mm3, %%mm6 \n\t"\581 "por %%mm3, %%mm6 \n\t"\
@@ -611,7 +611,7 @@ static void RENAME(yuv2bgr24_X_ar)(SwsInternal *c, const int16_t *lumFilter, · 29 unmodified lines
611 :: "r" (&c->redDither),611 :: "r" (&c->redDither),
612 "m" (dummy), "m" (dummy), "m" (dummy),612 "m" (dummy), "m" (dummy), "m" (dummy),
613 "r" (dest), "m" (dstW_reg), "m"(uv_off)613 "r" (dest), "m" (dstW_reg), "m"(uv_off)
614 NAMED_CONSTRAINTS_ADD(ff_M24A,ff_M24C,ff_M24B)614 NAMED_CONSTRAINTS_ADD(M24A,M24C,M24B)
615 : "%"FF_REG_a, "%"FF_REG_c, "%"FF_REG_d, "%"FF_REG_S615 : "%"FF_REG_a, "%"FF_REG_c, "%"FF_REG_d, "%"FF_REG_S
616 );616 );
617}617}
@@ -636,7 +636,7 @@ static void RENAME(yuv2bgr24_X)(SwsInternal *c, const int16_t *lumFilter, · 18 unmodified lines
636 :: "r" (&c->redDither),636 :: "r" (&c->redDither),
637 "m" (dummy), "m" (dummy), "m" (dummy),637 "m" (dummy), "m" (dummy), "m" (dummy),
638 "r" (dest), "m" (dstW_reg), "m"(uv_off)638 "r" (dest), "m" (dstW_reg), "m"(uv_off)
639 NAMED_CONSTRAINTS_ADD(ff_M24A,ff_M24C,ff_M24B)639 NAMED_CONSTRAINTS_ADD(M24A,M24C,M24B)
640 : "%"FF_REG_a, "%"FF_REG_c, "%"FF_REG_d, "%"FF_REG_S640 : "%"FF_REG_a, "%"FF_REG_c, "%"FF_REG_d, "%"FF_REG_S
641 );641 );
642}642}
@@ -864,7 +864,7 @@ static void RENAME(yuv2bgr24_2)(SwsInternal *c, const int16_t *buf[2], · 221 unmodified lines
864 "mov "ESP_OFFSET"(%5), %%"FF_REG_b" \n\t"864 "mov "ESP_OFFSET"(%5), %%"FF_REG_b" \n\t"
865 :: "c" (buf0), "d" (buf1), "S" (ubuf0), "D" (ubuf1), "m" (dest),865 :: "c" (buf0), "d" (buf1), "S" (ubuf0), "D" (ubuf1), "m" (dest),
866 "a" (&c->redDither)866 "a" (&c->redDither)
867 NAMED_CONSTRAINTS_ADD(ff_M24A,ff_M24C,ff_M24B)867 NAMED_CONSTRAINTS_ADD(M24A,M24C,M24B)
868 );868 );
869}869}
870 870
@@ -1191,7 +1191,7 @@ static void RENAME(yuv2bgr24_1)(SwsInternal *c, const int16_t *buf0, · 320 unmodified lines
1191 "mov "ESP_OFFSET"(%5), %%"FF_REG_b" \n\t"1191 "mov "ESP_OFFSET"(%5), %%"FF_REG_b" \n\t"
1192 :: "c" (buf0), "d" (buf1), "S" (ubuf0), "D" (ubuf1), "m" (dest),1192 :: "c" (buf0), "d" (buf1), "S" (ubuf0), "D" (ubuf1), "m" (dest),
1193 "a" (&c->redDither)1193 "a" (&c->redDither)
1194 NAMED_CONSTRAINTS_ADD(ff_M24A,ff_M24C,ff_M24B)1194 NAMED_CONSTRAINTS_ADD(M24A,M24C,M24B)
1195 );1195 );
1196 } else {1196 } else {
1197 const int16_t *ubuf1 = ubuf[1];1197 const int16_t *ubuf1 = ubuf[1];
@@ -1206,7 +1206,7 @@ static void RENAME(yuv2bgr24_1)(SwsInternal *c, const int16_t *buf0, · 8 unmodified lines
1206 "mov "ESP_OFFSET"(%5), %%"FF_REG_b" \n\t"1206 "mov "ESP_OFFSET"(%5), %%"FF_REG_b" \n\t"
1207 :: "c" (buf0), "d" (buf1), "S" (ubuf0), "D" (ubuf1), "m" (dest),1207 :: "c" (buf0), "d" (buf1), "S" (ubuf0), "D" (ubuf1), "m" (dest),
1208 "a" (&c->redDither)1208 "a" (&c->redDither)
1209 NAMED_CONSTRAINTS_ADD(ff_M24A,ff_M24C,ff_M24B)1209 NAMED_CONSTRAINTS_ADD(M24A,M24C,M24B)
1210 );1210 );
1211 }1211 }
1212}1212}

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