sharpyuv: add 32bit version of SharpYuvFilterRow.

This allows increasing intermediate value precision from 10 bits to 14 bits.

Change-Id: I0fc33400d200a849bcc2c677ab8346215a9dbc3b
This commit is contained in:
Maryla
2022-06-01 11:39:47 +02:00
parent 20ef48f05a
commit 266cbbc511
4 changed files with 120 additions and 15 deletions

View File

@ -32,9 +32,7 @@ static const int kMinDimensionIterativeConversion = 4;
static const int kYuvHalf = 1 << (YUV_FIX - 1);
// Max bit depth so that intermediate calculations fit in 16 bits.
// TODO(b/194336375): the C code can handle up to 14 bits, but the SIMD code
// currently needs more room.
static const int kMaxBitDepth = 10;
static const int kMaxBitDepth = 14;
// Returns the precision shift to use based on the input rgb_bit_depth.
static int GetPrecisionShift(int rgb_bit_depth) {