SASC
DVBSoftCAM

parallel_032_int.h

Go to the documentation of this file.
00001 /* FFdecsa -- fast decsa algorithm
00002  *
00003  * Copyright (C) 2003-2004  fatih89r
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018  */
00019 
00020 #include "parallel_std_def.h"
00021 
00022 typedef unsigned int group;
00023 #define GROUP_PARALLELISM 32
00024 #define FF0()      0x0
00025 #define FF1()      0xffffffff
00026 
00027 /* 64 rows of 32 bits */
00028 
00029 void static inline FFTABLEIN(unsigned char *tab, int g, unsigned char *data){
00030   *(((int *)tab)+g)=*((int *)data);
00031   *(((int *)tab)+32+g)=*(((int *)data)+1);
00032 }
00033 
00034 void static inline FFTABLEOUT(unsigned char *data, unsigned char *tab, int g){
00035   *((int *)data)=*(((int *)tab)+g);
00036   *(((int *)data)+1)=*(((int *)tab)+32+g);
00037 }
00038 
00039 void static inline FFTABLEOUTXORNBY(int n, unsigned char *data, unsigned char *tab, int g){
00040   int j;
00041   for(j=0;j<n;j++){
00042     *(data+j)^=*(tab+4*(g+(j>=4?32-1:0))+j);
00043   }
00044 }
00045 
00046 typedef unsigned int batch;
00047 #define BYTES_PER_BATCH 4
00048 #define B_FFN_ALL_29() 0x29292929
00049 #define B_FFN_ALL_02() 0x02020202
00050 #define B_FFN_ALL_04() 0x04040404
00051 #define B_FFN_ALL_10() 0x10101010
00052 #define B_FFN_ALL_40() 0x40404040
00053 #define B_FFN_ALL_80() 0x80808080
00054 
00055 #define M_EMPTY()
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines