Mercurial > libavcodec.hg
comparison msmpeg4data.h @ 500:460bc2ba363e libavcodec
wmv1 support
| author | michaelni |
|---|---|
| date | Tue, 18 Jun 2002 00:50:20 +0000 |
| parents | 583dcee270d2 |
| children | 55b4e2248a45 |
comparison
equal
deleted
inserted
replaced
| 499:8b7a54d58549 | 500:460bc2ba363e |
|---|---|
| 576 extern const UINT8 mvtab[33][2]; | 576 extern const UINT8 mvtab[33][2]; |
| 577 | 577 |
| 578 extern const UINT8 intra_MCBPC_code[8]; | 578 extern const UINT8 intra_MCBPC_code[8]; |
| 579 extern const UINT8 intra_MCBPC_bits[8]; | 579 extern const UINT8 intra_MCBPC_bits[8]; |
| 580 | 580 |
| 581 extern const UINT8 inter_MCBPC_code[8]; | 581 extern const UINT8 inter_MCBPC_code[25]; |
| 582 extern const UINT8 inter_MCBPC_bits[8]; | 582 extern const UINT8 inter_MCBPC_bits[25]; |
| 583 | 583 |
| 584 #define NB_RL_TABLES 6 | 584 #define NB_RL_TABLES 6 |
| 585 | 585 |
| 586 static RLTable rl_table[NB_RL_TABLES] = { | 586 static RLTable rl_table[NB_RL_TABLES] = { |
| 587 /* intra luminance tables */ | 587 /* intra luminance tables */ |
| 1759 42, 39, 29, 3, 44, 21, 53, 55, | 1759 42, 39, 29, 3, 44, 21, 53, 55, |
| 1760 11, 5, 3, 39, 53, 28, 25, 19, | 1760 11, 5, 3, 39, 53, 28, 25, 19, |
| 1761 34, 28, 21, | 1761 34, 28, 21, |
| 1762 }; | 1762 }; |
| 1763 | 1763 |
| 1764 /* motion vector table */ | |
| 1765 typedef struct MVTable { | |
| 1766 int n; | |
| 1767 const UINT16 *table_mv_code; | |
| 1768 const UINT8 *table_mv_bits; | |
| 1769 const UINT8 *table_mvx; | |
| 1770 const UINT8 *table_mvy; | |
| 1771 UINT16 *table_mv_index; /* encoding: convert mv to index in table_mv */ | |
| 1772 VLC vlc; /* decoding: vlc */ | |
| 1773 } MVTable; | |
| 1774 | |
| 1764 static MVTable mv_tables[2] = { | 1775 static MVTable mv_tables[2] = { |
| 1765 { | 1776 { |
| 1766 1099, | 1777 1099, |
| 1767 table0_mv_code, | 1778 table0_mv_code, |
| 1768 table0_mv_bits, | 1779 table0_mv_bits, |
| 1784 }; | 1795 }; |
| 1785 | 1796 |
| 1786 static const UINT8 v2_intra_cbpc[4][2] = { | 1797 static const UINT8 v2_intra_cbpc[4][2] = { |
| 1787 {1, 1}, {0, 3}, {1, 3}, {1, 2}, | 1798 {1, 1}, {0, 3}, {1, 3}, {1, 2}, |
| 1788 }; | 1799 }; |
| 1800 | |
| 1801 static UINT8 wmv1_y_dc_scale_table[32]={ | |
| 1802 // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 | |
| 1803 0, 8, 8, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21 | |
| 1804 }; | |
| 1805 static UINT8 wmv1_c_dc_scale_table[32]={ | |
| 1806 // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 | |
| 1807 0, 8, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21,22 | |
| 1808 }; | |
| 1809 | |
| 1810 static UINT8 old_ff_y_dc_scale_table[32]={ | |
| 1811 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | |
| 1812 0, 8, 8, 8, 8,10,12,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39 | |
| 1813 }; | |
| 1814 static UINT8 old_ff_c_dc_scale_table[32]={ | |
| 1815 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | |
| 1816 0, 8, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21,22 | |
| 1817 }; | |
| 1818 | |
| 1819 | |
| 1820 #define WMV1_SCANTABLE_COUNT 4 | |
| 1821 | |
| 1822 static UINT8 wmv1_scantable00[64]= { | |
| 1823 0x00, 0x08, 0x01, 0x02, 0x09, 0x10, 0x18, 0x11, | |
| 1824 0x0A, 0x03, 0x04, 0x0B, 0x12, 0x19, 0x20, 0x28, | |
| 1825 0x30, 0x38, 0x29, 0x21, 0x1A, 0x13, 0x0C, 0x05, | |
| 1826 0x06, 0x0D, 0x14, 0x1B, 0x22, 0x31, 0x39, 0x3A, | |
| 1827 0x32, 0x2A, 0x23, 0x1C, 0x15, 0x0E, 0x07, 0x0F, | |
| 1828 0x16, 0x1D, 0x24, 0x2B, 0x33, 0x3B, 0x3C, 0x34, | |
| 1829 0x2C, 0x25, 0x1E, 0x17, 0x1F, 0x26, 0x2D, 0x35, | |
| 1830 0x3D, 0x3E, 0x36, 0x2E, 0x27, 0x2F, 0x37, 0x3F, | |
| 1831 }; | |
| 1832 static UINT8 wmv1_scantable01[64]= { | |
| 1833 0x00, 0x08, 0x01, 0x02, 0x09, 0x10, 0x18, 0x11, | |
| 1834 0x0A, 0x03, 0x04, 0x0B, 0x12, 0x19, 0x20, 0x28, | |
| 1835 0x21, 0x30, 0x1A, 0x13, 0x0C, 0x05, 0x06, 0x0D, | |
| 1836 0x14, 0x1B, 0x22, 0x29, 0x38, 0x31, 0x39, 0x2A, | |
| 1837 0x23, 0x1C, 0x15, 0x0E, 0x07, 0x0F, 0x16, 0x1D, | |
| 1838 0x24, 0x2B, 0x32, 0x3A, 0x33, 0x3B, 0x2C, 0x25, | |
| 1839 0x1E, 0x17, 0x1F, 0x26, 0x2D, 0x34, 0x3C, 0x35, | |
| 1840 0x3D, 0x2E, 0x27, 0x2F, 0x36, 0x3E, 0x37, 0x3F, | |
| 1841 }; | |
| 1842 static UINT8 wmv1_scantable02[64]= { | |
| 1843 0x00, 0x01, 0x08, 0x02, 0x03, 0x09, 0x10, 0x18, | |
| 1844 0x11, 0x0A, 0x04, 0x05, 0x0B, 0x12, 0x19, 0x20, | |
| 1845 0x28, 0x30, 0x21, 0x1A, 0x13, 0x0C, 0x06, 0x07, | |
| 1846 0x0D, 0x14, 0x1B, 0x22, 0x29, 0x38, 0x31, 0x39, | |
| 1847 0x2A, 0x23, 0x1C, 0x15, 0x0E, 0x0F, 0x16, 0x1D, | |
| 1848 0x24, 0x2B, 0x32, 0x3A, 0x33, 0x2C, 0x25, 0x1E, | |
| 1849 0x17, 0x1F, 0x26, 0x2D, 0x34, 0x3B, 0x3C, 0x35, | |
| 1850 0x2E, 0x27, 0x2F, 0x36, 0x3D, 0x3E, 0x37, 0x3F, | |
| 1851 }; | |
| 1852 static UINT8 wmv1_scantable03[64]= { | |
| 1853 0x00, 0x08, 0x10, 0x01, 0x18, 0x20, 0x28, 0x09, | |
| 1854 0x02, 0x03, 0x0A, 0x11, 0x19, 0x30, 0x38, 0x29, | |
| 1855 0x21, 0x1A, 0x12, 0x0B, 0x04, 0x05, 0x0C, 0x13, | |
| 1856 0x1B, 0x22, 0x31, 0x39, 0x32, 0x2A, 0x23, 0x1C, | |
| 1857 0x14, 0x0D, 0x06, 0x07, 0x0E, 0x15, 0x1D, 0x24, | |
| 1858 0x2B, 0x33, 0x3A, 0x3B, 0x34, 0x2C, 0x25, 0x1E, | |
| 1859 0x16, 0x0F, 0x17, 0x1F, 0x26, 0x2D, 0x3C, 0x35, | |
| 1860 0x2E, 0x27, 0x2F, 0x36, 0x3D, 0x3E, 0x37, 0x3F, | |
| 1861 }; | |
| 1862 | |
| 1863 static UINT8 *wmv1_scantable[WMV1_SCANTABLE_COUNT+1]={ | |
| 1864 wmv1_scantable00, | |
| 1865 wmv1_scantable01, | |
| 1866 wmv1_scantable02, | |
| 1867 wmv1_scantable03, | |
| 1868 }; | |
| 1869 |
