diff options
| author | Philip Heron <phil@sanslogic.co.uk> | 2020-07-05 12:43:10 +0100 |
|---|---|---|
| committer | Philip Heron <phil@sanslogic.co.uk> | 2020-07-05 12:43:10 +0100 |
| commit | 2b79a2f65145222858f58de309fe768db861082a (patch) | |
| tree | 5ca12eed13f312084c137fffaa0a6ac8623db715 | |
| parent | 035f920f5c96880bfd89d4469428b934e830c7c9 (diff) | |
Remove test on JPEG Component ID as they appear to be arbitrary
| -rw-r--r-- | ssdv.c | 14 |
1 files changed, 2 insertions, 12 deletions
@@ -768,16 +768,11 @@ static char ssdv_have_marker_data(ssdv_t *s) for(i = 0; i < d[5]; i++) { uint8_t *dq = &d[i * 3 + 6]; - if(dq[0] != i + 1) - { - fprintf(stderr, "Error: Components are not in order in the SOF0 header\n"); - return(SSDV_ERROR); - } fprintf(stderr, "DQT table for component %i: %02X, Sampling factor: %ix%i\n", dq[0], dq[2], dq[1] & 0x0F, dq[1] >> 4); /* The first (Y) component must have a factor of 2x2,2x1,1x2 or 1x1 */ - if(dq[0] == 1) + if(i == 0) { switch(dq[1]) { @@ -790,7 +785,7 @@ static char ssdv_have_marker_data(ssdv_t *s) return(SSDV_ERROR); } } - else if(dq[0] != 1 && dq[1] != 0x11) + else if(i != 0 && dq[1] != 0x11) { fprintf(stderr, "Error: Component %i sampling factor must be 1x1\n", dq[0]); return(SSDV_ERROR); @@ -839,11 +834,6 @@ static char ssdv_have_marker_data(ssdv_t *s) for(i = 0; i < d[0]; i++) { uint8_t *dh = &d[i * 2 + 1]; - if(dh[0] != i + 1) - { - fprintf(stderr, "Error: Components are not in order in the SOF0 header\n"); - return(SSDV_ERROR); - } fprintf(stderr, "Component %i DHT: %02X\n", dh[0], dh[1]); } |
