[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.7, Thu Mar 28 15:52:46 2002 UTC revision 1.47, Wed Jun 11 14:10:55 2003 UTC
# Line 1  Line 1 
1  /**************************************************************************  /*****************************************************************************
2   *   *
3   *      XVID MPEG-4 VIDEO CODEC   *      XVID MPEG-4 VIDEO CODEC
4   *      native api   *  - Native API implementation  -
  *  
  *      This program is an implementation of a part of one or more MPEG-4  
  *      Video tools as specified in ISO/IEC 14496-2 standard.  Those intending  
  *      to use this software module in hardware or software products are  
  *      advised that its use may infringe existing patents or copyrights, and  
  *      any such use would be at such party's own risk.  The original  
  *      developer of this software module and his/her company, and subsequent  
  *      editors and their companies, will have no liability for use of this  
  *      software or modifications or derivatives thereof.  
5   *   *
6   *      This program is free software; you can redistribute it and/or modify   *      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   *      it under the terms of the GNU General Public License as published by
# Line 24  Line 15 
15   *   *
16   *      You should have received a copy of the GNU General Public License   *      You should have received a copy of the GNU General Public License
17   *      along with this program; if not, write to the Free Software   *      along with this program; if not, write to the Free Software
18   *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  *  
  *************************************************************************/  
   
 /**************************************************************************  
19   *   *
20   *      History:   * $Id$
21   *   *
22   *      17.03.2002      Added interpolate8x8_halfpel_hv_xmm   ****************************************************************************/
  *  22.12.2001  API change: added xvid_init() - Isibaar  
  *      16.12.2001      inital version; (c)2001 peter ross <pross@cs.rmit.edu.au>  
  *  
  *************************************************************************/  
23    
24    #include <stdio.h>
25    #include <stdlib.h>
26    #include <string.h>
27    #include <time.h>
28    
29  #include "xvid.h"  #include "xvid.h"
30  #include "decoder.h"  #include "decoder.h"
# Line 47  Line 34 
34  #include "dct/fdct.h"  #include "dct/fdct.h"
35  #include "image/colorspace.h"  #include "image/colorspace.h"
36  #include "image/interpolate8x8.h"  #include "image/interpolate8x8.h"
37    #include "image/reduced.h"
38  #include "utils/mem_transfer.h"  #include "utils/mem_transfer.h"
39    #include "utils/mbfunctions.h"
40  #include "quant/quant_h263.h"  #include "quant/quant_h263.h"
41  #include "quant/quant_mpeg4.h"  #include "quant/quant_mpeg4.h"
42    #include "motion/motion.h"
43  #include "motion/sad.h"  #include "motion/sad.h"
44  #include "utils/emms.h"  #include "utils/emms.h"
45  #include "utils/timer.h"  #include "utils/timer.h"
46    #include "bitstream/mbcoding.h"
47    
48    #if defined(ARCH_IS_IA32)
49    
50  int xvid_init(void *handle, int opt, void *param1, void *param2)  #if defined(_MSC_VER)
51    #       include <windows.h>
52    #else
53    #       include <signal.h>
54    #       include <setjmp.h>
55    
56            static jmp_buf mark;
57    
58            static void
59            sigill_handler(int signal)
60  {  {
61          int cpu_flags;             longjmp(mark, 1);
62          XVID_INIT_PARAM *init_param;          }
63    #endif
64    
         init_param = (XVID_INIT_PARAM *) param1;  
65    
66          // force specific cpu settings?  /*
67          if((init_param->cpu_flags & XVID_CPU_FORCE) > 0)   * Calls the funcptr, and returns whether SIGILL (illegal instruction) was
68                  cpu_flags = init_param->cpu_flags;   * signalled
69          else {   *
70     * Return values:
71     *  -1 : could not determine
72     *   0 : SIGILL was *not* signalled
73     *   1 : SIGILL was signalled
74     */
75    
76  #ifdef ARCH_X86  int
77                  cpu_flags = check_cpu_features();  sigill_check(void (*func)())
78    {
79    #if defined(_MSC_VER)
80            _try {
81                    func();
82            }
83            _except(EXCEPTION_EXECUTE_HANDLER) {
84    
85                    if (_exception_code() == STATUS_ILLEGAL_INSTRUCTION)
86                            return 1;
87            }
88            return 0;
89  #else  #else
90                  cpu_flags = 0;      void * old_handler;
91        int jmpret;
92    
93    
94        old_handler = signal(SIGILL, sigill_handler);
95        if (old_handler == SIG_ERR)
96        {
97            return -1;
98        }
99    
100        jmpret = setjmp(mark);
101        if (jmpret == 0)
102        {
103            func();
104        }
105    
106        signal(SIGILL, old_handler);
107    
108        return jmpret;
109    #endif
110    }
111  #endif  #endif
112    
113    
114    /* detect cpu flags  */
115    static unsigned int
116    detect_cpu_flags()
117    {
118            /* enable native assembly optimizations by default */
119            unsigned int cpu_flags = XVID_CPU_ASM;
120    
121    #if defined(ARCH_IS_IA32)
122            cpu_flags |= check_cpu_features();
123            if ((cpu_flags & XVID_CPU_SSE) && sigill_check(sse_os_trigger))
124                    cpu_flags &= ~XVID_CPU_SSE;
125    
126            if ((cpu_flags & XVID_CPU_SSE2) && sigill_check(sse2_os_trigger))
127                    cpu_flags &= ~XVID_CPU_SSE2;
128    #endif
129    
130    #if defined(ARCH_IS_PPC)
131    #if defined(ARCH_IS_PPC_ALTIVEC)
132            cpu_flags |= XVID_CPU_ALTIVEC;
133    #endif
134    #endif
135    
136            return cpu_flags;
137    }
138    
139    
140    /*****************************************************************************
141     * XviD Init Entry point
142     *
143     * Well this function initialize all internal function pointers according
144     * to the CPU features forced by the library client or autodetected (depending
145     * on the XVID_CPU_FORCE flag). It also initializes vlc coding tables and all
146     * image colorspace transformation tables.
147     *
148     * Returned value : XVID_ERR_OK
149     *                  + API_VERSION in the input XVID_INIT_PARAM structure
150     *                  + core build  "   "    "       "               "
151     *
152     ****************************************************************************/
153    
154    
155    static
156    int xvid_init_init(XVID_INIT_PARAM * init_param)
157    {
158            int cpu_flags;
159    
160            /* Inform the client the API version */
161            init_param->api_version = API_VERSION;
162    
163            /* Inform the client the core build - unused because we're still alpha */
164            init_param->core_build = 1000;
165    
166            /* Do we have to force CPU features  ? */
167            if ((init_param->cpu_flags & XVID_CPU_FORCE)) {
168    
169                    cpu_flags = init_param->cpu_flags;
170    
171            } else {
172    
173                    cpu_flags = detect_cpu_flags();
174            }
175    
176            if ((init_param->cpu_flags & XVID_CPU_CHKONLY))
177            {
178                  init_param->cpu_flags = cpu_flags;                  init_param->cpu_flags = cpu_flags;
179                    return XVID_ERR_OK;
180          }          }
181    
182          // initialize the function pointers          init_param->cpu_flags = cpu_flags;
183    
184    
185            /* Initialize the function pointers */
186          idct_int32_init();          idct_int32_init();
187            init_vlc_tables();
188    
189            /* Fixed Point Forward/Inverse DCT transformations */
190          fdct = fdct_int32;          fdct = fdct_int32;
191          idct = idct_int32;          idct = idct_int32;
192    
193            /* Only needed on PPC Altivec archs */
194            sadInit = 0;
195    
196            /* Restore FPU context : emms_c is a nop functions */
197          emms = emms_c;          emms = emms_c;
198    
199            /* Quantization functions */
200          quant_intra = quant_intra_c;          quant_intra = quant_intra_c;
201          dequant_intra = dequant_intra_c;          dequant_intra = dequant_intra_c;
202          quant_inter = quant_inter_c;          quant_inter = quant_inter_c;
# Line 92  Line 207 
207          quant4_inter = quant4_inter_c;          quant4_inter = quant4_inter_c;
208          dequant4_inter = dequant4_inter_c;          dequant4_inter = dequant4_inter_c;
209    
210            /* Block transfer related functions */
211          transfer_8to16copy = transfer_8to16copy_c;          transfer_8to16copy = transfer_8to16copy_c;
212          transfer_16to8copy = transfer_16to8copy_c;          transfer_16to8copy = transfer_16to8copy_c;
213          transfer_8to16sub = transfer_8to16sub_c;          transfer_8to16sub = transfer_8to16sub_c;
214            transfer_8to16subro  = transfer_8to16subro_c;
215            transfer_8to16sub2 = transfer_8to16sub2_c;
216          transfer_16to8add = transfer_16to8add_c;          transfer_16to8add = transfer_16to8add_c;
217          transfer8x8_copy = transfer8x8_copy_c;          transfer8x8_copy = transfer8x8_copy_c;
218    
219            /* Interlacing functions */
220            MBFieldTest = MBFieldTest_c;
221    
222            /* Image interpolation related functions */
223          interpolate8x8_halfpel_h = interpolate8x8_halfpel_h_c;          interpolate8x8_halfpel_h = interpolate8x8_halfpel_h_c;
224          interpolate8x8_halfpel_v = interpolate8x8_halfpel_v_c;          interpolate8x8_halfpel_v = interpolate8x8_halfpel_v_c;
225          interpolate8x8_halfpel_hv = interpolate8x8_halfpel_hv_c;          interpolate8x8_halfpel_hv = interpolate8x8_halfpel_hv_c;
226    
227            interpolate16x16_lowpass_h = interpolate16x16_lowpass_h_c;
228            interpolate16x16_lowpass_v = interpolate16x16_lowpass_v_c;
229            interpolate16x16_lowpass_hv = interpolate16x16_lowpass_hv_c;
230    
231            interpolate8x8_lowpass_h = interpolate8x8_lowpass_h_c;
232            interpolate8x8_lowpass_v = interpolate8x8_lowpass_v_c;
233            interpolate8x8_lowpass_hv = interpolate8x8_lowpass_hv_c;
234    
235            interpolate8x8_6tap_lowpass_h = interpolate8x8_6tap_lowpass_h_c;
236            interpolate8x8_6tap_lowpass_v = interpolate8x8_6tap_lowpass_v_c;
237    
238            interpolate8x8_avg2 = interpolate8x8_avg2_c;
239            interpolate8x8_avg4 = interpolate8x8_avg4_c;
240    
241            /* reduced resoltuion */
242            copy_upsampled_8x8_16to8 = xvid_Copy_Upsampled_8x8_16To8_C;
243            add_upsampled_8x8_16to8 = xvid_Add_Upsampled_8x8_16To8_C;
244            vfilter_31 = xvid_VFilter_31_C;
245            hfilter_31 = xvid_HFilter_31_C;
246            filter_18x18_to_8x8 = xvid_Filter_18x18_To_8x8_C;
247            filter_diff_18x18_to_8x8 = xvid_Filter_Diff_18x18_To_8x8_C;
248    
249            /* Initialize internal colorspace transformation tables */
250          colorspace_init();          colorspace_init();
251    
252            /* All colorspace transformation functions User Format->YV12 */
253            yv12_to_yv12    = yv12_to_yv12_c;
254          rgb555_to_yv12 = rgb555_to_yv12_c;          rgb555_to_yv12 = rgb555_to_yv12_c;
255          rgb565_to_yv12 = rgb565_to_yv12_c;          rgb565_to_yv12 = rgb565_to_yv12_c;
256          rgb24_to_yv12 = rgb24_to_yv12_c;          bgr_to_yv12     = bgr_to_yv12_c;
257          rgb32_to_yv12 = rgb32_to_yv12_c;          bgra_to_yv12    = bgra_to_yv12_c;
258          yuv_to_yv12 = yuv_to_yv12_c;          abgr_to_yv12    = abgr_to_yv12_c;
259            rgba_to_yv12    = rgba_to_yv12_c;
260          yuyv_to_yv12 = yuyv_to_yv12_c;          yuyv_to_yv12 = yuyv_to_yv12_c;
261          uyvy_to_yv12 = uyvy_to_yv12_c;          uyvy_to_yv12 = uyvy_to_yv12_c;
262    
263            rgb555i_to_yv12 = rgb555i_to_yv12_c;
264            rgb565i_to_yv12 = rgb565i_to_yv12_c;
265            bgri_to_yv12    = bgri_to_yv12_c;
266            bgrai_to_yv12   = bgrai_to_yv12_c;
267            abgri_to_yv12   = abgri_to_yv12_c;
268            rgbai_to_yv12   = rgbai_to_yv12_c;
269            yuyvi_to_yv12   = yuyvi_to_yv12_c;
270            uyvyi_to_yv12   = uyvyi_to_yv12_c;
271    
272    
273            /* All colorspace transformation functions YV12->User format */
274          yv12_to_rgb555 = yv12_to_rgb555_c;          yv12_to_rgb555 = yv12_to_rgb555_c;
275          yv12_to_rgb565 = yv12_to_rgb565_c;          yv12_to_rgb565 = yv12_to_rgb565_c;
276          yv12_to_rgb24 = yv12_to_rgb24_c;          yv12_to_bgr     = yv12_to_bgr_c;
277          yv12_to_rgb32 = yv12_to_rgb32_c;          yv12_to_bgra    = yv12_to_bgra_c;
278          yv12_to_yuv = yv12_to_yuv_c;          yv12_to_abgr    = yv12_to_abgr_c;
279            yv12_to_rgba    = yv12_to_rgba_c;
280          yv12_to_yuyv = yv12_to_yuyv_c;          yv12_to_yuyv = yv12_to_yuyv_c;
281          yv12_to_uyvy = yv12_to_uyvy_c;          yv12_to_uyvy = yv12_to_uyvy_c;
282    
283            yv12_to_rgb555i = yv12_to_rgb555i_c;
284            yv12_to_rgb565i = yv12_to_rgb565i_c;
285            yv12_to_bgri    = yv12_to_bgri_c;
286            yv12_to_bgrai   = yv12_to_bgrai_c;
287            yv12_to_abgri   = yv12_to_abgri_c;
288            yv12_to_rgbai   = yv12_to_rgbai_c;
289            yv12_to_yuyvi   = yv12_to_yuyvi_c;
290            yv12_to_uyvyi   = yv12_to_uyvyi_c;
291    
292            /* Functions used in motion estimation algorithms */
293          calc_cbp = calc_cbp_c;          calc_cbp = calc_cbp_c;
294          sad16 = sad16_c;          sad16 = sad16_c;
295          sad8 = sad8_c;          sad8 = sad8_c;
296            sad16bi  = sad16bi_c;
297            sad8bi   = sad8bi_c;
298          dev16 = dev16_c;          dev16 = dev16_c;
299            sad16v   = sad16v_c;
300    
301  #ifdef ARCH_X86  /*      Halfpel8_Refine = Halfpel8_Refine_c; */
         if((cpu_flags & XVID_CPU_MMX) > 0) {  
                 fdct = fdct_mmx;  
                 idct = idct_mmx;  
302    
303    #if defined(ARCH_IS_IA32)
304    
305            if ((cpu_flags & XVID_CPU_ASM))
306            {
307                    vfilter_31 = xvid_VFilter_31_x86;
308                    hfilter_31 = xvid_HFilter_31_x86;
309            }
310    
311            if ((cpu_flags & XVID_CPU_MMX) || (cpu_flags & XVID_CPU_MMXEXT) ||
312                    (cpu_flags & XVID_CPU_3DNOW) || (cpu_flags & XVID_CPU_3DNOWEXT) ||
313                    (cpu_flags & XVID_CPU_SSE) || (cpu_flags & XVID_CPU_SSE2))
314            {
315                    /* Restore FPU context : emms_c is a nop functions */
316                  emms = emms_mmx;                  emms = emms_mmx;
317            }
318    
319            if ((cpu_flags & XVID_CPU_MMX)) {
320    
321                    /* Forward and Inverse Discrete Cosine Transformation functions */
322                    fdct = fdct_mmx;
323                    idct = idct_mmx;
324    
325                    /* Quantization related functions */
326                  quant_intra = quant_intra_mmx;                  quant_intra = quant_intra_mmx;
327                  dequant_intra = dequant_intra_mmx;                  dequant_intra = dequant_intra_mmx;
328                  quant_inter = quant_inter_mmx;                  quant_inter = quant_inter_mmx;
# Line 142  Line 333 
333                  quant4_inter = quant4_inter_mmx;                  quant4_inter = quant4_inter_mmx;
334                  dequant4_inter = dequant4_inter_mmx;                  dequant4_inter = dequant4_inter_mmx;
335    
336                    /* Block related functions */
337                  transfer_8to16copy = transfer_8to16copy_mmx;                  transfer_8to16copy = transfer_8to16copy_mmx;
338                  transfer_16to8copy = transfer_16to8copy_mmx;                  transfer_16to8copy = transfer_16to8copy_mmx;
339                  transfer_8to16sub = transfer_8to16sub_mmx;                  transfer_8to16sub = transfer_8to16sub_mmx;
340                    transfer_8to16subro  = transfer_8to16subro_mmx;
341                    transfer_8to16sub2 = transfer_8to16sub2_mmx;
342                  transfer_16to8add = transfer_16to8add_mmx;                  transfer_16to8add = transfer_16to8add_mmx;
343                  transfer8x8_copy = transfer8x8_copy_mmx;                  transfer8x8_copy = transfer8x8_copy_mmx;
344    
345                    /* Interlacing Functions */
346                    MBFieldTest = MBFieldTest_mmx;
347    
348                    /* Image Interpolation related functions */
349                  interpolate8x8_halfpel_h = interpolate8x8_halfpel_h_mmx;                  interpolate8x8_halfpel_h = interpolate8x8_halfpel_h_mmx;
350                  interpolate8x8_halfpel_v = interpolate8x8_halfpel_v_mmx;                  interpolate8x8_halfpel_v = interpolate8x8_halfpel_v_mmx;
351                  interpolate8x8_halfpel_hv = interpolate8x8_halfpel_hv_mmx;                  interpolate8x8_halfpel_hv = interpolate8x8_halfpel_hv_mmx;
352    
353                  rgb24_to_yv12 = rgb24_to_yv12_mmx;                  interpolate8x8_6tap_lowpass_h = interpolate8x8_6tap_lowpass_h_mmx;
354                  rgb32_to_yv12 = rgb32_to_yv12_mmx;                  interpolate8x8_6tap_lowpass_v = interpolate8x8_6tap_lowpass_v_mmx;
355                  yuv_to_yv12 = yuv_to_yv12_mmx;  
356                    interpolate8x8_avg2 = interpolate8x8_avg2_mmx;
357                    interpolate8x8_avg4 = interpolate8x8_avg4_mmx;
358    
359                    /* reduced resolution */
360                    copy_upsampled_8x8_16to8 = xvid_Copy_Upsampled_8x8_16To8_mmx;
361                    add_upsampled_8x8_16to8 = xvid_Add_Upsampled_8x8_16To8_mmx;
362                    hfilter_31 = xvid_HFilter_31_mmx;
363                    filter_18x18_to_8x8 = xvid_Filter_18x18_To_8x8_mmx;
364                    filter_diff_18x18_to_8x8 = xvid_Filter_Diff_18x18_To_8x8_mmx;
365    
366                    /* image input xxx_to_yv12 related functions */
367                    yv12_to_yv12  = yv12_to_yv12_mmx;
368                    bgr_to_yv12   = bgr_to_yv12_mmx;
369                    bgra_to_yv12  = bgra_to_yv12_mmx;
370                  yuyv_to_yv12 = yuyv_to_yv12_mmx;                  yuyv_to_yv12 = yuyv_to_yv12_mmx;
371                  uyvy_to_yv12 = uyvy_to_yv12_mmx;                  uyvy_to_yv12 = uyvy_to_yv12_mmx;
372    
373                  yv12_to_rgb24 = yv12_to_rgb24_mmx;                  /* image output yv12_to_xxx related functions */
374                  yv12_to_rgb32 = yv12_to_rgb32_mmx;                  yv12_to_bgr   = yv12_to_bgr_mmx;
375                    yv12_to_bgra  = yv12_to_bgra_mmx;
376                  yv12_to_yuyv = yv12_to_yuyv_mmx;                  yv12_to_yuyv = yv12_to_yuyv_mmx;
377                  yv12_to_uyvy = yv12_to_uyvy_mmx;                  yv12_to_uyvy = yv12_to_uyvy_mmx;
378    
379                    yv12_to_yuyvi = yv12_to_yuyvi_mmx;
380                    yv12_to_uyvyi = yv12_to_uyvyi_mmx;
381    
382                    /* Motion estimation related functions */
383                  calc_cbp = calc_cbp_mmx;                  calc_cbp = calc_cbp_mmx;
384                  sad16 = sad16_mmx;                  sad16 = sad16_mmx;
385                  sad8 = sad8_mmx;                  sad8 = sad8_mmx;
386                    sad16bi = sad16bi_mmx;
387                    sad8bi  = sad8bi_mmx;
388                  dev16 = dev16_mmx;                  dev16 = dev16_mmx;
389                    sad16v   = sad16v_mmx;
390            }
391    
392            /* these 3dnow functions are faster than mmx, but slower than xmm. */
393            if ((cpu_flags & XVID_CPU_3DNOW)) {
394    
395                    emms = emms_3dn;
396    
397                    /* ME functions */
398                    sad16bi = sad16bi_3dn;
399                    sad8bi  = sad8bi_3dn;
400    
401                    yuyv_to_yv12  = yuyv_to_yv12_3dn;
402                    uyvy_to_yv12  = uyvy_to_yv12_3dn;
403          }          }
404    
405          if((cpu_flags & XVID_CPU_MMXEXT) > 0) {  
406            if ((cpu_flags & XVID_CPU_MMXEXT)) {
407    
408                    /* Inverse DCT */
409                  idct = idct_xmm;                  idct = idct_xmm;
410    
411                    /* Interpolation */
412                  interpolate8x8_halfpel_h = interpolate8x8_halfpel_h_xmm;                  interpolate8x8_halfpel_h = interpolate8x8_halfpel_h_xmm;
413                  interpolate8x8_halfpel_v = interpolate8x8_halfpel_v_xmm;                  interpolate8x8_halfpel_v = interpolate8x8_halfpel_v_xmm;
414                  interpolate8x8_halfpel_hv = interpolate8x8_halfpel_hv_xmm;                  interpolate8x8_halfpel_hv = interpolate8x8_halfpel_hv_xmm;
                 yuv_to_yv12 = yuv_to_yv12_xmm;  
415    
416                    /* reduced resolution */
417                    copy_upsampled_8x8_16to8 = xvid_Copy_Upsampled_8x8_16To8_xmm;
418                    add_upsampled_8x8_16to8 = xvid_Add_Upsampled_8x8_16To8_xmm;
419    
420                    /* Quantization */
421                    quant4_intra = quant4_intra_xmm;
422                    quant4_inter = quant4_inter_xmm;
423    
424                    dequant_intra = dequant_intra_xmm;
425                    dequant_inter = dequant_inter_xmm;
426    
427                    /* Buffer transfer */
428                    transfer_8to16sub2 = transfer_8to16sub2_xmm;
429    
430                    /* Colorspace transformation */
431                    yv12_to_yv12  = yv12_to_yv12_xmm;
432                    yuyv_to_yv12  = yuyv_to_yv12_xmm;
433                    uyvy_to_yv12  = uyvy_to_yv12_xmm;
434    
435                    /* ME functions */
436                  sad16 = sad16_xmm;                  sad16 = sad16_xmm;
437                  sad8 = sad8_xmm;                  sad8 = sad8_xmm;
438                    sad16bi = sad16bi_xmm;
439                    sad8bi  = sad8bi_xmm;
440                  dev16 = dev16_xmm;                  dev16 = dev16_xmm;
441                    sad16v   = sad16v_xmm;
442          }          }
443    
444          if((cpu_flags & XVID_CPU_3DNOW) > 0) {          if ((cpu_flags & XVID_CPU_3DNOW)) {
445    
446                    /* Interpolation */
447                  interpolate8x8_halfpel_h = interpolate8x8_halfpel_h_3dn;                  interpolate8x8_halfpel_h = interpolate8x8_halfpel_h_3dn;
448                  interpolate8x8_halfpel_v = interpolate8x8_halfpel_v_3dn;                  interpolate8x8_halfpel_v = interpolate8x8_halfpel_v_3dn;
449                  interpolate8x8_halfpel_hv = interpolate8x8_halfpel_hv_3dn;                  interpolate8x8_halfpel_hv = interpolate8x8_halfpel_hv_3dn;
450          }          }
451    
452            if ((cpu_flags & XVID_CPU_3DNOWEXT)) {
453    
454                    /* Inverse DCT */
455                    idct =  idct_3dne;
456    
457                    /* Buffer transfer */
458                    transfer_8to16copy =  transfer_8to16copy_3dne;
459                    transfer_16to8copy = transfer_16to8copy_3dne;
460                    transfer_8to16sub =  transfer_8to16sub_3dne;
461                    transfer_8to16subro =  transfer_8to16subro_3dne;
462                    transfer_8to16sub2 =  transfer_8to16sub2_3dne;
463                    transfer_16to8add = transfer_16to8add_3dne;
464                    transfer8x8_copy = transfer8x8_copy_3dne;
465    
466                    /* Quantization */
467                    dequant4_intra = dequant4_intra_3dne;
468                    dequant4_inter = dequant4_inter_3dne;
469                    quant_intra = quant_intra_3dne;
470                    quant_inter = quant_inter_3dne;
471                    dequant_intra = dequant_intra_3dne;
472                    dequant_inter = dequant_inter_3dne;
473    
474                    /* ME functions */
475                    calc_cbp = calc_cbp_3dne;
476                    sad16 = sad16_3dne;
477                    sad8 = sad8_3dne;
478                    sad16bi = sad16bi_3dne;
479                    sad8bi = sad8bi_3dne;
480                    dev16 = dev16_3dne;
481    
482                    /* Interpolation */
483                    interpolate8x8_halfpel_h = interpolate8x8_halfpel_h_3dne;
484                    interpolate8x8_halfpel_v = interpolate8x8_halfpel_v_3dne;
485                    interpolate8x8_halfpel_hv = interpolate8x8_halfpel_hv_3dne;
486            }
487    
488    
489            if ((cpu_flags & XVID_CPU_SSE2)) {
490    
491    #if defined(EXPERIMENTAL_SSE2_CODE) /* many people reported crashes with SSE2 */
492                                                                            /* better deactivate it completely and fix everything */
493                                                                            /* in dev-api-4 */
494                    calc_cbp = calc_cbp_sse2;
495    
496                    /* Quantization */
497                    quant_intra   = quant_intra_sse2;
498                    dequant_intra = dequant_intra_sse2;
499                    quant_inter   = quant_inter_sse2;
500                    dequant_inter = dequant_inter_sse2;
501    
502                    /* ME; slower than xmm */
503                    sad16    = sad16_sse2;
504                    dev16    = dev16_sse2;
505    #endif
506                    /* Forward and Inverse DCT */
507                    /* idct  = idct_sse2;
508                    /* fdct = fdct_sse2; Both are none to be unprecise - better deactivate for now */
509            }
510    #endif
511    
512    #if defined(ARCH_IS_IA64)
513            if ((cpu_flags & XVID_CPU_ASM)) { /* use assembler routines? */
514              idct_ia64_init();
515              fdct = fdct_ia64;
516              idct = idct_ia64;   /*not yet working, crashes */
517              interpolate8x8_halfpel_h = interpolate8x8_halfpel_h_ia64;
518              interpolate8x8_halfpel_v = interpolate8x8_halfpel_v_ia64;
519              interpolate8x8_halfpel_hv = interpolate8x8_halfpel_hv_ia64;
520              sad16 = sad16_ia64;
521              sad16bi = sad16bi_ia64;
522              sad8 = sad8_ia64;
523              dev16 = dev16_ia64;
524    /*        Halfpel8_Refine = Halfpel8_Refine_ia64; */
525              quant_intra = quant_intra_ia64;
526              dequant_intra = dequant_intra_ia64;
527              quant_inter = quant_inter_ia64;
528              dequant_inter = dequant_inter_ia64;
529              transfer_8to16copy = transfer_8to16copy_ia64;
530              transfer_16to8copy = transfer_16to8copy_ia64;
531              transfer_8to16sub = transfer_8to16sub_ia64;
532              transfer_8to16sub2 = transfer_8to16sub2_ia64;
533              transfer_16to8add = transfer_16to8add_ia64;
534              transfer8x8_copy = transfer8x8_copy_ia64;
535              DPRINTF(DPRINTF_DEBUG, "Using IA-64 assembler routines.");
536            }
537  #endif  #endif
538  #ifdef ARCH_PPC  
539  #ifdef ARCH_PPC_ALTIVEC  #if defined(ARCH_IS_PPC)
540            if ((cpu_flags & XVID_CPU_ASM))
541            {
542                    calc_cbp = calc_cbp_ppc;
543            }
544    
545            if ((cpu_flags & XVID_CPU_ALTIVEC))
546            {
547          calc_cbp = calc_cbp_altivec;          calc_cbp = calc_cbp_altivec;
548          fdct = fdct_altivec;          fdct = fdct_altivec;
549          idct = idct_altivec;          idct = idct_altivec;
550  #else                  sadInit = sadInit_altivec;
551          calc_cbp = calc_cbp_ppc;                  sad16 = sad16_altivec;
552                    sad8 = sad8_altivec;
553                    dev16 = dev16_altivec;
554            }
555  #endif  #endif
556    
557            return XVID_ERR_OK;
558    }
559    
560    
561    
562    static int
563    xvid_init_convert(XVID_INIT_CONVERTINFO* convert)
564    {
565    /*
566            const int flip1 =
567                    (convert->input.colorspace & XVID_CSP_VFLIP) ^
568                    (convert->output.colorspace & XVID_CSP_VFLIP);
569    */
570            const int width = convert->width;
571            const int height = convert->height;
572            const int width2 = convert->width/2;
573            const int height2 = convert->height/2;
574            IMAGE img;
575    
576            switch (convert->input.colorspace & ~XVID_CSP_VFLIP)
577            {
578                    case XVID_CSP_YV12 :
579                            img.y = convert->input.y;
580                            img.v = (uint8_t*)convert->input.y + width*height;
581                            img.u = (uint8_t*)convert->input.y + width*height + width2*height2;
582                            image_output(&img, width, height, width,
583                                                    convert->output.y, convert->output.y_stride,
584                                                    convert->output.colorspace, convert->interlacing);
585                            break;
586    
587                    default :
588                            return XVID_ERR_FORMAT;
589            }
590    
591    
592            emms();
593            return XVID_ERR_OK;
594    }
595    
596    
597    
598    void fill8(uint8_t * block, int size, int value)
599    {
600            int i;
601            for (i = 0; i < size; i++)
602                    block[i] = value;
603    }
604    
605    void fill16(int16_t * block, int size, int value)
606    {
607            int i;
608            for (i = 0; i < size; i++)
609                    block[i] = value;
610    }
611    
612    #define RANDOM(min,max) min + (rand() % (max-min))
613    
614    void random8(uint8_t * block, int size, int min, int max)
615    {
616            int i;
617            for (i = 0; i < size; i++)
618                    block[i] = RANDOM(min,max);
619    }
620    
621    void random16(int16_t * block, int size, int min, int max)
622    {
623            int i;
624            for (i = 0; i < size; i++)
625                    block[i] = RANDOM(min,max);
626    }
627    
628    int compare16(const int16_t * blockA, const int16_t * blockB, int size)
629    {
630            int i;
631            for (i = 0; i < size; i++)
632                    if (blockA[i] != blockB[i])
633                            return 1;
634    
635            return 0;
636    }
637    
638    int diff16(const int16_t * blockA, const int16_t * blockB, int size)
639    {
640            int i, diff = 0;
641            for (i = 0; i < size; i++)
642                    diff += ABS(blockA[i]-blockB[i]);
643            return diff;
644    }
645    
646    
647    #define XVID_TEST_RANDOM        0x00000001      /* random input data */
648    #define XVID_TEST_VERBOSE       0x00000002      /* verbose error output */
649    
650    
651    #define TEST_FORWARD    0x00000001      /* intra */
652    #define TEST_FDCT  (TEST_FORWARD)
653    #define TEST_IDCT  (0)
654    
655    static int test_transform(void * funcA, void * funcB, const char * nameB,
656                                       int test, int flags)
657    {
658            int i;
659            int64_t timeSTART;
660            int64_t timeA = 0;
661            int64_t timeB = 0;
662            DECLARE_ALIGNED_MATRIX(arrayA, 1, 64, int16_t, CACHE_LINE);
663            DECLARE_ALIGNED_MATRIX(arrayB, 1, 64, int16_t, CACHE_LINE);
664            int min, max;
665            int count = 0;
666    
667            int tmp;
668            int min_error = 0x10000*64;
669            int max_error = 0;
670    
671    
672            if ((test & TEST_FORWARD))      /* forward */
673            {
674                    min = -256;
675                    max = 255;
676            }else{          /* inverse */
677                    min = -2048;
678                    max = 2047;
679            }
680    
681            for (i = 0; i < 64*64; i++)
682            {
683                    if ((flags & XVID_TEST_RANDOM))
684                    {
685                            random16(arrayA, 64, min, max);
686                    }else{
687                            fill16(arrayA, 64, i);
688                    }
689                    memcpy(arrayB, arrayA, 64*sizeof(int16_t));
690    
691                    if ((test & TEST_FORWARD))
692                    {
693                            timeSTART = read_counter();
694                            ((fdctFunc*)funcA)(arrayA);
695                            timeA += read_counter() - timeSTART;
696    
697                            timeSTART = read_counter();
698                            ((fdctFunc*)funcB)(arrayB);
699                            timeB += read_counter() - timeSTART;
700                    }
701                    else
702                    {
703                            timeSTART = read_counter();
704                            ((idctFunc*)funcA)(arrayA);
705                            timeA += read_counter() - timeSTART;
706    
707                            timeSTART = read_counter();
708                            ((idctFunc*)funcB)(arrayB);
709                            timeB += read_counter() - timeSTART;
710                    }
711    
712                    tmp = diff16(arrayA, arrayB, 64) / 64;
713                    if (tmp > max_error)
714                            max_error = tmp;
715                    if (tmp < min_error)
716                            min_error = tmp;
717    
718                    count++;
719            }
720    
721            /* print the "average difference" of best/worst transforms */
722            printf("%s:\t%i\t(min_error:%i, max_error:%i)\n", nameB, (int)(timeB / count), min_error, max_error);
723    
724            return 0;
725    }
726    
727    
728    #define TEST_QUANT      0x00000001      /* forward quantization */
729    #define TEST_INTRA      0x00000002      /* intra */
730    #define TEST_QUANT_INTRA        (TEST_QUANT|TEST_INTRA)
731    #define TEST_QUANT_INTER        (TEST_QUANT)
732    #define TEST_DEQUANT_INTRA      (TEST_INTRA)
733    #define TEST_DEQUANT_INTER      (0)
734    
735    static int test_quant(void * funcA, void * funcB, const char * nameB,
736                               int test, int flags)
737    {
738            int q,i;
739            int64_t timeSTART;
740            int64_t timeA = 0;
741            int64_t timeB = 0;
742            int retA = 0, retB = 0;
743            DECLARE_ALIGNED_MATRIX(arrayX, 1, 64, int16_t, CACHE_LINE);
744            DECLARE_ALIGNED_MATRIX(arrayA, 1, 64, int16_t, CACHE_LINE);
745            DECLARE_ALIGNED_MATRIX(arrayB, 1, 64, int16_t, CACHE_LINE);
746            int min, max;
747            int count = 0;
748            int errors = 0;
749    
750            if ((test & TEST_QUANT))        /* quant */
751            {
752                    min = -2048;
753                    max = 2047;
754            }else{          /* dequant */
755                    min = -256;
756                    max = 255;
757            }
758    
759            for (q = 1; q <= 31; q++)       /* quantizer */
760            {
761                    for (i = min; i < max; i++)     /* input coeff */
762                    {
763                            if ((flags & XVID_TEST_RANDOM))
764                            {
765                                    random16(arrayX, 64, min, max);
766                            }else{
767                                    fill16(arrayX, 64, i);
768                            }
769    
770                            if ((test & TEST_INTRA))        /* intra */
771                            {
772                                    timeSTART = read_counter();
773                                    ((quanth263_intraFunc*)funcA)(arrayA, arrayX, q, q);
774                                    timeA += read_counter() - timeSTART;
775    
776                                    timeSTART = read_counter();
777                                    ((quanth263_intraFunc*)funcB)(arrayB, arrayX, q, q);
778                                    timeB += read_counter() - timeSTART;
779                            }
780                            else    /* inter */
781                            {
782                                    timeSTART = read_counter();
783                                    retA = ((quanth263_interFunc*)funcA)(arrayA, arrayX, q);
784                                    timeA += read_counter() - timeSTART;
785    
786                                    timeSTART = read_counter();
787                                    retB = ((quanth263_interFunc*)funcB)(arrayB, arrayX, q);
788                                    timeB += read_counter() - timeSTART;
789                            }
790    
791                            /* compare return value from quant_inter, and compare (de)quantiz'd arrays */
792                            if ( ((test&TEST_QUANT) && !(test&TEST_INTRA) && retA != retB ) ||
793                                    compare16(arrayA, arrayB, 64))
794                            {
795                                    errors++;
796                                    if ((flags & XVID_TEST_VERBOSE))
797                                            printf("%s error: q=%i, i=%i\n", nameB, q, i);
798                            }
799    
800                            count++;
801                    }
802            }
803    
804            printf("%s:\t%i", nameB, (int)(timeB / count));
805            if (errors>0)
806                    printf("\t(%i errors out of %i)", errors, count);
807            printf("\n");
808    
809            return 0;
810    }
811    
812    
813    
814    int xvid_init_test(int flags)
815    {
816    #if defined(ARCH_IS_IA32)
817            int cpu_flags;
818  #endif  #endif
819    
820          // API version          printf("XviD tests\n\n");
         init_param->api_version = API_VERSION;  
821    
822          // something clever has to be done for this  #if defined(ARCH_IS_IA32)
823          init_param->core_build = 1000;          cpu_flags = detect_cpu_flags();
824    #endif
825    
826            idct_int32_init();
827            emms();
828    
829            srand(time(0));
830    
831            /* fDCT test */
832            printf("--- fdct ---\n");
833                    test_transform(fdct_int32, fdct_int32, "c", TEST_FDCT, flags);
834    
835    #if defined(ARCH_IS_IA32)
836            if (cpu_flags & XVID_CPU_MMX)
837                    test_transform(fdct_int32, fdct_mmx, "mmx", TEST_FDCT, flags);
838            if (cpu_flags & XVID_CPU_SSE2)
839                    test_transform(fdct_int32, fdct_sse2, "sse2", TEST_FDCT, flags);
840    #endif
841    
842            /* iDCT test */
843            printf("\n--- idct ---\n");
844                    test_transform(idct_int32, idct_int32, "c", TEST_IDCT, flags);
845    
846    #if defined(ARCH_IS_IA32)
847            if (cpu_flags & XVID_CPU_MMX)
848                    test_transform(idct_int32, idct_mmx, "mmx", TEST_IDCT, flags);
849            if (cpu_flags & XVID_CPU_MMXEXT)
850                    test_transform(idct_int32, idct_xmm, "xmm", TEST_IDCT, flags);
851            if (cpu_flags & XVID_CPU_3DNOWEXT)
852                    test_transform(idct_int32, idct_3dne, "3dne", TEST_IDCT, flags);
853            if (cpu_flags & XVID_CPU_SSE2)
854                    test_transform(idct_int32, idct_sse2, "sse2", TEST_IDCT, flags);
855    #endif
856    
857            /* Intra quantization test */
858            printf("\n--- quant intra ---\n");
859                    test_quant(quant_intra_c, quant_intra_c, "c", TEST_QUANT_INTRA, flags);
860    
861    #if defined(ARCH_IS_IA32)
862            if (cpu_flags & XVID_CPU_MMX)
863                    test_quant(quant_intra_c, quant_intra_mmx, "mmx", TEST_QUANT_INTRA, flags);
864            if (cpu_flags & XVID_CPU_3DNOWEXT)
865                    test_quant(quant_intra_c, quant_intra_3dne, "3dne", TEST_QUANT_INTRA, flags);
866            if (cpu_flags & XVID_CPU_SSE2)
867                    test_quant(quant_intra_c, quant_intra_sse2, "sse2", TEST_QUANT_INTRA, flags);
868    #endif
869    
870            /* Inter quantization test */
871            printf("\n--- quant inter ---\n");
872                    test_quant(quant_inter_c, quant_inter_c, "c", TEST_QUANT_INTER, flags);
873    
874    #if defined(ARCH_IS_IA32)
875            if (cpu_flags & XVID_CPU_MMX)
876                    test_quant(quant_inter_c, quant_inter_mmx, "mmx", TEST_QUANT_INTER, flags);
877            if (cpu_flags & XVID_CPU_3DNOWEXT)
878                    test_quant(quant_inter_c, quant_inter_3dne, "3dne", TEST_QUANT_INTER, flags);
879            if (cpu_flags & XVID_CPU_SSE2)
880                    test_quant(quant_inter_c, quant_inter_sse2, "sse2", TEST_QUANT_INTER, flags);
881    #endif
882    
883            /* Intra dequantization test */
884            printf("\n--- dequant intra ---\n");
885                    test_quant(dequant_intra_c, dequant_intra_c, "c", TEST_DEQUANT_INTRA, flags);
886    
887    #if defined(ARCH_IS_IA32)
888            if (cpu_flags & XVID_CPU_MMX)
889                    test_quant(dequant_intra_c, dequant_intra_mmx, "mmx", TEST_DEQUANT_INTRA, flags);
890            if (cpu_flags & XVID_CPU_MMXEXT)
891                    test_quant(dequant_intra_c, dequant_intra_xmm, "xmm", TEST_DEQUANT_INTRA, flags);
892            if (cpu_flags & XVID_CPU_3DNOWEXT)
893                    test_quant(dequant_intra_c, dequant_intra_3dne, "3dne", TEST_DEQUANT_INTRA, flags);
894            if (cpu_flags & XVID_CPU_SSE2)
895                    test_quant(dequant_intra_c, dequant_intra_sse2, "sse2", TEST_DEQUANT_INTRA, flags);
896    #endif
897    
898            /* Inter dequantization test */
899            printf("\n--- dequant inter ---\n");
900                    test_quant(dequant_inter_c, dequant_inter_c, "c", TEST_DEQUANT_INTER, flags);
901    
902    #if defined(ARCH_IS_IA32)
903            if (cpu_flags & XVID_CPU_MMX)
904                    test_quant(dequant_inter_c, dequant_inter_mmx, "mmx", TEST_DEQUANT_INTER, flags);
905            if (cpu_flags & XVID_CPU_MMXEXT)
906                    test_quant(dequant_inter_c, dequant_inter_xmm, "xmm", TEST_DEQUANT_INTER, flags);
907            if (cpu_flags & XVID_CPU_3DNOWEXT)
908                    test_quant(dequant_inter_c, dequant_inter_3dne, "3dne", TEST_DEQUANT_INTER, flags);
909            if (cpu_flags & XVID_CPU_SSE2)
910                    test_quant(dequant_inter_c, dequant_inter_sse2, "sse2", TEST_DEQUANT_INTER, flags);
911    #endif
912    
913            /* Intra quantization test */
914            printf("\n--- quant4 intra ---\n");
915                    test_quant(quant4_intra_c, quant4_intra_c, "c", TEST_QUANT_INTRA, flags);
916    
917    #if defined(ARCH_IS_IA32)
918            if (cpu_flags & XVID_CPU_MMX)
919                    test_quant(quant4_intra_c, quant4_intra_mmx, "mmx", TEST_QUANT_INTRA, flags);
920            if (cpu_flags & XVID_CPU_MMXEXT)
921                    test_quant(quant4_intra_c, quant4_intra_xmm, "xmm", TEST_QUANT_INTRA, flags);
922    #endif
923    
924            /* Inter quantization test */
925            printf("\n--- quant4 inter ---\n");
926                    test_quant(quant4_inter_c, quant4_inter_c, "c", TEST_QUANT_INTER, flags);
927    
928    #if defined(ARCH_IS_IA32)
929            if (cpu_flags & XVID_CPU_MMX)
930                    test_quant(quant4_inter_c, quant4_inter_mmx, "mmx", TEST_QUANT_INTER, flags);
931            if (cpu_flags & XVID_CPU_MMXEXT)
932                    test_quant(quant4_inter_c, quant4_inter_xmm, "xmm", TEST_QUANT_INTER, flags);
933    #endif
934    
935            /* Intra dequantization test */
936            printf("\n--- dequant4 intra ---\n");
937                    test_quant(dequant4_intra_c, dequant4_intra_c, "c", TEST_DEQUANT_INTRA, flags);
938    
939    #if defined(ARCH_IS_IA32)
940            if (cpu_flags & XVID_CPU_MMX)
941                    test_quant(dequant4_intra_c, dequant4_intra_mmx, "mmx", TEST_DEQUANT_INTRA, flags);
942            if (cpu_flags & XVID_CPU_3DNOWEXT)
943                    test_quant(dequant4_intra_c, dequant4_intra_3dne, "3dne", TEST_DEQUANT_INTRA, flags);
944    #endif
945    
946            /* Inter dequantization test */
947            printf("\n--- dequant4 inter ---\n");
948                    test_quant(dequant4_inter_c, dequant4_inter_c, "c", TEST_DEQUANT_INTER, flags);
949    
950    #if defined(ARCH_IS_IA32)
951            if (cpu_flags & XVID_CPU_MMX)
952                    test_quant(dequant4_inter_c, dequant4_inter_mmx, "mmx", TEST_DEQUANT_INTER, flags);
953            if (cpu_flags & XVID_CPU_3DNOWEXT)
954                    test_quant(dequant4_inter_c, dequant4_inter_3dne, "3dne", TEST_DEQUANT_INTER, flags);
955    #endif
956    
957            emms();
958    
959          return XVID_ERR_OK;          return XVID_ERR_OK;
960  }  }
961    
962  int xvid_decore(void * handle, int opt, void * param1, void * param2)  
963    int
964    xvid_init(void *handle,
965                      int opt,
966                      void *param1,
967                      void *param2)
968  {  {
969          switch (opt)          switch (opt)
970          {          {
971                    case XVID_INIT_INIT :
972                            return xvid_init_init((XVID_INIT_PARAM*)param1);
973    
974                    case XVID_INIT_CONVERT :
975                            return xvid_init_convert((XVID_INIT_CONVERTINFO*)param1);
976    
977                    case XVID_INIT_TEST :
978                    {
979                            ptr_t flags = (ptr_t)param1;
980                            return xvid_init_test((int)flags);
981                    }
982                    default :
983                            return XVID_ERR_FAIL;
984            }
985    }
986    
987    /*****************************************************************************
988     * XviD Native decoder entry point
989     *
990     * This function is just a wrapper to all the option cases.
991     *
992     * Returned values : XVID_ERR_FAIL when opt is invalid
993     *                   else returns the wrapped function result
994     *
995     ****************************************************************************/
996    
997    int
998    xvid_decore(void *handle,
999                            int opt,
1000                            void *param1,
1001                            void *param2)
1002    {
1003            switch (opt) {
1004          case XVID_DEC_DECODE :          case XVID_DEC_DECODE :
1005          return decoder_decode((DECODER *) handle, (XVID_DEC_FRAME *) param1);                  return decoder_decode((DECODER *) handle, (XVID_DEC_FRAME *) param1, (XVID_DEC_STATS*) param2);
1006    
1007          case XVID_DEC_CREATE :          case XVID_DEC_CREATE :
1008          return decoder_create((XVID_DEC_PARAM *) param1);          return decoder_create((XVID_DEC_PARAM *) param1);
# Line 228  Line 1016 
1016  }  }
1017    
1018    
1019  int xvid_encore(void * handle, int opt, void * param1, void * param2)  /*****************************************************************************
1020  {   * XviD Native encoder entry point
1021          switch (opt)   *
1022     * This function is just a wrapper to all the option cases.
1023     *
1024     * Returned values : XVID_ERR_FAIL when opt is invalid
1025     *                   else returns the wrapped function result
1026     *
1027     ****************************************************************************/
1028    
1029    int
1030    xvid_encore(void *handle,
1031                            int opt,
1032                            void *param1,
1033                            void *param2)
1034          {          {
1035            switch (opt) {
1036          case XVID_ENC_ENCODE :          case XVID_ENC_ENCODE :
1037          return encoder_encode((Encoder *) handle, (XVID_ENC_FRAME *) param1, (XVID_ENC_STATS *) param2);  
1038                    if (((Encoder *) handle)->mbParam.max_bframes >= 0)
1039                            return encoder_encode_bframes((Encoder *) handle,
1040                                                                                      (XVID_ENC_FRAME *) param1,
1041                                                                                      (XVID_ENC_STATS *) param2);
1042                    else
1043                            return encoder_encode((Encoder *) handle,
1044                                                                      (XVID_ENC_FRAME *) param1,
1045                                                                      (XVID_ENC_STATS *) param2);
1046    
1047          case XVID_ENC_CREATE :          case XVID_ENC_CREATE :
1048          return encoder_create((XVID_ENC_PARAM *) param1);          return encoder_create((XVID_ENC_PARAM *) param1);

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.47

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