summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/nullvideo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/nullvideo.c b/noncore/multimedia/opieplayer2/nullvideo.c
index e50d7b5..f356e76 100644
--- a/noncore/multimedia/opieplayer2/nullvideo.c
+++ b/noncore/multimedia/opieplayer2/nullvideo.c
@@ -326,193 +326,193 @@ static void null_update_frame_format( vo_driver_t* self, vo_frame_t* img,
326 free ( frame->data ); 326 free ( frame->data );
327 } 327 }
328 printf("after freeing\n"); 328 printf("after freeing\n");
329 frame->data = xine_xmalloc (frame->output_width * frame->output_height * 329 frame->data = xine_xmalloc (frame->output_width * frame->output_height *
330 this->bytes_per_pixel ); 330 this->bytes_per_pixel );
331 331
332 if( format == IMGFMT_YV12 ) { 332 if( format == IMGFMT_YV12 ) {
333 int image_size = width * height; /* cast ouch*/ 333 int image_size = width * height; /* cast ouch*/
334 frame->frame.base[0] = xine_xmalloc_aligned(16, image_size, 334 frame->frame.base[0] = xine_xmalloc_aligned(16, image_size,
335 (void **)&frame->chunk[0] ); 335 (void **)&frame->chunk[0] );
336 frame->frame.base[1] = xine_xmalloc_aligned(16, image_size, 336 frame->frame.base[1] = xine_xmalloc_aligned(16, image_size,
337 (void **)&frame->chunk[1] ); 337 (void **)&frame->chunk[1] );
338 frame->frame.base[2] = xine_xmalloc_aligned(16, image_size, 338 frame->frame.base[2] = xine_xmalloc_aligned(16, image_size,
339 (void **)&frame->chunk[2] ); 339 (void **)&frame->chunk[2] );
340 }else{ 340 }else{
341 int image_size = width * height; /* cast ouch*/ 341 int image_size = width * height; /* cast ouch*/
342 frame->frame.base[0] = xine_xmalloc_aligned(16, image_size, 342 frame->frame.base[0] = xine_xmalloc_aligned(16, image_size,
343 (void **)&frame->chunk[0] ); 343 (void **)&frame->chunk[0] );
344 frame->chunk[1] = NULL; 344 frame->chunk[1] = NULL;
345 frame->chunk[2] = NULL; 345 frame->chunk[2] = NULL;
346 } 346 }
347 347
348 frame->format = format; 348 frame->format = format;
349 frame->width = width; 349 frame->width = width;
350 frame->height = height; 350 frame->height = height;
351 351
352 frame->stripe_height = 16 * frame->output_height / frame->height; 352 frame->stripe_height = 16 * frame->output_height / frame->height;
353 frame->bytes_per_line = frame->output_width * this->bytes_per_pixel; 353 frame->bytes_per_line = frame->output_width * this->bytes_per_pixel;
354 354
355 /* 355 /*
356 * set up colorspace converter 356 * set up colorspace converter
357 */ 357 */
358 if(this->m_show_video ){ 358 if(this->m_show_video ){
359 printf("showing video\n"); 359 printf("showing video\n");
360 360
361 switch (flags) { 361 switch (flags) {
362 case VO_TOP_FIELD: 362 case VO_TOP_FIELD:
363 case VO_BOTTOM_FIELD: 363 case VO_BOTTOM_FIELD:
364 frame->yuv2rgb->configure (frame->yuv2rgb, 364 frame->yuv2rgb->configure (frame->yuv2rgb,
365 frame->width, 365 frame->width,
366 16, 366 16,
367 frame->width*2, 367 frame->width*2,
368 frame->width, 368 frame->width,
369 frame->output_width, 369 frame->output_width,
370 frame->stripe_height, 370 frame->stripe_height,
371 frame->bytes_per_line*2); 371 frame->bytes_per_line*2);
372 frame->yuv_stride = frame->bytes_per_line*2; 372 frame->yuv_stride = frame->bytes_per_line*2;
373 break; 373 break;
374 case VO_BOTH_FIELDS: 374 case VO_BOTH_FIELDS:
375 frame->yuv2rgb->configure (frame->yuv2rgb, 375 frame->yuv2rgb->configure (frame->yuv2rgb,
376 frame->width, 376 frame->width,
377 16, 377 16,
378 frame->width, 378 frame->width,
379 frame->width/2, 379 frame->width/2,
380 frame->output_width, 380 frame->output_width,
381 frame->stripe_height, 381 frame->stripe_height,
382 frame->bytes_per_line); 382 frame->bytes_per_line);
383 frame->yuv_stride = frame->bytes_per_line; 383 frame->yuv_stride = frame->bytes_per_line;
384 break; 384 break;
385 } 385 }
386 } 386 }
387 } 387 }
388 printf("after gui changed\n"); 388 printf("after gui changed\n");
389 /* 389 /*
390 * reset dest pointers 390 * reset dest pointers
391 */ 391 */
392 392
393 if (frame->data) { 393 if (frame->data) {
394 switch (flags) { 394 switch (flags) {
395 case VO_TOP_FIELD: 395 case VO_TOP_FIELD:
396 frame->rgb_dst = (uint8_t *)frame->data; 396 frame->rgb_dst = (uint8_t *)frame->data;
397 frame->stripe_inc = 2 * frame->stripe_height * frame->bytes_per_line; 397 frame->stripe_inc = 2 * frame->stripe_height * frame->bytes_per_line;
398 break; 398 break;
399 case VO_BOTTOM_FIELD: 399 case VO_BOTTOM_FIELD:
400 frame->rgb_dst = (uint8_t *)frame->data + frame->bytes_per_line ; 400 frame->rgb_dst = (uint8_t *)frame->data + frame->bytes_per_line ;
401 frame->stripe_inc = 2 * frame->stripe_height * frame->bytes_per_line; 401 frame->stripe_inc = 2 * frame->stripe_height * frame->bytes_per_line;
402 break; 402 break;
403 case VO_BOTH_FIELDS: 403 case VO_BOTH_FIELDS:
404 frame->rgb_dst = (uint8_t *)frame->data; 404 frame->rgb_dst = (uint8_t *)frame->data;
405 frame->stripe_inc = frame->stripe_height * frame->bytes_per_line; 405 frame->stripe_inc = frame->stripe_height * frame->bytes_per_line;
406 break; 406 break;
407 } 407 }
408 } 408 }
409 printf("done\n"); 409 printf("done\n");
410} 410}
411static void null_display_frame( vo_driver_t* self, vo_frame_t *frame_gen ){ 411static void null_display_frame( vo_driver_t* self, vo_frame_t *frame_gen ){
412 null_driver_t* this = (null_driver_t*) self; 412 null_driver_t* this = (null_driver_t*) self;
413 opie_frame_t* frame = (opie_frame_t*)frame_gen; 413 opie_frame_t* frame = (opie_frame_t*)frame_gen;
414 display_xine_frame_t display = this->frameDis; 414 display_xine_frame_t display = this->frameDis;
415 415
416 printf("display frame\n"); 416 printf("display frame\n");
417 // if( this->m_show_video ) { // return if not displaying 417 // if( this->m_show_video ) { // return if not displaying
418 printf("calling home aye\n" ); 418 printf("calling home aye\n" );
419 if( display != NULL ) { 419 if( display != NULL ) {
420 (*display)(this->caller, frame->data, 420 (*display)(this->caller, frame->data,
421 frame->output_width, frame->output_height, 421 frame->output_width, frame->output_height,
422 this->bytes_per_pixel ); 422 frame->bytes_per_line );
423 printf("display done hope you enyoyed the frame"); 423 printf("display done hope you enyoyed the frame");
424 } 424 }
425 // } 425 // }
426 426
427 frame->frame.displayed (&frame->frame); 427 frame->frame.displayed (&frame->frame);
428} 428}
429 429
430 430
431// blending related 431// blending related
432 432
433 433
434static void null_overlay_clut_yuv2rgb(null_driver_t *this, vo_overlay_t *overlay, 434static void null_overlay_clut_yuv2rgb(null_driver_t *this, vo_overlay_t *overlay,
435 opie_frame_t *frame) { 435 opie_frame_t *frame) {
436 int i; 436 int i;
437 clut_t* clut = (clut_t*) overlay->color; 437 clut_t* clut = (clut_t*) overlay->color;
438 if (!overlay->rgb_clut) { 438 if (!overlay->rgb_clut) {
439 for (i = 0; i < sizeof(overlay->color)/sizeof(overlay->color[0]); i++) { 439 for (i = 0; i < sizeof(overlay->color)/sizeof(overlay->color[0]); i++) {
440 *((uint32_t *)&clut[i]) = 440 *((uint32_t *)&clut[i]) =
441 frame->yuv2rgb->yuv2rgb_single_pixel_fun (frame->yuv2rgb, 441 frame->yuv2rgb->yuv2rgb_single_pixel_fun (frame->yuv2rgb,
442 clut[i].y, clut[i].cb, clut[i].cr); 442 clut[i].y, clut[i].cb, clut[i].cr);
443 } 443 }
444 overlay->rgb_clut++; 444 overlay->rgb_clut++;
445 } 445 }
446 if (!overlay->clip_rgb_clut) { 446 if (!overlay->clip_rgb_clut) {
447 clut = (clut_t*) overlay->clip_color; 447 clut = (clut_t*) overlay->clip_color;
448 for (i = 0; i < sizeof(overlay->color)/sizeof(overlay->color[0]); i++) { 448 for (i = 0; i < sizeof(overlay->color)/sizeof(overlay->color[0]); i++) {
449 *((uint32_t *)&clut[i]) = 449 *((uint32_t *)&clut[i]) =
450 frame->yuv2rgb->yuv2rgb_single_pixel_fun(frame->yuv2rgb, 450 frame->yuv2rgb->yuv2rgb_single_pixel_fun(frame->yuv2rgb,
451 clut[i].y, clut[i].cb, clut[i].cr); 451 clut[i].y, clut[i].cb, clut[i].cr);
452 } 452 }
453 overlay->clip_rgb_clut++; 453 overlay->clip_rgb_clut++;
454 } 454 }
455} 455}
456 456
457static void null_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen, vo_overlay_t *overlay) { 457static void null_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen, vo_overlay_t *overlay) {
458 null_driver_t *this = (null_driver_t *) this_gen; 458 null_driver_t *this = (null_driver_t *) this_gen;
459 opie_frame_t *frame = (opie_frame_t *) frame_gen; 459 opie_frame_t *frame = (opie_frame_t *) frame_gen;
460 460
461 printf("overlay blend\n"); 461 printf("overlay blend\n");
462 if(!this->m_show_video || frame->output_width == 0 || frame->output_height== 0) 462 if(!this->m_show_video || frame->output_width == 0 || frame->output_height== 0)
463 return; 463 return;
464 464
465 /* Alpha Blend here */ 465 /* Alpha Blend here */
466 if (overlay->rle) { 466 if (overlay->rle) {
467 if( !overlay->rgb_clut || !overlay->clip_rgb_clut) 467 if( !overlay->rgb_clut || !overlay->clip_rgb_clut)
468 null_overlay_clut_yuv2rgb(this,overlay,frame); 468 null_overlay_clut_yuv2rgb(this,overlay,frame);
469 469
470 switch(this->bpp) { 470 switch(this->bpp) {
471 case 16: 471 case 16:
472 blend_rgb16( (uint8_t *)frame->data, overlay, 472 blend_rgb16( (uint8_t *)frame->data, overlay,
473 frame->output_width, frame->output_height, 473 frame->output_width, frame->output_height,
474 frame->width, frame->height); 474 frame->width, frame->height);
475 break; 475 break;
476 case 24: 476 case 24:
477 blend_rgb24( (uint8_t *)frame->data, overlay, 477 blend_rgb24( (uint8_t *)frame->data, overlay,
478 frame->output_width, frame->output_height, 478 frame->output_width, frame->output_height,
479 frame->width, frame->height); 479 frame->width, frame->height);
480 break; 480 break;
481 case 32: 481 case 32:
482 blend_rgb32( (uint8_t *)frame->data, overlay, 482 blend_rgb32( (uint8_t *)frame->data, overlay,
483 frame->output_width, frame->output_height, 483 frame->output_width, frame->output_height,
484 frame->width, frame->height); 484 frame->width, frame->height);
485 break; 485 break;
486 default: 486 default:
487 /* It should never get here */ 487 /* It should never get here */
488 break; 488 break;
489 } 489 }
490 } 490 }
491} 491}
492 492
493 493
494static int null_get_property( vo_driver_t* self, 494static int null_get_property( vo_driver_t* self,
495 int property ){ 495 int property ){
496 printf("property get\n"); 496 printf("property get\n");
497 return 0; 497 return 0;
498} 498}
499static int null_set_property( vo_driver_t* self, 499static int null_set_property( vo_driver_t* self,
500 int property, 500 int property,
501 int value ){ 501 int value ){
502 printf("set property\n"); 502 printf("set property\n");
503 return value; 503 return value;
504} 504}
505static void null_get_property_min_max( vo_driver_t* self, 505static void null_get_property_min_max( vo_driver_t* self,
506 int property, int *min, 506 int property, int *min,
507 int *max ){ 507 int *max ){
508 printf("min max\n"); 508 printf("min max\n");
509 *max = 0; 509 *max = 0;
510 *min = 0; 510 *min = 0;
511} 511}
512static int null_gui_data_exchange( vo_driver_t* self, 512static int null_gui_data_exchange( vo_driver_t* self,
513 int data_type, 513 int data_type,
514 void *data ){ 514 void *data ){
515 return 0; 515 return 0;
516} 516}
517static void null_exit( vo_driver_t* self ){ 517static void null_exit( vo_driver_t* self ){
518 null_driver_t* this = (null_driver_t*)self; 518 null_driver_t* this = (null_driver_t*)self;