From: Yi Luo Date: Fri, 3 Jun 2016 18:15:50 +0000 (-0700) Subject: Set random seed number at command line X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=52d1bf20709465c6fb411f3a562fbdc16ad169ab;p=libvpx Set random seed number at command line --- diff --git a/convolve/horiz_filter.c b/convolve/horiz_filter.c index 74144945f..6b0986894 100644 --- a/convolve/horiz_filter.c +++ b/convolve/horiz_filter.c @@ -259,12 +259,14 @@ int main(int argc, char **argv) { const size_t block_size = 256; - if (argc != 2) { - printf("Usage: filtering , where width = 4, 8, 16, 32, 64\n"); + if (argc != 3) { + printf("Usage: filtering \n"); + printf("width = 4, 8, 16, 32, 64. seed = random seed number.\n"); return -1; } const int width = atoi(argv[1]); + seed = atoi(argv[2]); uint8_t *buffer = (uint8_t *) malloc(2 * sizeof(buffer[0]) * block_size); uint8_t *pixel = (uint8_t *) malloc(2 * sizeof(pixel[0]) * block_size);