Commit dc54bd4e authored by Michael Niedermayer's avatar Michael Niedermayer

swscale/utils: factor (d + 1 < 4) out

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 61edda9a
...@@ -781,10 +781,10 @@ static av_cold int init_hscaler_mmxext(int dstW, int xInc, uint8_t *filterCode, ...@@ -781,10 +781,10 @@ static av_cold int init_hscaler_mmxext(int dstW, int xInc, uint8_t *filterCode,
int c = ((xpos + xInc * 2) >> 16) - xx; int c = ((xpos + xInc * 2) >> 16) - xx;
int d = ((xpos + xInc * 3) >> 16) - xx; int d = ((xpos + xInc * 3) >> 16) - xx;
int inc = (d + 1 < 4); int inc = (d + 1 < 4);
uint8_t *fragment = (d + 1 < 4) ? fragmentB : fragmentA; uint8_t *fragment = inc ? fragmentB : fragmentA;
x86_reg imm8OfPShufW1 = (d + 1 < 4) ? imm8OfPShufW1B : imm8OfPShufW1A; x86_reg imm8OfPShufW1 = inc ? imm8OfPShufW1B : imm8OfPShufW1A;
x86_reg imm8OfPShufW2 = (d + 1 < 4) ? imm8OfPShufW2B : imm8OfPShufW2A; x86_reg imm8OfPShufW2 = inc ? imm8OfPShufW2B : imm8OfPShufW2A;
x86_reg fragmentLength = (d + 1 < 4) ? fragmentLengthB : fragmentLengthA; x86_reg fragmentLength = inc ? fragmentLengthB : fragmentLengthA;
int maxShift = 3 - (d + inc); int maxShift = 3 - (d + inc);
int shift = 0; int shift = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment