From: Yi Luo Date: Fri, 3 Jun 2016 16:38:03 +0000 (-0700) Subject: Print subpel_q4 and step_q4 behaviour X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=edec62f39890eb7a1b0c2f1fba6bea3886eec4b0;p=libvpx Print subpel_q4 and step_q4 behaviour --- diff --git a/convolve/convolve.c b/convolve/convolve.c new file mode 100644 index 000000000..94a832d3d --- /dev/null +++ b/convolve/convolve.c @@ -0,0 +1,28 @@ +#include +#include + +int main(int argc, char **argv) +{ + int i; + int height = 27; + int x_q4 = 8; + int x_step_q4 = 16; + const int subpel_bits = 4; + const int subpel_mask = (1 << subpel_bits) - 1; + + if (3 != argc) { + printf("Usage: convolve \n"); + return -1; + } + + x_q4 = atoi(argv[1]); + x_step_q4 = atoi(argv[2]); + + for (i = 0; i < height; ++i) { + printf("x_q4: 0x%X, sigidx: 0x%X, filidx: 0x%X\n", + x_q4, x_q4 >> subpel_bits, x_q4 & subpel_mask); + x_q4 += x_step_q4; + } + + return 0; +}