tsdecrypt reads and decrypts CSA encrypted incoming mpeg transport stream over UDP/RTP using code words obtained from OSCAM or similar CAM server. tsdecrypt communicates with CAM server using cs378x (camd35 over tcp) protocol or newcamd protocol. https://georgi.unixsol.org/programs/tsdecrypt/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

fftable.h 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* FFdecsa -- fast decsa algorithm
  2. *
  3. * Copyright (C) 2007 Dark Avenger
  4. * 2003-2004 fatih89r
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19. */
  20. #ifndef FFTABLE_H
  21. #define FFTABLE_H
  22. void static inline FFTABLEIN(unsigned char *tab, int g, unsigned char *data)
  23. {
  24. #if 0
  25. *(((int *)tab)+2*g)=*((int *)data);
  26. *(((int *)tab)+2*g+1)=*(((int *)data)+1);
  27. #else
  28. *(((long long *)tab)+g)=*((long long *)data);
  29. #endif
  30. }
  31. void static inline FFTABLEOUT(unsigned char *data, unsigned char *tab, int g)
  32. {
  33. #if 1
  34. *((int *)data)=*(((int *)tab)+2*g);
  35. *(((int *)data)+1)=*(((int *)tab)+2*g+1);
  36. #else
  37. *((long long *)data)=*(((long long *)tab)+g);
  38. #endif
  39. }
  40. void static inline FFTABLEOUTXORNBY(int n, unsigned char *data, unsigned char *tab, int g)
  41. {
  42. int j;
  43. for(j=0;j<n;j++) *(data+j)^=*(tab+8*g+j);
  44. }
  45. #undef XOREQ_BEST_BY
  46. static inline void XOREQ_BEST_BY(unsigned char *d, unsigned char *s)
  47. {
  48. XOR_BEST_BY(d, d, s);
  49. }
  50. #endif //FFTABLE_H