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

« back to all changes in this revision

Viewing changes to src/scaletest.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:
17
17
  {
18
18
  int i;
19
19
  unsigned char ** rows;
20
 
 
 
20
  gavl_video_options_t * opt;
21
21
  int color_type;
22
22
  FILE * output;
23
23
 
47
47
      color_type = PNG_COLOR_TYPE_RGB;
48
48
      }
49
49
    frame_1 = gavl_video_frame_create(&format_1);
50
 
    
 
50
 
 
51
    opt = gavl_video_converter_get_options(cnv);
 
52
    gavl_video_options_set_alpha_mode(opt, GAVL_ALPHA_BLEND_COLOR);    
51
53
    gavl_video_converter_init(cnv, format, &format_1);
52
54
    
53
55
    gavl_video_convert(cnv, frame, frame_1);
110
112
  unsigned char ** rows;
111
113
  
112
114
  gavl_video_converter_t * cnv;
 
115
  gavl_video_options_t * opt;
113
116
  gavl_video_format_t format_1;
114
117
  gavl_video_frame_t * frame, * frame_1;
115
118
    
218
221
  if(format->pixelformat != pixelformat)
219
222
    {
220
223
    cnv = gavl_video_converter_create();
 
224
    opt = gavl_video_converter_get_options(cnv);
 
225
    gavl_video_options_set_alpha_mode(opt, GAVL_ALPHA_BLEND_COLOR);    
221
226
 
222
227
    gavl_video_format_copy(&format_1, format);
223
228
    format_1.pixelformat = pixelformat;
280
285
    dst_rect.x = 0;
281
286
    dst_rect.y = 0;
282
287
    
283
 
    src_rect.w = 128;
284
 
    src_rect.h = 128;
 
288
    src_rect.w = 640;
 
289
    src_rect.h = 480;
285
290
    src_rect.x = 0;
286
291
    src_rect.y = 0;
287
292
        
301
306
 
302
307
    gavl_video_options_set_defaults(opt);
303
308
    gavl_video_options_set_scale_mode(opt, GAVL_SCALE_SINC_LANCZOS);
 
309
    gavl_video_options_set_scale_order(opt, 5);
304
310
    //    gavl_video_options_set_scale_mode(opt, GAVL_SCALE_CUBIC_BSPLINE);
305
311
    gavl_video_options_set_accel_flags(opt, GAVL_ACCEL_C);
306
312
    gavl_video_options_set_rectangles(opt, &src_rect, &dst_rect);