From 78f834b5f5a4e7eb370296da304e63d4a89a5261 Mon Sep 17 00:00:00 2001 From: Andreas Auras Date: Wed, 2 Mar 2011 14:51:09 +0100 Subject: Removed ugly code handling of intercepted frames. Intercepted frames should never pass function vdpau_update_frame_format. --HG-- extra : rebase_source : d1d05b67865eb6cc79225f96159184852f239262 --- src/video_out/video_out_vdpau.c | 41 +---------------------------------------- src/xine-engine/accel_vdpau.h | 3 --- 2 files changed, 1 insertion(+), 43 deletions(-) diff --git a/src/video_out/video_out_vdpau.c b/src/video_out/video_out_vdpau.c index 45fa0c7e2..0c47417c7 100644 --- a/src/video_out/video_out_vdpau.c +++ b/src/video_out/video_out_vdpau.c @@ -1034,7 +1034,7 @@ static void vdpau_update_frame_format (vo_driver_t *this_gen, vo_frame_t *frame_ uint32_t width, uint32_t height, double ratio, int format, int flags) { vdpau_driver_t *this = (vdpau_driver_t *) this_gen; - vdpau_frame_t *frame = VDPAU_FRAME(frame_gen); + vdpau_frame_t *frame = (vdpau_frame_t *) frame_gen; uint32_t requested_width = width; uint32_t requested_height = height; @@ -1045,15 +1045,6 @@ static void vdpau_update_frame_format (vo_driver_t *this_gen, vo_frame_t *frame_ VdpChromaType chroma = (flags & VO_CHROMA_422) ? VDP_CHROMA_TYPE_422 : VDP_CHROMA_TYPE_420; - vo_frame_t orig_frame_content; - if (format == XINE_IMGFMT_VDPAU) { - if (frame_gen != &frame->vo_frame) { - /* this is an intercepted frame, so we need to detect and propagate any - * changes on the original vo_frame to all the intercepted frames */ - xine_fast_memcpy(&orig_frame_content, &frame->vo_frame, sizeof (vo_frame_t)); - } - } - /* adjust width and height to meet xine and VDPAU constraints */ width = (width + ((flags & VO_CHROMA_422) ? 3 : 15)) & ~((flags & VO_CHROMA_422) ? 3 : 15); /* xine constraint */ height = (height + 3) & ~3; /* VDPAU constraint */ @@ -1169,36 +1160,6 @@ static void vdpau_update_frame_format (vo_driver_t *this_gen, vo_frame_t *frame_ frame->vdpau_accel_data.color_standard = VDP_COLOR_STANDARD_ITUR_BT_601; frame->ratio = ratio; frame->vo_frame.future_frame = NULL; - - if (format == XINE_IMGFMT_VDPAU) { - if (frame_gen != &frame->vo_frame) { - /* this is an intercepted frame, so we need to detect and propagate any - * changes on the original vo_frame to all the intercepted frames */ - unsigned char *p0 = (unsigned char *)&orig_frame_content; - unsigned char *p1 = (unsigned char *)&frame->vo_frame; - int i; - for (i = 0; i < sizeof (vo_frame_t); i++) { - if (*p0 != *p1) { - /* propagate the change */ - vo_frame_t *f = frame_gen; - while (f->next) { - /* serveral restrictions apply when intercepting VDPAU frames. So let's check - * the intercepted frames before modifing them and fail otherwise. */ - unsigned char *p = (unsigned char *)f + i; - if (*p != *p0) { - xprintf(this->xine, XINE_VERBOSITY_DEBUG, "vdpau_update_frame_format: a post plugin violates the restrictions on intercepting VDPAU frames\n"); - _x_abort(); - } - - *p = *p1; - f = f->next; - } - } - p0++; - p1++; - } - } - } } diff --git a/src/xine-engine/accel_vdpau.h b/src/xine-engine/accel_vdpau.h index 7ddc5e21f..6f9590114 100644 --- a/src/xine-engine/accel_vdpau.h +++ b/src/xine-engine/accel_vdpau.h @@ -57,9 +57,6 @@ typedef struct { } vdpau_accel_t; -#define VDPAU_DATA(frame_gen) ((frame_gen) ? (vdpau_accel_t *)(frame_gen)->accel_data : (vdpau_accel_t *)0) -#define VDPAU_FRAME(frame_gen) ((frame_gen) ? (vdpau_accel_t *)VDPAU_DATA(frame_gen)->vo_frame : (vdpau_frame_t *)0) - #ifdef __cplusplus } #endif -- cgit v1.2.3