1 /* 2 libfame - Fast Assembly MPEG Encoder Library 3 Copyright (C) 2000-2001 Vivien Chappelier 4 5 This library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Library General Public 7 License as published by the Free Software Foundation; either 8 version 2 of the License, or (at your option) any later version. 9 10 This library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Library General Public License for more details. 14 15 You should have received a copy of the GNU Library General Public 16 License along with this library; if not, write to the Free 17 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 */ 19 20 #include "fame.h" 21 22 FAME_ALIGNED static const fame_vlc_t mcbpc_I[4] = { 23 { 1, 1 }, 24 { 1, 3 }, 25 { 2, 3 }, 26 { 3, 3 }, 27 }; 28 29 FAME_ALIGNED static const fame_vlc_t mcbpc_I_dq[4] = { 30 { 1, 4 }, 31 { 1, 6 }, 32 { 2, 6 }, 33 { 3, 6 } 34 }; 35 36 FAME_ALIGNED static const fame_vlc_t mcbpc_P_intra[4] = { 37 { 3, 5 }, 38 { 4, 8 }, 39 { 3, 8 }, 40 { 3, 7 } 41 }; 42 43 FAME_ALIGNED static const fame_vlc_t mcbpc_P_intra_dq[4] = { 44 { 4, 6 }, 45 { 4, 9 }, 46 { 3, 9 }, 47 { 2, 9 } 48 }; 49 50 FAME_ALIGNED static const fame_vlc_t mcbpc_P_inter[4] = { 51 { 1, 1 }, 52 { 3, 4 }, 53 { 2, 4 }, 54 { 5, 6 } 55 }; 56 57 FAME_ALIGNED static const fame_vlc_t mcbpc_P_inter_dq[4] = { 58 { 3, 3 }, 59 { 7, 7 }, 60 { 6, 7 }, 61 { 5, 9 } 62 }; 63 64 FAME_ALIGNED static const fame_vlc_t mcbpc_P_inter4v[4] = { 65 { 2, 3 }, 66 { 5, 7 }, 67 { 4, 7 }, 68 { 5, 8 } 69 }; 70 71 FAME_ALIGNED static const fame_vlc_t cbpy_four[16] = { 72 { 0x03, 4 }, 73 { 0x05, 5 }, 74 { 0x04, 5 }, 75 { 0x09, 4 }, 76 { 0x03, 5 }, 77 { 0x07, 4 }, 78 { 0x02, 6 }, 79 { 0x0b, 4 }, 80 { 0x02, 5 }, 81 { 0x03, 6 }, 82 { 0x05, 4 }, 83 { 0x0a, 4 }, 84 { 0x04, 4 }, 85 { 0x08, 4 }, 86 { 0x06, 4 }, 87 { 0x03, 2 } 88 }; 89 90 FAME_ALIGNED static const fame_vlc_t cbpy_three[8] = { 91 { 0x03, 3 }, 92 { 0x01, 6 }, 93 { 0x01, 5 }, 94 { 0x02, 3 }, 95 { 0x02, 5 }, 96 { 0x03, 5 }, 97 { 0x01, 3 }, 98 { 0x01, 1 } 99 }; 100 101 FAME_ALIGNED static const fame_vlc_t cbpy_two[4] = { 102 { 0x01, 4 }, 103 { 0x01, 3 }, 104 { 0x01, 2 }, 105 { 0x01, 1 } 106 }; 107 108 FAME_ALIGNED static const fame_vlc_t cbpy_one[2] = { 109 { 0x01, 2 }, 110 { 0x01, 1 }, 111 }; 112 113 FAME_ALIGNED static const fame_vlc_t *cbpy[4] = { 114 cbpy_one, 115 cbpy_two, 116 cbpy_three, 117 cbpy_four 118 }; 119