Commit 69a16433 authored by Nathan E. Egge's avatar Nathan E. Egge Committed by Nathan Egge

Fix a bug in the DAALA_TX 16-point DST functions.

The OD_FDST_16() and OD_IDST_16() macros were written for use in the
 OD_FDCT_32_ASYM macro which took asymmetrically scaled input and
 after running an asymmetric butterfly step, passed it through to
 the 16-point Type-II DCT and 16-point Type-IV DST.
Because the DST implementations were never tested as stand alone
 transforms, some of the signs from the butterfly step ended up inside
 the DST macros.
These extra operations will be addressed in a follow up patch.

Change-Id: I32f54a4bb70cd8fad4ae5646cfa4f5b14a0f969b
parent 7f537b85
...@@ -3433,21 +3433,21 @@ void od_bin_fdst16(od_coeff y[16], const od_coeff *x, int xstride) { ...@@ -3433,21 +3433,21 @@ void od_bin_fdst16(od_coeff y[16], const od_coeff *x, int xstride) {
sf = x[0*xstride]; sf = x[0*xstride];
OD_FDST_16(s0, s8, s4, sc, s2, sa, s6, se, s1, s9, s5, sd, s3, sb, s7, sf); OD_FDST_16(s0, s8, s4, sc, s2, sa, s6, se, s1, s9, s5, sd, s3, sb, s7, sf);
y[0] = (od_coeff)sf; y[0] = (od_coeff)sf;
y[1] = (od_coeff)se; y[1] = (od_coeff)-se;
y[2] = (od_coeff)sd; y[2] = (od_coeff)sd;
y[3] = (od_coeff)sc; y[3] = (od_coeff)-sc;
y[4] = (od_coeff)sb; y[4] = (od_coeff)sb;
y[5] = (od_coeff)sa; y[5] = (od_coeff)-sa;
y[6] = (od_coeff)s9; y[6] = (od_coeff)s9;
y[7] = (od_coeff)s8; y[7] = (od_coeff)-s8;
y[8] = (od_coeff)s7; y[8] = (od_coeff)s7;
y[9] = (od_coeff)s6; y[9] = (od_coeff)-s6;
y[10] = (od_coeff)s5; y[10] = (od_coeff)s5;
y[11] = (od_coeff)s4; y[11] = (od_coeff)-s4;
y[12] = (od_coeff)s3; y[12] = (od_coeff)s3;
y[13] = (od_coeff)s2; y[13] = (od_coeff)-s2;
y[14] = (od_coeff)s1; y[14] = (od_coeff)s1;
y[15] = (od_coeff)s0; y[15] = (od_coeff)-s0;
} }
void od_bin_idst16(od_coeff *x, int xstride, const od_coeff y[16]) { void od_bin_idst16(od_coeff *x, int xstride, const od_coeff y[16]) {
...@@ -3467,21 +3467,21 @@ void od_bin_idst16(od_coeff *x, int xstride, const od_coeff y[16]) { ...@@ -3467,21 +3467,21 @@ void od_bin_idst16(od_coeff *x, int xstride, const od_coeff y[16]) {
int sd; int sd;
int se; int se;
int sf; int sf;
s0 = y[15]; s0 = -y[15];
s8 = y[14]; s8 = y[14];
s4 = y[13]; s4 = -y[13];
sc = y[12]; sc = y[12];
s2 = y[11]; s2 = -y[11];
sa = y[10]; sa = y[10];
s6 = y[9]; s6 = -y[9];
se = y[8]; se = y[8];
s1 = y[7]; s1 = -y[7];
s9 = y[6]; s9 = y[6];
s5 = y[5]; s5 = -y[5];
sd = y[4]; sd = y[4];
s3 = y[3]; s3 = -y[3];
sb = y[2]; sb = y[2];
s7 = y[1]; s7 = -y[1];
sf = y[0]; sf = y[0];
OD_IDST_16(s0, s8, s4, sc, s2, sa, s6, se, s1, s9, s5, sd, s3, sb, s7, sf); OD_IDST_16(s0, s8, s4, sc, s2, sa, s6, se, s1, s9, s5, sd, s3, sb, s7, sf);
x[0*xstride] = (od_coeff)sf; x[0*xstride] = (od_coeff)sf;
......
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