[gbx]
[oscam.git] / ffdecsa / parallel_032_int.h
blob53828e332cab3f7643038cd2e393dc236d065827
1 /* FFdecsa -- fast decsa algorithm
3 * Copyright (C) 2003-2004 fatih89r
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program 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
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #include "parallel_std_def.h"
22 typedef unsigned int group;
23 #define GROUP_PARALLELISM 32
24 #define FF0() 0x0
25 #define FF1() 0xffffffff
27 /* 64 rows of 32 bits */
29 inline static void FFTABLEIN(unsigned char *tab, int g, unsigned char *data){
30 *(((int *)tab)+g)=*((int *)data);
31 *(((int *)tab)+32+g)=*(((int *)data)+1);
34 inline static void FFTABLEOUT(unsigned char *data, unsigned char *tab, int g){
35 *((int *)data)=*(((int *)tab)+g);
36 *(((int *)data)+1)=*(((int *)tab)+32+g);
39 inline static void FFTABLEOUTXORNBY(int n, unsigned char *data, unsigned char *tab, int g){
40 int j;
41 for(j=0;j<n;j++){
42 *(data+j)^=*(tab+4*(g+(j>=4?32-1:0))+j);
46 typedef unsigned int batch;
47 #define BYTES_PER_BATCH 4
48 #define B_FFN_ALL_29() 0x29292929
49 #define B_FFN_ALL_02() 0x02020202
50 #define B_FFN_ALL_04() 0x04040404
51 #define B_FFN_ALL_10() 0x10101010
52 #define B_FFN_ALL_40() 0x40404040
53 #define B_FFN_ALL_80() 0x80808080
55 #define M_EMPTY()