diff options
| author | Philip Heron <phil@sanslogic.co.uk> | 2015-10-20 09:59:48 +0100 |
|---|---|---|
| committer | Philip Heron <phil@sanslogic.co.uk> | 2015-10-20 09:59:48 +0100 |
| commit | 421a9be721262fdada526a2da718b90be7ead187 (patch) | |
| tree | 20a46f9f2801ae375a2b920b1bfa2db7323c84dd /main.c | |
| parent | 062537a7e9b4fdeb65bbe93b71a4786ecabb10f9 (diff) | |
The decoder now auto detects packets without FEC.
Add a verbose option to print data about each packet.
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -31,7 +31,7 @@ void exit_usage() " -e Encode JPEG to SSDV packets.\n" " -d Decode SSDV packets to JPEG.\n" "\n" - " -n Encode or decode packets with no FEC.\n" + " -n Encode packets with no FEC.\n" " -t For testing, drops the specified percentage of packets while decoding.\n" " -c Set the callign. Accepts A-Z 0-9 and space, up to 6 characters.\n" " -i Set the image ID (0-255).\n" @@ -115,7 +115,7 @@ int main(int argc, char *argv[]) case 0: /* Decode */ if(droptest > 0) fprintf(stderr, "*** NOTE: Drop test enabled: %i ***\n", droptest); - ssdv_dec_init(&ssdv, type); + ssdv_dec_init(&ssdv); jpeg_length = 1024 * 1024 * 4; jpeg = malloc(jpeg_length); @@ -128,7 +128,7 @@ int main(int argc, char *argv[]) if(droptest && (rand() / (RAND_MAX / 100) < droptest)) continue; /* Test the packet is valid */ - if(ssdv_dec_is_packet(pkt, &errors, type) != 0) continue; + if(ssdv_dec_is_packet(pkt, &errors) != 0) continue; if(verbose) { @@ -136,13 +136,14 @@ int main(int argc, char *argv[]) ssdv_dec_header(&p, pkt); fprintf(stderr, "Decoded image packet. Callsign: %s, Image ID: %d, Resolution: %dx%d, Packet ID: %d (%d errors corrected)\n" - ">> EOI: %d, MCU Mode: %d, MCU Offset: %d, MCU ID: %d/%d\n", + ">> Type: %d, EOI: %d, MCU Mode: %d, MCU Offset: %d, MCU ID: %d/%d\n", p.callsign_s, p.image_id, p.width, p.height, p.packet_id, errors, + p.type, p.eoi, p.mcu_mode, p.mcu_offset, |
