diff options
author | Stefan Holmer <holmer@google.com> | 2011-06-16 11:44:50 +0200 |
---|---|---|
committer | John Koleszar <jkoleszar@google.com> | 2011-06-27 09:03:06 -0400 |
commit | ba0822ba96f0e910b50c85017de9b621dd007d0f (patch) | |
tree | cceafa1e618adfe8a24930182867716d6b4ecd99 /examples/decode_with_partial_drops.txt | |
parent | deca8cfc4461187a0dcc2fe588c983897b87aa7e (diff) | |
download | libvpx-ba0822ba96f0e910b50c85017de9b621dd007d0f.tar libvpx-ba0822ba96f0e910b50c85017de9b621dd007d0f.tar.gz libvpx-ba0822ba96f0e910b50c85017de9b621dd007d0f.tar.bz2 libvpx-ba0822ba96f0e910b50c85017de9b621dd007d0f.zip |
Adding support for error concealment in multi-threaded decoding
Also includes a couple of error concealment bug fixes:
- the segment_id wasn't properly initialized when missing
- when interpolating and no neighbors are found, set to zero
- clear the qcoef buffer when concealing an MB
Change-Id: Id79c876b41d78b559a2241e9cd0fd2cae6198f49
Diffstat (limited to 'examples/decode_with_partial_drops.txt')
-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 |