Mercurial > libavcodec.hg
comparison svq1_cb.h @ 5233:eca08bfad00f libavcodec
split SVQ1 decoder and encoder in their own files
author | aurel |
---|---|
date | Fri, 06 Jul 2007 15:19:35 +0000 |
parents | 470601203f44 |
children | 1d83e9c34641 |
comparison
equal
deleted
inserted
replaced
5232:238b95c5ffe2 | 5233:eca08bfad00f |
---|---|
769 -3, 3, 5, -3, -3, 0, 0, -2, -1, 3, 2, -2, -2, 2, 2, -1, | 769 -3, 3, 5, -3, -3, 0, 0, -2, -1, 3, 2, -2, -2, 2, 2, -1, |
770 2, 0, 0, -1, 0, 0, 0, 0, 0, -3, -2, 1, 3, 0, -2, -2 | 770 2, 0, 0, -1, 0, 0, 0, 0, 0, -3, -2, 1, 3, 0, -2, -2 |
771 }; | 771 }; |
772 | 772 |
773 /* list of codebooks for inter-coded vectors */ | 773 /* list of codebooks for inter-coded vectors */ |
774 static const int8_t* const svq1_inter_codebooks[6] = { | 774 const int8_t* const ff_svq1_inter_codebooks[6] = { |
775 svq1_inter_codebook_4x2, svq1_inter_codebook_4x4, | 775 svq1_inter_codebook_4x2, svq1_inter_codebook_4x4, |
776 svq1_inter_codebook_8x4, svq1_inter_codebook_8x8, | 776 svq1_inter_codebook_8x4, svq1_inter_codebook_8x8, |
777 NULL, NULL, | 777 NULL, NULL, |
778 }; | |
779 | |
780 static const int8_t svq1_inter_codebook_sum[4][16*6] = { | |
781 { | |
782 -1, 1, -2, 0, 1, -1, -1, -1, -2, -1, 1, -1, -1, 0, -1, -1, | |
783 0, -1, -1, -1, -1, 0, -1, 0, 0, 0, -3, 1, -1, 0, 1, -1, | |
784 1, -1, 2, 2, 1, 1, 2, 0, 0, 0, -1, 1, 1, 0, 0, 0, | |
785 1, -1, 0, 1, -1, 1, 1, 0, 1, 0, -1, 1, 1, 0, 0, 0, | |
786 -2, 0, 0, -2, 0, 0, -2, 0, -2, -1, -2, -1, 0, 0, -1, 0, | |
787 1, 0, 1, -1, 2, 2, 1, 2, 2, 1, 0, 1, 1, 0, 1, 1, | |
788 },{ | |
789 -2, 1, -1, -1, 1, 0, 1, -1, -1, -1, 1, -1, 0, -1, 0, -1, | |
790 0, 0, 0, -2, 0, 1, 0, -1, -1, 0, 2, -3, 1, -2, 3, -1, | |
791 2, 0, 2, 1, 1, -1, 1, 1, 0, 0, 1, 1, 2, -2, 1, 0, | |
792 -2, -1, 2, -2, -2, 0, -3, 0, -1, 0, -1, 0, -1, 0, -2, -3, | |
793 1, -2, -2, -1, 1, -1, -1, 1, -1, 1, 1, 0, -2, 0, 1, 1, | |
794 1, 1, 2, 1, 0, 0, -1, 0, 0, 1, 0, 1, -1, 1, 0, 2, | |
795 },{ | |
796 0, 0, 0, -3, 1, 1, 1, -3, 0, -1, 0, -3, 1, -3, 0, -2, | |
797 1, 2, -1, -3, 0, -3, 1, -1, 0, -1, 0, 0, 1, 2, 1, 1, | |
798 -1, 2, -3, 3, 1, 0, -5, 1, 0, -1, -3, 1, 0, 2, 0, -3, | |
799 4, 2, 0, -2, 1, -2, 3, -2, 1, 1, 0, -1, 2, 5, 3, 1, | |
800 -1, 0, 2, -3, -2, 0, 0, -2, 2, -3, -1, -1, 2, 1, 0, -2, | |
801 3, -1, 1, -1, 2, 4, 0, 1, 0, 1, 0, -1, -3, -2, -1, 0, | |
802 },{ | |
803 0, 2, -1, -1, 2, -4, -2, 3, 0, -1, -5, 1, 0, 1, 0, 6, | |
804 -2, 2, 0, 1, 1, -1, -1, -2, 1, -2, -1, 0, 2, -2, -2, -1, | |
805 -4, 2, -1, -3, -1, -2, 2, -1, 2, -1, 2, 0, 3, -3, -3, 0, | |
806 -3, 0, 0, -2, 4, -4, 0, -1, 4, 0, -2, -2, 3, -2, 0, 4, | |
807 5, 0, 1, 0, -3, 3, 3, 2, 0, 0, 1, 2, -5, -2, -3, 0, | |
808 -3, 2, -2, 2, -2, 4, 7, -3, 4, 2, 3, 2, -1, 0, -3, 1, | |
809 } | |
810 }; | 778 }; |
811 | 779 |
812 /* 6x16-entry codebook for intra-coded 4x2 vectors */ | 780 /* 6x16-entry codebook for intra-coded 4x2 vectors */ |
813 static const int8_t svq1_intra_codebook_4x2[768] = { | 781 static const int8_t svq1_intra_codebook_4x2[768] = { |
814 12, 13, 13, 11, -7,-10,-15,-17,-16,-15,-12,-10, 11, 15, 15, 12, | 782 12, 13, 13, 11, -7,-10,-15,-17,-16,-15,-12,-10, 11, 15, 15, 12, |
1544 1, 0, -1, -1, -2, 0, 1, 2, 0, -2, -2, -2, -3, -1, 0, 1, | 1512 1, 0, -1, -1, -2, 0, 1, 2, 0, -2, -2, -2, -3, -1, 0, 1, |
1545 0, -2, -2, -2, -2, -1, 1, 1, 0, 0, 0, 0, 0, 1, 2, 2 | 1513 0, -2, -2, -2, -2, -1, 1, 1, 0, 0, 0, 0, 0, 1, 2, 2 |
1546 }; | 1514 }; |
1547 | 1515 |
1548 /* list of codebooks for intra-coded vectors */ | 1516 /* list of codebooks for intra-coded vectors */ |
1549 static const int8_t* const svq1_intra_codebooks[6] = { | 1517 const int8_t* const ff_svq1_intra_codebooks[6] = { |
1550 svq1_intra_codebook_4x2, svq1_intra_codebook_4x4, | 1518 svq1_intra_codebook_4x2, svq1_intra_codebook_4x4, |
1551 svq1_intra_codebook_8x4, svq1_intra_codebook_8x8, | 1519 svq1_intra_codebook_8x4, svq1_intra_codebook_8x8, |
1552 NULL, NULL, | 1520 NULL, NULL, |
1553 }; | 1521 }; |
1554 | 1522 |
1555 static const int8_t svq1_intra_codebook_sum[4][16*6] = { | |
1556 { | |
1557 0, 0, 0, -1, -1, -1, -1, -2, 0, -1, -1, 0, -1, 0, 1, 0, | |
1558 1, 0, -1, 1, 0, 0, -1, 1, -1, 0, 0, 0, -1, 1, 0, 0, | |
1559 -1, 0, 0, 1, -1, 1, 0, -1, -1, 0, 1, 1, 0, 0, -1, 1, | |
1560 0, 1, 0, 0, 1, -1, 0, 0, 0, -1, 1, 0, 1, 0, -2, 1, | |
1561 0, -1, 1, 0, 0, 0, 1, 0, -1, 0, 0, 0, -1, 0, 0, 0, | |
1562 0, 1, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0, -1, 1, 1, -1, | |
1563 },{ | |
1564 -1, -2, 0, -1, 1, 0, -1, 0, -1, -4, -1, -2, -1, -2, 1, -2, | |
1565 0, 0, 4, -2, -1, 1, 1, 0, 2, 1, 1, 0, 2, 0, 0, 0, | |
1566 1, 1, 0, -1, -1, -1, 1, 0, -1, -3, -3, 1, -1, 1, -2, -1, | |
1567 1, -1, 0, 1, 2, 1, -1, -1, 1, 1, 1, 2, 1, 0, 1, -2, | |
1568 -2, 0, -1, -2, -2, 0, -1, -1, -1, 0, 1, 0, -1, -1, 0, -1, | |
1569 0, 2, 1, 2, 2, 1, -1, 1, 0, 2, 0, -1, 1, 0, 0, 0, | |
1570 },{ | |
1571 -2, 0, -1, -1, 1, 1, -2, 0, -2, 0, 1, -2, -2, 1, -1, -1, | |
1572 3, -2, 0, -3, -4, -3, 2, 1, 0, 3, -2, 2, 3, 2, 2, -1, | |
1573 -3, 1, 0, 1, 0, 0, 0, 1, -2, 1, -2, -2, -1, -2, -2, 2, | |
1574 0, -4, 0, 2, -1, 0, 2, 2, 2, 1, 0, -1, -1, 1, -3, 2, | |
1575 2, 1, 0, 3, 1, -1, 1, 3, 1, 0, 1, 1, 2, -1, 1, -1, | |
1576 -2, -1, 0, -1, 1, -1, 1, -2, -2, -1, -1, -3, 1, -4, -3, 1, | |
1577 },{ | |
1578 -2, 0, -2, 3, -1, -1, 0, 2, 2, -1, -3, 2, 1, 0, -2, -1, | |
1579 -3, -2, -2, 1, 2, -3, 0, 1, -5, -2, -3, 0, -2, -1, 2, 0, | |
1580 -1, -1, 0, -2, 1, 3, -7, -2, -2, -1, 2, -1, 0, 3, 1, 3, | |
1581 1, 0, 0, 1, 2, 3, 1, 2, 0, -2, -2, 1, 1, 2, 2, 3, | |
1582 4, 1, -1, 2, -2, 4, 0, 0, 0, 4, 2, 0, -2, -2, 2, -4, | |
1583 -1, 5, -2, -2, -3, 2, -3, -1, 3, -3, 0, 4, 3, 0, 1, -2, | |
1584 } | |
1585 }; | |
1586 | |
1587 #endif // AVCODEC_SVQ1_CB_H | 1523 #endif // AVCODEC_SVQ1_CB_H |