summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/nullvideo.c2
-rw-r--r--noncore/multimedia/opieplayer2/yuv2rgb.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/nullvideo.c b/noncore/multimedia/opieplayer2/nullvideo.c
index a49f9d3..095f206 100644
--- a/noncore/multimedia/opieplayer2/nullvideo.c
+++ b/noncore/multimedia/opieplayer2/nullvideo.c
@@ -71,96 +71,98 @@ struct null_driver_s {
int yuv2rgb_mode;
int yuv2rgb_swap;
int yuv2rgb_gamma;
uint8_t *yuv2rgb_cmap;
yuv2rgb_factory_t *yuv2rgb_factory;
vo_overlay_t *overlay;
vo_scale_t sc;
int gui_width;
int gui_height;
int gui_changed;
double display_ratio;
void* caller;
display_xine_frame_t frameDis;
};
typedef struct opie_frame_s opie_frame_t;
struct opie_frame_s {
vo_frame_t frame;
int format;
int flags;
vo_scale_t sc;
uint8_t *chunk[3];
uint8_t *data; /* rgb */
int bytes_per_line;
yuv2rgb_t *yuv2rgb;
uint8_t *rgb_dst;
int yuv_stride;
int stripe_height, stripe_inc;
null_driver_t *output;
};
static uint32_t null_get_capabilities( vo_driver_t *self ){
null_driver_t* this = (null_driver_t*)self;
return this->m_capabilities;
}
static void null_frame_copy (vo_frame_t *vo_img, uint8_t **src) {
opie_frame_t *frame = (opie_frame_t *) vo_img ;
+ vo_img->copy_called = 1;
+
if (!frame->output->m_show_video) {
/* printf("nullvideo: no video\n"); */
return;
}
if (frame->format == XINE_IMGFMT_YV12) {
frame->yuv2rgb->yuv2rgb_fun (frame->yuv2rgb, frame->rgb_dst,
src[0], src[1], src[2]);
} else {
frame->yuv2rgb->yuy22rgb_fun (frame->yuv2rgb, frame->rgb_dst,
src[0]);
}
frame->rgb_dst += frame->stripe_inc;
}
static void null_frame_field (vo_frame_t *vo_img, int which_field) {
opie_frame_t *frame = (opie_frame_t *) vo_img ;
switch (which_field) {
case VO_TOP_FIELD:
frame->rgb_dst = (uint8_t *)frame->data;
frame->stripe_inc = 2*frame->stripe_height * frame->bytes_per_line;
break;
case VO_BOTTOM_FIELD:
frame->rgb_dst = (uint8_t *)frame->data + frame->bytes_per_line ;
frame->stripe_inc = 2*frame->stripe_height * frame->bytes_per_line;
break;
case VO_BOTH_FIELDS:
frame->rgb_dst = (uint8_t *)frame->data;
break;
}
}
/* take care of the frame*/
static void null_frame_dispose( vo_frame_t* vo_img){
opie_frame_t* frame = (opie_frame_t*)vo_img;
if (frame->data)
free( frame->data );
free (frame);
}
/* end take care of frames*/
diff --git a/noncore/multimedia/opieplayer2/yuv2rgb.c b/noncore/multimedia/opieplayer2/yuv2rgb.c
index e8e86e6..8e34052 100644
--- a/noncore/multimedia/opieplayer2/yuv2rgb.c
+++ b/noncore/multimedia/opieplayer2/yuv2rgb.c
@@ -1162,101 +1162,101 @@ static void scale_line_1_2 (uint8_t *source, uint8_t *dest,
if ((width += 4) <= 0) goto done;
*dest++ = source[0];
if (--width <= 0) goto done;
*dest++ = (source[0] + source[1]) >> 1;
if (--width <= 0) goto done;
*dest++ = source[1];
done:
xine_profiler_stop_count(prof_scale_line);
}
/*
* Scale line with no horizontal scaling. For NTSC mpeg2 dvd input in
* 4:3 output format (720x480 -> 720x540)
*/
static void scale_line_1_1 (uint8_t *source, uint8_t *dest,
int width, int step) {
xine_profiler_start_count(prof_scale_line);
xine_fast_memcpy(dest, source, width);
xine_profiler_stop_count(prof_scale_line);
}
static scale_line_func_t find_scale_line_func(int step) {
static struct {
int src_step;
int dest_step;
scale_line_func_t func;
char *desc;
} scale_line[] = {
{ 15, 16, scale_line_15_16, "dvd 4:3(pal)" },
{ 45, 64, scale_line_45_64, "dvd 16:9(pal), fullscreen(1024x768)" },
{ 9, 16, scale_line_9_16, "dvd fullscreen(1280x1024)" },
{ 45, 53, scale_line_45_53, "dvd 16:9(ntsc)" },
{ 11, 12, scale_line_11_12, "vcd 4:3(pal)" },
{ 11, 24, scale_line_11_24, "vcd 4:3(pal) 2*zoom" },
{ 5, 8, scale_line_5_8, "svcd 4:3(pal)" },
{ 3, 4, scale_line_3_4, "svcd 4:3(ntsc)" },
{ 1, 2, scale_line_1_2, "2*zoom" },
{ 1, 1, scale_line_1_1, "non-scaled" },
};
int i;
for (i = 0; i < sizeof(scale_line)/sizeof(scale_line[0]); i++) {
if (step == scale_line[i].src_step*32768/scale_line[i].dest_step) {
- printf("yuv2rgb: using %s optimized scale_line\n", scale_line[i].desc);
+ //printf("yuv2rgb: using %s optimized scale_line\n", scale_line[i].desc);
return scale_line[i].func;
}
}
- printf("yuv2rgb: using generic scale_line with interpolation\n");
+ //printf("yuv2rgb: using generic scale_line with interpolation\n");
return scale_line_gen;
}
static void scale_line_2 (uint8_t *source, uint8_t *dest,
int width, int step) {
int p1;
int p2;
int dx;
p1 = *source; source+=2;
p2 = *source; source+=2;
dx = 0;
while (width) {
*dest = (p1 * (32768 - dx) + p2 * dx) / 32768;
dx += step;
while (dx > 32768) {
dx -= 32768;
p1 = p2;
p2 = *source;
source+=2;
}
dest ++;
width --;
}
}
static void scale_line_4 (uint8_t *source, uint8_t *dest,
int width, int step) {
int p1;
int p2;
int dx;
p1 = *source; source+=4;
p2 = *source; source+=4;
dx = 0;
while (width) {
*dest = (p1 * (32768 - dx) + p2 * dx) / 32768;
dx += step;
while (dx > 32768) {