[svn] / trunk / xvidcore / src / quant / quant_matrix.c Repository:
ViewVC logotype

Annotation of /trunk/xvidcore/src/quant/quant_matrix.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3 - (view) (download)

1 : Isibaar 3 /**************************************************************************
2 :     *
3 :     * XVID MPEG-4 VIDEO CODEC
4 :     * mpeg-4 quantization matrix stuff
5 :     *
6 :     * This program is an implementation of a part of one or more MPEG-4
7 :     * Video tools as specified in ISO/IEC 14496-2 standard. Those intending
8 :     * to use this software module in hardware or software products are
9 :     * advised that its use may infringe existing patents or copyrights, and
10 :     * any such use would be at such party's own risk. The original
11 :     * developer of this software module and his/her company, and subsequent
12 :     * editors and their companies, will have no liability for use of this
13 :     * software or modifications or derivatives thereof.
14 :     *
15 :     * This program is free software; you can redistribute it and/or modify
16 :     * it under the terms of the GNU General Public License as published by
17 :     * the Free Software Foundation; either version 2 of the License, or
18 :     * (at your option) any later version.
19 :     *
20 :     * This program is distributed in the hope that it will be useful,
21 :     * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 :     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 :     * GNU General Public License for more details.
24 :     *
25 :     * You should have received a copy of the GNU General Public License
26 :     * along with this program; if not, write to the Free Software
27 :     * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 :     *
29 :     *************************************************************************/
30 :    
31 :     /**************************************************************************
32 :     *
33 :     * History:
34 :     *
35 :     * 2.3.2002 inital version <suxen_drol@hotmail.com>
36 :     *
37 :     *************************************************************************/
38 :    
39 :     #include "common.h"
40 :    
41 :    
42 :     static const int16_t default_intra_matrix[64] = {
43 :     8,17,18,19,21,23,25,27,
44 :     17,18,19,21,23,25,27,28,
45 :     20,21,22,23,24,26,28,30,
46 :     21,22,23,24,26,28,30,32,
47 :     22,23,24,26,28,30,32,35,
48 :     23,24,26,28,30,32,35,38,
49 :     25,26,28,30,32,35,38,41,
50 :     27,28,30,32,35,38,41,45
51 :     };
52 :    
53 :     static const int16_t default_inter_matrix[64] = {
54 :     16,17,18,19,20,21,22,23,
55 :     17,18,19,20,21,22,23,24,
56 :     18,19,20,21,22,23,24,25,
57 :     19,20,21,22,23,24,26,27,
58 :     20,21,22,23,25,26,27,28,
59 :     21,22,23,24,26,27,28,30,
60 :     22,23,24,26,27,28,30,31,
61 :     23,24,25,27,28,30,31,33
62 :     };
63 :    
64 :    
65 :     void quant4_intra_init(QMATRIX * qmatrix, int use_default)
66 :     {
67 :     if (use_default)
68 :     {
69 :     memcpy(qmatrix->intra, default_intra_matrix, 64 * sizeof (int16_t));
70 :     }
71 :    
72 :     #ifdef ARCH_X86
73 :     // TODO: generate mmx tables
74 :     #endif
75 :    
76 :     }
77 :    
78 :    
79 :     void quant4_inter_init(QMATRIX * qmatrix, int use_default)
80 :     {
81 :     if (use_default)
82 :     {
83 :     memcpy(qmatrix->inter, default_inter_matrix, 64 * sizeof (int16_t));
84 :     }
85 :    
86 :     #ifdef ARCH_X86
87 :     // TODO: generate mmx tables
88 :     #endif
89 :     }

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4