[rfx,dwt] cleanup variables

This commit is contained in:
akallabeth 2024-06-07 11:53:41 +02:00
parent 87ee8f5b77
commit c780210624
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5
1 changed files with 9 additions and 19 deletions

View File

@ -28,16 +28,6 @@
static INLINE void rfx_dwt_2d_decode_block(INT16* WINPR_RESTRICT buffer, INT16* WINPR_RESTRICT idwt,
size_t subband_width)
{
INT16* dst = NULL;
INT16* l = NULL;
INT16* h = NULL;
INT16* l_dst = NULL;
INT16* h_dst = NULL;
INT16* hl = NULL;
INT16* lh = NULL;
INT16* hh = NULL;
INT16* ll = NULL;
const size_t total_width = subband_width << 1;
/* Inverse DWT in horizontal direction, results in 2 sub-bands in L, H order in tmp buffer idwt.
@ -46,13 +36,13 @@ static INLINE void rfx_dwt_2d_decode_block(INT16* WINPR_RESTRICT buffer, INT16*
/* The lower part L uses LL(3) and HL(0). */
/* The higher part H uses LH(1) and HH(2). */
ll = buffer + subband_width * subband_width * 3;
hl = buffer;
l_dst = idwt;
const INT16* ll = buffer + subband_width * subband_width * 3;
const INT16* hl = buffer;
INT16* l_dst = idwt;
lh = buffer + subband_width * subband_width;
hh = buffer + subband_width * subband_width * 2;
h_dst = idwt + subband_width * subband_width * 2;
const INT16* lh = buffer + subband_width * subband_width;
const INT16* hh = buffer + subband_width * subband_width * 2;
INT16* h_dst = idwt + subband_width * subband_width * 2;
for (size_t y = 0; y < subband_width; y++)
{
@ -91,9 +81,9 @@ static INLINE void rfx_dwt_2d_decode_block(INT16* WINPR_RESTRICT buffer, INT16*
/* Inverse DWT in vertical direction, results are stored in original buffer. */
for (size_t x = 0; x < total_width; x++)
{
l = idwt + x;
h = idwt + x + subband_width * total_width;
dst = buffer + x;
const INT16* l = idwt + x;
const INT16* h = idwt + x + subband_width * total_width;
INT16* dst = buffer + x;
*dst = *l - ((*h * 2 + 1) >> 1);