diff options
author | John Koleszar <jkoleszar@google.com> | 2011-06-27 09:39:55 -0400 |
---|---|---|
committer | John Koleszar <jkoleszar@google.com> | 2011-06-27 09:39:56 -0400 |
commit | 1ec4e270957a463cf7a8f320b23325d99577d9c8 (patch) | |
tree | d87d60e194ac456e8eca3915316e53c1b83bca61 /examples | |
parent | 786246ebf1fd4b875f33a8b0c35bab2a3df911b3 (diff) | |
parent | ba0822ba96f0e910b50c85017de9b621dd007d0f (diff) | |
download | libvpx-1ec4e270957a463cf7a8f320b23325d99577d9c8.tar libvpx-1ec4e270957a463cf7a8f320b23325d99577d9c8.tar.gz libvpx-1ec4e270957a463cf7a8f320b23325d99577d9c8.tar.bz2 libvpx-1ec4e270957a463cf7a8f320b23325d99577d9c8.zip |
Merge remote branch 'origin/master' into experimental
Change-Id: I689f4624a53184a72258df575305eb1aa97e61ca
Diffstat (limited to 'examples')
-rw-r--r-- | examples/decode_with_partial_drops.txt | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/examples/decode_with_partial_drops.txt b/examples/decode_with_partial_drops.txt index 30854d669..7b0d3d2ca 100644 --- a/examples/decode_with_partial_drops.txt +++ b/examples/decode_with_partial_drops.txt @@ -110,7 +110,7 @@ void throw_packets(unsigned char* frame, int* size, int loss_rate, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DEC_INIT /* Initialize codec */ flags = VPX_CODEC_USE_ERROR_CONCEALMENT; -res = vpx_codec_dec_init(&codec, interface, NULL, flags); +res = vpx_codec_dec_init(&codec, interface, &dec_cfg, flags); if(res) die_codec(&codec, "Failed to initialize decoder"); @@ -123,11 +123,15 @@ which specifies the range or pattern of frames to drop. The parameter is parsed as follows: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ USAGE -if(argc!=4 && argc != 5) - die("Usage: %s <infile> <outfile> <N-M|N/M|L,S>\n", argv[0]); +if(argc < 4 || argc > 6) + die("Usage: %s <infile> <outfile> [-t <num threads>] <N-M|N/M|L,S>\n", + argv[0]); { char *nptr; - n = strtol(argv[3], &nptr, 0); + int arg_num = 3; + if (argc == 6 && strncmp(argv[arg_num++], "-t", 2) == 0) + dec_cfg.threads = strtol(argv[arg_num++], NULL, 0); + n = strtol(argv[arg_num], &nptr, 0); mode = (*nptr == '\0' || *nptr == ',') ? 2 : (*nptr == '-') ? 1 : 0; m = strtol(nptr+1, NULL, 0); @@ -138,6 +142,7 @@ if(argc!=4 && argc != 5) seed = (m > 0) ? m : (unsigned int)time(NULL); srand(seed);thrown_frame = 0; printf("Seed: %u\n", seed); +printf("Threads: %d\n", dec_cfg.threads); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ USAGE @@ -181,6 +186,7 @@ int n, m, mode; unsigned int seed; int thrown=0, kept=0; int thrown_frame=0, kept_frame=0; +vpx_codec_dec_cfg_t dec_cfg = {0}; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ EXTRA_VARS |