diff options
author | Ramiro Polla <ramiro.polla@gmail.com> | 2024-07-04 11:40:17 +0200 |
---|---|---|
committer | Ramiro Polla <ramiro.polla@gmail.com> | 2024-07-10 12:25:03 +0200 |
commit | 4f7f9b102699306b449be27e7f3197f62cc1092d (patch) | |
tree | 91ed24372a610f4c8fd0b30d93c30ad6f5616e30 | |
parent | 7405f1ad5351cc24b91a0227aeeaf24ff9d12278 (diff) | |
download | ffmpeg-4f7f9b102699306b449be27e7f3197f62cc1092d.tar.gz |
swscale: remove unconditional #define DITHER1XBPP
This seems to have had an use in the past, but it is now defined
unconditionally.
-rw-r--r-- | libswscale/swscale_internal.h | 2 | ||||
-rw-r--r-- | libswscale/utils.c | 4 | ||||
-rw-r--r-- | libswscale/x86/swscale.c | 2 | ||||
-rw-r--r-- | libswscale/x86/swscale_template.c | 20 | ||||
-rw-r--r-- | libswscale/x86/yuv2rgb.c | 2 | ||||
-rw-r--r-- | libswscale/x86/yuv2rgb_template.c | 4 |
6 files changed, 0 insertions, 34 deletions
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index 0818f50c7f..e5610161d0 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -46,8 +46,6 @@ #define MAX_FILTER_SIZE SWS_MAX_FILTER_SIZE -#define DITHER1XBPP - #if HAVE_BIGENDIAN #define ALT32_CORR (-1) #else diff --git a/libswscale/utils.c b/libswscale/utils.c index 12dba712c1..bc8d7627e2 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1952,14 +1952,10 @@ static av_cold int sws_init_single_context(SwsContext *c, SwsFilter *srcFilter, av_log(c, AV_LOG_INFO, "%s scaler, from %s to %s%s ", scaler, av_get_pix_fmt_name(srcFormat), -#ifdef DITHER1XBPP dstFormat == AV_PIX_FMT_BGR555 || dstFormat == AV_PIX_FMT_BGR565 || dstFormat == AV_PIX_FMT_RGB444BE || dstFormat == AV_PIX_FMT_RGB444LE || dstFormat == AV_PIX_FMT_BGR444BE || dstFormat == AV_PIX_FMT_BGR444LE ? "dithered " : "", -#else - "", -#endif av_get_pix_fmt_name(dstFormat)); if (INLINE_MMXEXT(cpu_flags)) diff --git a/libswscale/x86/swscale.c b/libswscale/x86/swscale.c index ad7f67f90e..43319fd6b2 100644 --- a/libswscale/x86/swscale.c +++ b/libswscale/x86/swscale.c @@ -40,8 +40,6 @@ const DECLARE_ALIGNED(8, uint64_t, ff_dither8)[2] = { #if HAVE_INLINE_ASM -#define DITHER1XBPP - DECLARE_ASM_CONST(8, uint64_t, bF8)= 0xF8F8F8F8F8F8F8F8LL; DECLARE_ASM_CONST(8, uint64_t, bFC)= 0xFCFCFCFCFCFCFCFCLL; diff --git a/libswscale/x86/swscale_template.c b/libswscale/x86/swscale_template.c index 6190fcb4fe..6bff2a44aa 100644 --- a/libswscale/x86/swscale_template.c +++ b/libswscale/x86/swscale_template.c @@ -384,11 +384,9 @@ static void RENAME(yuv2rgb565_X_ar)(SwsContext *c, const int16_t *lumFilter, YSCALEYUV2RGBX "pxor %%mm7, %%mm7 \n\t" /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ -#ifdef DITHER1XBPP "paddusb "BLUE_DITHER"(%0), %%mm2\n\t" "paddusb "GREEN_DITHER"(%0), %%mm4\n\t" "paddusb "RED_DITHER"(%0), %%mm5\n\t" -#endif WRITERGB16(%4, "%5", %%FF_REGa) YSCALEYUV2PACKEDX_END } @@ -408,11 +406,9 @@ static void RENAME(yuv2rgb565_X)(SwsContext *c, const int16_t *lumFilter, YSCALEYUV2RGBX "pxor %%mm7, %%mm7 \n\t" /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ -#ifdef DITHER1XBPP "paddusb "BLUE_DITHER"(%0), %%mm2 \n\t" "paddusb "GREEN_DITHER"(%0), %%mm4 \n\t" "paddusb "RED_DITHER"(%0), %%mm5 \n\t" -#endif WRITERGB16(%4, "%5", %%FF_REGa) YSCALEYUV2PACKEDX_END } @@ -461,11 +457,9 @@ static void RENAME(yuv2rgb555_X_ar)(SwsContext *c, const int16_t *lumFilter, YSCALEYUV2RGBX "pxor %%mm7, %%mm7 \n\t" /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ -#ifdef DITHER1XBPP "paddusb "BLUE_DITHER"(%0), %%mm2\n\t" "paddusb "GREEN_DITHER"(%0), %%mm4\n\t" "paddusb "RED_DITHER"(%0), %%mm5\n\t" -#endif WRITERGB15(%4, "%5", %%FF_REGa) YSCALEYUV2PACKEDX_END } @@ -485,11 +479,9 @@ static void RENAME(yuv2rgb555_X)(SwsContext *c, const int16_t *lumFilter, YSCALEYUV2RGBX "pxor %%mm7, %%mm7 \n\t" /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ -#ifdef DITHER1XBPP "paddusb "BLUE_DITHER"(%0), %%mm2 \n\t" "paddusb "GREEN_DITHER"(%0), %%mm4 \n\t" "paddusb "RED_DITHER"(%0), %%mm5 \n\t" -#endif WRITERGB15(%4, "%5", %%FF_REGa) YSCALEYUV2PACKEDX_END } @@ -891,11 +883,9 @@ static void RENAME(yuv2rgb555_2)(SwsContext *c, const int16_t *buf[2], YSCALEYUV2RGB(%%FF_REGBP, %5) "pxor %%mm7, %%mm7 \n\t" /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ -#ifdef DITHER1XBPP "paddusb "BLUE_DITHER"(%5), %%mm2 \n\t" "paddusb "GREEN_DITHER"(%5), %%mm4 \n\t" "paddusb "RED_DITHER"(%5), %%mm5 \n\t" -#endif WRITERGB15(%%FF_REGb, DSTW_OFFSET"(%5)", %%FF_REGBP) "pop %%"FF_REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"FF_REG_b" \n\t" @@ -920,11 +910,9 @@ static void RENAME(yuv2rgb565_2)(SwsContext *c, const int16_t *buf[2], YSCALEYUV2RGB(%%FF_REGBP, %5) "pxor %%mm7, %%mm7 \n\t" /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ -#ifdef DITHER1XBPP "paddusb "BLUE_DITHER"(%5), %%mm2 \n\t" "paddusb "GREEN_DITHER"(%5), %%mm4 \n\t" "paddusb "RED_DITHER"(%5), %%mm5 \n\t" -#endif WRITERGB16(%%FF_REGb, DSTW_OFFSET"(%5)", %%FF_REGBP) "pop %%"FF_REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"FF_REG_b" \n\t" @@ -1240,11 +1228,9 @@ static void RENAME(yuv2rgb555_1)(SwsContext *c, const int16_t *buf0, YSCALEYUV2RGB1(%%FF_REGBP, %5) "pxor %%mm7, %%mm7 \n\t" /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ -#ifdef DITHER1XBPP "paddusb "BLUE_DITHER"(%5), %%mm2 \n\t" "paddusb "GREEN_DITHER"(%5), %%mm4 \n\t" "paddusb "RED_DITHER"(%5), %%mm5 \n\t" -#endif WRITERGB15(%%FF_REGb, DSTW_OFFSET"(%5)", %%FF_REGBP) "pop %%"FF_REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"FF_REG_b" \n\t" @@ -1261,11 +1247,9 @@ static void RENAME(yuv2rgb555_1)(SwsContext *c, const int16_t *buf0, YSCALEYUV2RGB1b(%%FF_REGBP, %5) "pxor %%mm7, %%mm7 \n\t" /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ -#ifdef DITHER1XBPP "paddusb "BLUE_DITHER"(%5), %%mm2 \n\t" "paddusb "GREEN_DITHER"(%5), %%mm4 \n\t" "paddusb "RED_DITHER"(%5), %%mm5 \n\t" -#endif WRITERGB15(%%FF_REGb, DSTW_OFFSET"(%5)", %%FF_REGBP) "pop %%"FF_REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"FF_REG_b" \n\t" @@ -1293,11 +1277,9 @@ static void RENAME(yuv2rgb565_1)(SwsContext *c, const int16_t *buf0, YSCALEYUV2RGB1(%%FF_REGBP, %5) "pxor %%mm7, %%mm7 \n\t" /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ -#ifdef DITHER1XBPP "paddusb "BLUE_DITHER"(%5), %%mm2 \n\t" "paddusb "GREEN_DITHER"(%5), %%mm4 \n\t" "paddusb "RED_DITHER"(%5), %%mm5 \n\t" -#endif WRITERGB16(%%FF_REGb, DSTW_OFFSET"(%5)", %%FF_REGBP) "pop %%"FF_REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"FF_REG_b" \n\t" @@ -1314,11 +1296,9 @@ static void RENAME(yuv2rgb565_1)(SwsContext *c, const int16_t *buf0, YSCALEYUV2RGB1b(%%FF_REGBP, %5) "pxor %%mm7, %%mm7 \n\t" /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ -#ifdef DITHER1XBPP "paddusb "BLUE_DITHER"(%5), %%mm2 \n\t" "paddusb "GREEN_DITHER"(%5), %%mm4 \n\t" "paddusb "RED_DITHER"(%5), %%mm5 \n\t" -#endif WRITERGB16(%%FF_REGb, DSTW_OFFSET"(%5)", %%FF_REGBP) "pop %%"FF_REG_BP" \n\t" "mov "ESP_OFFSET"(%5), %%"FF_REG_b" \n\t" diff --git a/libswscale/x86/yuv2rgb.c b/libswscale/x86/yuv2rgb.c index 41dfa80f33..ddc7cca2c8 100644 --- a/libswscale/x86/yuv2rgb.c +++ b/libswscale/x86/yuv2rgb.c @@ -39,8 +39,6 @@ #if HAVE_X86ASM -#define DITHER1XBPP // only for MMX - //SSSE3 versions #undef RENAME #define RENAME(a) a ## _ssse3 diff --git a/libswscale/x86/yuv2rgb_template.c b/libswscale/x86/yuv2rgb_template.c index a4741e6873..abaf80eec2 100644 --- a/libswscale/x86/yuv2rgb_template.c +++ b/libswscale/x86/yuv2rgb_template.c @@ -75,11 +75,9 @@ static inline int RENAME(yuv420_rgb15)(SwsContext *c, const uint8_t *src[], YUV2RGB_LOOP(2) -#ifdef DITHER1XBPP c->blueDither = ff_dither8[y & 1]; c->greenDither = ff_dither8[y & 1]; c->redDither = ff_dither8[(y + 1) & 1]; -#endif RENAME(ff_yuv_420_rgb15)(index, image, pu - index, pv - index, &(c->redDither), py - 2 * index); } @@ -95,11 +93,9 @@ static inline int RENAME(yuv420_rgb16)(SwsContext *c, const uint8_t *src[], YUV2RGB_LOOP(2) -#ifdef DITHER1XBPP c->blueDither = ff_dither8[y & 1]; c->greenDither = ff_dither4[y & 1]; c->redDither = ff_dither8[(y + 1) & 1]; -#endif RENAME(ff_yuv_420_rgb16)(index, image, pu - index, pv - index, &(c->redDither), py - 2 * index); } |