Mercurial > libavcodec.hg
comparison h261data.h @ 2225:35fc37209ea0 libavcodec
H.261 decoder improvements
- GOB's can exist of only MBA_STUFFING codes: it crashed before, but it is fixed now
- Clearer code
- Some extra checks so the decoder is more resilient against errors
patch by (Maarten Daniels <maarten dot daniels at student dot luc dot ac dot be>)
| author | michael |
|---|---|
| date | Mon, 13 Sep 2004 03:27:53 +0000 |
| parents | b6f2add2511e |
| children | ada3891b859d |
comparison
equal
deleted
inserted
replaced
| 2224:11d54cb7ac4e | 2225:35fc37209ea0 |
|---|---|
| 3 * H.261 tables. | 3 * H.261 tables. |
| 4 */ | 4 */ |
| 5 #define MB_TYPE_H261_FIL 0x800000 | 5 #define MB_TYPE_H261_FIL 0x800000 |
| 6 | 6 |
| 7 // H.261 VLC table for macroblock addressing | 7 // H.261 VLC table for macroblock addressing |
| 8 const uint8_t h261_mba_code[34] = { | 8 const uint8_t h261_mba_code[35] = { |
| 9 1, 3, 2, 3, | 9 1, 3, 2, 3, |
| 10 2, 3, 2, 7, | 10 2, 3, 2, 7, |
| 11 6, 11, 10, 9, | 11 6, 11, 10, 9, |
| 12 8, 7, 6, 23, | 12 8, 7, 6, 23, |
| 13 22, 21, 20, 19, | 13 22, 21, 20, 19, |
| 14 18, 35, 34, 33, | 14 18, 35, 34, 33, |
| 15 32, 31, 30, 29, | 15 32, 31, 30, 29, |
| 16 28, 27, 26, 25, | 16 28, 27, 26, 25, |
| 17 24, | 17 24, |
| 18 15 //(MBA stuffing) | 18 15, //(MBA stuffing) |
| 19 1 //(start code) | |
| 19 }; | 20 }; |
| 20 | 21 |
| 21 const uint8_t h261_mba_bits[34] = { | 22 const uint8_t h261_mba_bits[35] = { |
| 22 1, 3, 3, 4, | 23 1, 3, 3, 4, |
| 23 4, 5, 5, 7, | 24 4, 5, 5, 7, |
| 24 7, 8, 8, 8, | 25 7, 8, 8, 8, |
| 25 8, 8, 8, 10, | 26 8, 8, 8, 10, |
| 26 10, 10, 10, 10, | 27 10, 10, 10, 10, |
| 27 10, 11, 11, 11, | 28 10, 11, 11, 11, |
| 28 11, 11, 11, 11, | 29 11, 11, 11, 11, |
| 29 11, 11, 11, 11, | 30 11, 11, 11, 11, |
| 30 11, | 31 11, |
| 31 11 //(MBA stuffing) | 32 11, //(MBA stuffing) |
| 33 16 //(start code) | |
| 32 }; | 34 }; |
| 33 | 35 |
| 34 //H.261 VLC table for macroblock type | 36 //H.261 VLC table for macroblock type |
| 35 const uint8_t h261_mtype_code[10] = { | 37 const uint8_t h261_mtype_code[10] = { |
| 36 1, 1, 1, 1, | 38 1, 1, 1, 1, |
