PR #23566 opened by Ramiro Polla (ramiro) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23566 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23566.patch
These helpers are also needed for uops. >From 82032d01f8a870aadf57ed933aa2376695b24ad3 Mon Sep 17 00:00:00 2001 From: Ramiro Polla <[email protected]> Date: Tue, 23 Jun 2026 17:16:48 +0200 Subject: [PATCH] swscale/uops: move SWS_MASK* from ops.h to uops.h These helpers are also needed for uops. --- libswscale/ops.h | 21 --------------------- libswscale/uops.h | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/libswscale/ops.h b/libswscale/ops.h index 38e9fbcc26..f2a57612b4 100644 --- a/libswscale/ops.h +++ b/libswscale/ops.h @@ -198,27 +198,6 @@ typedef struct SwsLinearOp { uint32_t mask; /* m[i][j] <-> 1 << (5 * i + j) */ } SwsLinearOp; -#define SWS_MASK(I, J) (1 << (5 * (I) + (J))) -#define SWS_MASK_OFF(I) SWS_MASK(I, 4) -#define SWS_MASK_ROW(I) (0x1F << (5 * (I))) -#define SWS_MASK_COL(J) (0x8421 << J) - -enum { - SWS_MASK_ALL = (1 << 20) - 1, - SWS_MASK_LUMA = SWS_MASK(0, 0) | SWS_MASK_OFF(0), - SWS_MASK_ALPHA = SWS_MASK(3, 3), - - SWS_MASK_DIAG3 = SWS_MASK(0, 0) | SWS_MASK(1, 1) | SWS_MASK(2, 2), - SWS_MASK_OFF3 = SWS_MASK_OFF(0) | SWS_MASK_OFF(1) | SWS_MASK_OFF(2), - SWS_MASK_MAT3 = SWS_MASK(0, 0) | SWS_MASK(0, 1) | SWS_MASK(0, 2) | - SWS_MASK(1, 0) | SWS_MASK(1, 1) | SWS_MASK(1, 2) | - SWS_MASK(2, 0) | SWS_MASK(2, 1) | SWS_MASK(2, 2), - - SWS_MASK_DIAG4 = SWS_MASK_DIAG3 | SWS_MASK(3, 3), - SWS_MASK_OFF4 = SWS_MASK_OFF3 | SWS_MASK_OFF(3), - SWS_MASK_MAT4 = SWS_MASK_ALL & ~SWS_MASK_OFF4, -}; - /* Helper function to compute the correct mask */ uint32_t ff_sws_linear_mask(const SwsLinearOp *c); diff --git a/libswscale/uops.h b/libswscale/uops.h index 0098c46e05..c670c1f6ec 100644 --- a/libswscale/uops.h +++ b/libswscale/uops.h @@ -190,6 +190,27 @@ typedef struct SwsLinearUOp { uint32_t exact; /* mask of coefficients whose product is exact */ } SwsLinearUOp; +#define SWS_MASK(I, J) (1 << (5 * (I) + (J))) +#define SWS_MASK_OFF(I) SWS_MASK(I, 4) +#define SWS_MASK_ROW(I) (0x1F << (5 * (I))) +#define SWS_MASK_COL(J) (0x8421 << J) + +enum { + SWS_MASK_ALL = (1 << 20) - 1, + SWS_MASK_LUMA = SWS_MASK(0, 0) | SWS_MASK_OFF(0), + SWS_MASK_ALPHA = SWS_MASK(3, 3), + + SWS_MASK_DIAG3 = SWS_MASK(0, 0) | SWS_MASK(1, 1) | SWS_MASK(2, 2), + SWS_MASK_OFF3 = SWS_MASK_OFF(0) | SWS_MASK_OFF(1) | SWS_MASK_OFF(2), + SWS_MASK_MAT3 = SWS_MASK(0, 0) | SWS_MASK(0, 1) | SWS_MASK(0, 2) | + SWS_MASK(1, 0) | SWS_MASK(1, 1) | SWS_MASK(1, 2) | + SWS_MASK(2, 0) | SWS_MASK(2, 1) | SWS_MASK(2, 2), + + SWS_MASK_DIAG4 = SWS_MASK_DIAG3 | SWS_MASK(3, 3), + SWS_MASK_OFF4 = SWS_MASK_OFF3 | SWS_MASK_OFF(3), + SWS_MASK_MAT4 = SWS_MASK_ALL & ~SWS_MASK_OFF4, +}; + typedef struct SwsDitherUOp { uint8_t y_offset[4]; uint8_t size_log2; -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
