Commit 165adf8e authored by Yi Luo's avatar Yi Luo
Browse files

Use saturation addition to do rounding for avx2 IDCT

- Found this bug when increasing unit test number to 10000.
- Unit test is therefore also updated.

Change-Id: I938e96f6ebd35ae1bd8affebf8665e1da49a324b
parent 54cae22e
......@@ -58,7 +58,7 @@ static INLINE void write_buffer_16x16(__m256i *in, const int stride,
int i = 0;
while (i < 16) {
in[i] = _mm256_add_epi16(in[i], rounding);
in[i] = _mm256_adds_epi16(in[i], rounding);
in[i] = _mm256_srai_epi16(in[i], IDCT_ROUNDING_POS);
recon_and_store(&in[i], output + i * stride);
i += 1;
......
......@@ -52,7 +52,7 @@ typedef std::tr1::tuple<FwdTxfmFunc, InvTxfmWithBdFunc, InvTxfmWithBdFunc,
TX_SIZE, int, int, int>
PartialInvTxfmParam;
const int kMaxNumCoeffs = 1024;
const int kCountTestBlock = 1000;
const int kCountTestBlock = 10000;
class PartialIDctTest : public ::testing::TestWithParam<PartialInvTxfmParam> {
public:
......
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