~ubuntu-branches/ubuntu/trusty/gavl/trusty

« back to all changes in this revision

Viewing changes to gavl/colorspace.c

  • Committer: Bazaar Package Importer
  • Author(s): Free Ekanayaka
  • Date: 2007-04-16 12:53:08 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070416125308-k8gdo9sofz72gjkf
Tags: 0.2.5-1
* New upstream release
* Adapted fpic.patch to the new version
* Fixed broken watch file

Show diffs side-by-side

added added

removed removed

Lines of Context:
198
198
                                 int width, int height)
199
199
  {
200
200
  gavl_pixelformat_function_table_t * csp_tab;
201
 
  int real_accel_flags = opt->accel_flags ?
202
 
    gavl_real_accel_flags(opt->accel_flags) : 0;
203
201
    
204
202
  csp_tab =
205
203
    calloc(1,sizeof(gavl_pixelformat_function_table_t));
206
 
#if 1
207
 
  if(!real_accel_flags || (real_accel_flags & GAVL_ACCEL_C))
 
204
 
 
205
  //  fprintf(stderr, "create_pixelformat_function_table, flags: %08x, q: %d\n",
 
206
  //          opt->accel_flags, opt->quality);
 
207
  
 
208
  /* Standard C-routines, always complete */
 
209
  if(opt->quality || (opt->accel_flags & GAVL_ACCEL_C))
208
210
    {
209
 
    //    fprintf(stderr, "Init C functions %08x\n", real_accel_flags);
210
211
    gavl_init_rgb_rgb_funcs_c(csp_tab, opt);
211
212
    gavl_init_rgb_yuv_funcs_c(csp_tab, opt);
212
213
    gavl_init_yuv_rgb_funcs_c(csp_tab, opt);
213
214
    gavl_init_yuv_yuv_funcs_c(csp_tab, opt);
214
215
    }
215
 
#endif
216
216
  
217
 
#ifdef ARCH_X86
218
 
  if(!real_accel_flags || (real_accel_flags & GAVL_ACCEL_MMX))
 
217
#ifdef HAVE_MMX
 
218
  if(opt->accel_flags & GAVL_ACCEL_MMX)
219
219
    {
220
220
    //    fprintf(stderr, "Init MMX functions %08x\n", real_accel_flags);
221
221
    gavl_init_rgb_rgb_funcs_mmx(csp_tab, width, opt);
223
223
    gavl_init_yuv_yuv_funcs_mmx(csp_tab, width, opt);
224
224
    gavl_init_yuv_rgb_funcs_mmx(csp_tab, width, opt);
225
225
    }
226
 
  if(!real_accel_flags || (real_accel_flags & GAVL_ACCEL_MMXEXT))
 
226
  if(opt->accel_flags & GAVL_ACCEL_MMXEXT)
227
227
    {
228
228
    //    fprintf(stderr, "Init MMXEXT functions %08x\n", real_accel_flags);
229
229
    gavl_init_rgb_rgb_funcs_mmxext(csp_tab, width, opt);
232
232
    gavl_init_yuv_rgb_funcs_mmxext(csp_tab, width, opt);
233
233
    }
234
234
#endif
 
235
 
 
236
  /* High quality */
 
237
  
 
238
  if((opt->quality > 3) ||
 
239
     ((!opt->quality) && (opt->accel_flags & GAVL_ACCEL_C_HQ)))
 
240
    {
 
241
    //    fprintf(stderr, "Init HQ\n");
 
242
    gavl_init_rgb_rgb_funcs_hq(csp_tab, opt);
 
243
    gavl_init_rgb_yuv_funcs_hq(csp_tab, opt);
 
244
    gavl_init_yuv_rgb_funcs_hq(csp_tab, opt);
 
245
    gavl_init_yuv_yuv_funcs_hq(csp_tab, opt);
 
246
    }
 
247
 
 
248
 
235
249
  return csp_tab;
236
250
  }
237
251
 
2595
2609
 
2596
2610
  if(!gavl_pixelformat_is_planar(in_csp))
2597
2611
    {
2598
 
    fprintf(stderr, "BLUPPPP: %d %d\n", gavl_pixelformat_is_planar(out_csp),
2599
 
            gavl_pixelformat_bytes_per_component(out_csp));
 
2612
    // fprintf(stderr, "BLUPPPP: %d %d\n", gavl_pixelformat_is_planar(out_csp),
 
2613
    //         gavl_pixelformat_bytes_per_component(out_csp));
2600
2614
    
2601
2615
    if(gavl_pixelformat_is_planar(out_csp) &&
2602
2616
       (gavl_pixelformat_bytes_per_component(out_csp) == 1))