[cvs] / xvidcore / src / xvid.c Repository:
ViewVC logotype

Diff of /xvidcore/src/xvid.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.81, Tue Jun 2 13:06:49 2009 UTC revision 1.82, Fri Jun 5 07:58:41 2009 UTC
# Line 43  Line 43 
43  #endif  #endif
44  #endif  #endif
45    
46    #if defined(__amigaos4__)
47    #include <exec/exec.h>
48    #include <proto/exec.h>
49    #endif
50    
51  #include "xvid.h"  #include "xvid.h"
52  #include "decoder.h"  #include "decoder.h"
53  #include "encoder.h"  #include "encoder.h"
# Line 69  Line 74 
74    
75  #if (defined(ARCH_IS_IA32) || defined(ARCH_IS_X86_64)) && defined(_MSC_VER)  #if (defined(ARCH_IS_IA32) || defined(ARCH_IS_X86_64)) && defined(_MSC_VER)
76  #       include <windows.h>  #       include <windows.h>
77  #elif defined(ARCH_IS_IA32) || defined(ARCH_IS_X86_64) || defined(ARCH_IS_PPC)  #elif defined(ARCH_IS_IA32) || defined(ARCH_IS_X86_64) || (defined(ARCH_IS_PPC) && !defined(__amigaos4__))
78  #       include <signal.h>  #       include <signal.h>
79  #       include <setjmp.h>  #       include <setjmp.h>
80    
# Line 82  Line 87 
87          }          }
88  #endif  #endif
89    
   
90  /*  /*
91   * Calls the funcptr, and returns whether SIGILL (illegal instruction) was   * Calls the funcptr, and returns whether SIGILL (illegal instruction) was
92   * signalled   * signalled
# Line 105  Line 109 
109          }          }
110          return(0);          return(0);
111  }  }
112  #elif defined(ARCH_IS_IA32) || defined(ARCH_IS_X86_64) || defined(ARCH_IS_PPC)  #elif defined(ARCH_IS_IA32) || defined(ARCH_IS_X86_64) || (defined(ARCH_IS_PPC) && !defined(__amigaos4__))
113  static int  static int
114  sigill_check(void (*func)())  sigill_check(void (*func)())
115  {  {
# Line 157  Line 161 
161  #endif  #endif
162    
163  #if defined(ARCH_IS_PPC)  #if defined(ARCH_IS_PPC)
164    #if defined(__amigaos4__)
165            {
166                    uint32_t vector_unit = VECTORTYPE_NONE;
167                    IExec->GetCPUInfoTags(GCIT_VectorUnit, &vector_unit, TAG_END);
168                    if (vector_unit == VECTORTYPE_ALTIVEC) {
169                            cpu_flags |= XVID_CPU_ALTIVEC;
170                    }
171            }
172    #else
173          if (!sigill_check(altivec_trigger))          if (!sigill_check(altivec_trigger))
174                  cpu_flags |= XVID_CPU_ALTIVEC;                  cpu_flags |= XVID_CPU_ALTIVEC;
175  #endif  #endif
176    #endif
177    
178          return cpu_flags;          return cpu_flags;
179  }  }
# Line 707  Line 721 
721        info -> num_threads = 1;        info -> num_threads = 1;
722    }    }
723    
724    #elif defined(__amigaos4__)
725    
726      {
727        uint32_t num_threads = 1;
728        IExec->GetCPUInfoTags(GCIT_NumberOfCPUs, &num_threads, TAG_END);
729        info->num_threads = num_threads;
730      }
731    
732  #endif  #endif
733    
734          return 0;          return 0;

Legend:
Removed from v.1.81  
changed lines
  Added in v.1.82

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