annotate i386/mpegvideo_mmx_template.c @ 230:ba9cd6fb6f0e libavcodec

PATCH by Rik Snel <rsnel@cube.dyndns.org> this includes the range for quantized dct coefficients in dct_quantize() (-1023...1023)
author arpi_esp
date Sat, 09 Feb 2002 01:25:06 +0000
parents 4f83fb0c957a
children 9f6071a87e17
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
220
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
1 /*
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
2 Copyright (C) 2002 Michael Niedermayer <michaelni@gmx.at>
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
3
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
4 This program is free software; you can redistribute it and/or modify
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
5 it under the terms of the GNU General Public License as published by
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
6 the Free Software Foundation; either version 2 of the License, or
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
7 (at your option) any later version.
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
8
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
9 This program is distributed in the hope that it will be useful,
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
12 GNU General Public License for more details.
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
13
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
14 You should have received a copy of the GNU General Public License
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
15 along with this program; if not, write to the Free Software
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
17 */
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
18
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
19 #undef SPREADW
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
20 #undef PMAXW
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
21 #ifdef HAVE_MMX2
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
22 #define SPREADW(a) "pshufw $0, " #a ", " #a " \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
23 #define PMAXW(a,b) "pmaxsw " #a ", " #b " \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
24
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
25 #else
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
26 #define SPREADW(a) \
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
27 "punpcklwd " #a ", " #a " \n\t"\
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
28 "punpcklwd " #a ", " #a " \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
29 #define PMAXW(a,b) \
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
30 "psubusw " #a ", " #b " \n\t"\
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
31 "paddw " #a ", " #b " \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
32 #endif
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
33
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
34 static int RENAME(dct_quantize)(MpegEncContext *s,
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
35 DCTELEM *block, int n,
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
36 int qscale)
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
37 {
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
38 int i, level, last_non_zero_p1, q;
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
39 const UINT16 *qmat;
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
40 static __align8 INT16 temp_block[64];
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
41 int minLevel, maxLevel;
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
42
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
43 if(s->avctx!=NULL && s->avctx->codec->id==CODEC_ID_MPEG4){
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
44 /* mpeg4 */
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
45 minLevel= -2048;
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
46 maxLevel= 2047;
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
47 }else if(s->out_format==FMT_MPEG1){
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
48 /* mpeg1 */
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
49 minLevel= -255;
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
50 maxLevel= 255;
230
ba9cd6fb6f0e PATCH by Rik Snel <rsnel@cube.dyndns.org>
arpi_esp
parents: 222
diff changeset
51 }else if(s->out_format==FMT_MJPEG){
ba9cd6fb6f0e PATCH by Rik Snel <rsnel@cube.dyndns.org>
arpi_esp
parents: 222
diff changeset
52 /* (m)jpeg */
ba9cd6fb6f0e PATCH by Rik Snel <rsnel@cube.dyndns.org>
arpi_esp
parents: 222
diff changeset
53 minLevel= -1023;
ba9cd6fb6f0e PATCH by Rik Snel <rsnel@cube.dyndns.org>
arpi_esp
parents: 222
diff changeset
54 maxLevel= 1023;
220
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
55 }else{
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
56 /* h263 / msmpeg4 */
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
57 minLevel= -128;
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
58 maxLevel= 127;
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
59 }
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
60
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
61 av_fdct (block);
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
62
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
63 if (s->mb_intra) {
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
64 int dummy;
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
65 if (n < 4)
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
66 q = s->y_dc_scale;
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
67 else
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
68 q = s->c_dc_scale;
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
69
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
70 /* note: block[0] is assumed to be positive */
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
71 #if 1
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
72 asm volatile (
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
73 "xorl %%edx, %%edx \n\t"
222
4f83fb0c957a workaround gcc bug "m" (0)
arpi_esp
parents: 220
diff changeset
74 "mul %%ecx \n\t"
220
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
75 : "=d" (temp_block[0]), "=a"(dummy)
222
4f83fb0c957a workaround gcc bug "m" (0)
arpi_esp
parents: 220
diff changeset
76 : "a" (block[0] + (q >> 1)), "c" (inverse[q])
220
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
77 );
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
78 #else
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
79 asm volatile (
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
80 "xorl %%edx, %%edx \n\t"
222
4f83fb0c957a workaround gcc bug "m" (0)
arpi_esp
parents: 220
diff changeset
81 "divw %%cx \n\t"
220
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
82 "movzwl %%ax, %%eax \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
83 : "=a" (temp_block[0])
222
4f83fb0c957a workaround gcc bug "m" (0)
arpi_esp
parents: 220
diff changeset
84 : "a" (block[0] + (q >> 1)), "c" (q)
220
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
85 : "%edx"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
86 );
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
87 #endif
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
88 // temp_block[0] = (block[0] + (q >> 1)) / q;
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
89 i = 1;
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
90 last_non_zero_p1 = 1;
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
91 if (s->out_format == FMT_H263) {
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
92 qmat = s->q_non_intra_matrix16;
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
93 } else {
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
94 qmat = s->q_intra_matrix16;
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
95 }
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
96 for(i=1;i<4;i++) {
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
97 level = block[i] * qmat[i];
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
98 level = level / (1 << (QMAT_SHIFT_MMX - 3));
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
99 /* XXX: currently, this code is not optimal. the range should be:
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
100 mpeg1: -255..255
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
101 mpeg2: -2048..2047
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
102 h263: -128..127
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
103 mpeg4: -2048..2047
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
104 */
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
105 if (level > maxLevel)
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
106 level = maxLevel;
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
107 else if (level < minLevel)
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
108 level = minLevel;
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
109 temp_block[i] = level;
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
110
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
111 if(level)
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
112 if(last_non_zero_p1 < inv_zigzag_direct16[i]) last_non_zero_p1= inv_zigzag_direct16[i];
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
113 block[i]=0;
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
114 }
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
115 } else {
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
116 i = 0;
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
117 last_non_zero_p1 = 0;
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
118 qmat = s->q_non_intra_matrix16;
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
119 }
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
120
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
121 asm volatile( /* XXX: small rounding bug, but it shouldnt matter */
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
122 "movd %3, %%mm3 \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
123 SPREADW(%%mm3)
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
124 "movd %4, %%mm4 \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
125 SPREADW(%%mm4)
222
4f83fb0c957a workaround gcc bug "m" (0)
arpi_esp
parents: 220
diff changeset
126 #ifndef HAVE_MMX2
220
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
127 "movd %5, %%mm5 \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
128 SPREADW(%%mm5)
222
4f83fb0c957a workaround gcc bug "m" (0)
arpi_esp
parents: 220
diff changeset
129 #endif
220
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
130 "pxor %%mm7, %%mm7 \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
131 "movd %%eax, %%mm2 \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
132 SPREADW(%%mm2)
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
133 "movl %6, %%eax \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
134 ".balign 16 \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
135 "1: \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
136 "movq (%1, %%eax), %%mm0 \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
137 "movq (%2, %%eax), %%mm1 \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
138 "movq %%mm0, %%mm6 \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
139 "psraw $15, %%mm6 \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
140 "pmulhw %%mm0, %%mm1 \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
141 "psubsw %%mm6, %%mm1 \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
142 #ifdef HAVE_MMX2
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
143 "pminsw %%mm3, %%mm1 \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
144 "pmaxsw %%mm4, %%mm1 \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
145 #else
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
146 "paddsw %%mm3, %%mm1 \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
147 "psubusw %%mm4, %%mm1 \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
148 "paddsw %%mm5, %%mm1 \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
149 #endif
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
150 "movq %%mm1, (%8, %%eax) \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
151 "pcmpeqw %%mm7, %%mm1 \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
152 "movq (%7, %%eax), %%mm0 \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
153 "movq %%mm7, (%1, %%eax) \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
154 "pandn %%mm0, %%mm1 \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
155 PMAXW(%%mm1, %%mm2)
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
156 "addl $8, %%eax \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
157 " js 1b \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
158 "movq %%mm2, %%mm0 \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
159 "psrlq $32, %%mm2 \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
160 PMAXW(%%mm0, %%mm2)
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
161 "movq %%mm2, %%mm0 \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
162 "psrlq $16, %%mm2 \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
163 PMAXW(%%mm0, %%mm2)
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
164 "movd %%mm2, %%eax \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
165 "movzbl %%al, %%eax \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
166 : "+a" (last_non_zero_p1)
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
167 : "r" (block+64), "r" (qmat+64),
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
168 #ifdef HAVE_MMX2
222
4f83fb0c957a workaround gcc bug "m" (0)
arpi_esp
parents: 220
diff changeset
169 "m" (maxLevel), "m" (minLevel), "m" (minLevel /* dummy */), "g" (2*i - 128),
220
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
170 #else
222
4f83fb0c957a workaround gcc bug "m" (0)
arpi_esp
parents: 220
diff changeset
171 "m" (0x7FFF - maxLevel), "m" (0x7FFF -maxLevel + minLevel), "m" (minLevel), "g" (2*i - 128),
220
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
172 #endif
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
173 "r" (inv_zigzag_direct16+64), "r" (temp_block+64)
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
174 );
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
175 // last_non_zero_p1=64;
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
176 /* permute for IDCT */
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
177 asm volatile(
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
178 "movl %0, %%eax \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
179 "pushl %%ebp \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
180 "movl %%esp, " MANGLE(esp_temp) "\n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
181 "1: \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
182 "movzbl (%1, %%eax), %%ebx \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
183 "movzbl 1(%1, %%eax), %%ebp \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
184 "movw (%2, %%ebx, 2), %%cx \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
185 "movw (%2, %%ebp, 2), %%sp \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
186 "movzbl " MANGLE(permutation) "(%%ebx), %%ebx\n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
187 "movzbl " MANGLE(permutation) "(%%ebp), %%ebp\n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
188 "movw %%cx, (%3, %%ebx, 2) \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
189 "movw %%sp, (%3, %%ebp, 2) \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
190 "addl $2, %%eax \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
191 " js 1b \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
192 "movl " MANGLE(esp_temp) ", %%esp\n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
193 "popl %%ebp \n\t"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
194 :
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
195 : "g" (-last_non_zero_p1), "d" (zigzag_direct_noperm+last_non_zero_p1), "S" (temp_block), "D" (block)
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
196 : "%eax", "%ebx", "%ecx"
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
197 );
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
198 /*
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
199 for(i=0; i<last_non_zero_p1; i++)
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
200 {
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
201 int j= zigzag_direct_noperm[i];
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
202 block[block_permute_op(j)]= temp_block[j];
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
203 }
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
204 */
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
205 //block_permute(block);
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
206 return last_non_zero_p1 - 1;
0b234715e205 (commit by michael)
arpi_esp
parents:
diff changeset
207 }