From 8f0f73e5917fd30dbd359ad24b037b66e05fa11a Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 30 Mar 2015 23:56:17 +0200 Subject: video/out: remove unused colorspace reporting Rarely used and essentially useless. The only VO for which this was implemented correctly and for which this did anything was vo_xv, but you shouldn't use vo_xv anyway (plus it support BT.601 only, plus a vendor specific extension for BT.709, whose presence this function essentially reported - use xvinfo instead). --- video/out/vo.h | 5 ----- video/out/vo_direct3d.c | 9 --------- video/out/vo_lavc.c | 19 +------------------ video/out/vo_opengl.c | 5 ----- video/out/vo_vaapi.c | 6 ------ video/out/vo_vdpau.c | 9 --------- video/out/vo_xv.c | 6 ------ 7 files changed, 1 insertion(+), 58 deletions(-) diff --git a/video/out/vo.h b/video/out/vo.h index d987bf2855..266765b071 100644 --- a/video/out/vo.h +++ b/video/out/vo.h @@ -94,11 +94,6 @@ enum mp_voctrl { // names for displays the window is on VOCTRL_GET_DISPLAY_NAMES, - // The VO is supposed to set "known" fields, and leave the others - // untouched or set to 0. - // imgfmt/w/h/d_w/d_h can be omitted for convenience. - VOCTRL_GET_COLORSPACE, // struct mp_image_params* - // Retrieve window contents. (Normal screenshots use vo_get_current_frame().) VOCTRL_SCREENSHOT_WIN, // struct mp_image** diff --git a/video/out/vo_direct3d.c b/video/out/vo_direct3d.c index 8f9b10260d..ac72efe2f8 100644 --- a/video/out/vo_direct3d.c +++ b/video/out/vo_direct3d.c @@ -1263,15 +1263,6 @@ static int control(struct vo *vo, uint32_t request, void *data) case VOCTRL_REDRAW_FRAME: d3d_draw_frame(priv); return VO_TRUE; - case VOCTRL_GET_COLORSPACE: { - struct mp_image_params *p = data; - if (priv->use_shaders) { // no idea what the heck D3D YUV uses - p->colorspace = priv->params.colorspace; - p->colorlevels = priv->params.colorlevels; - p->outputlevels = priv->params.outputlevels; - } - return VO_TRUE; - } case VOCTRL_SET_EQUALIZER: { if (!priv->use_shaders) break; diff --git a/video/out/vo_lavc.c b/video/out/vo_lavc.c index 032f58c0f1..40dcb7fd79 100644 --- a/video/out/vo_lavc.c +++ b/video/out/vo_lavc.c @@ -54,8 +54,6 @@ struct priv { AVRational worst_time_base; int worst_time_base_is_stream; - struct mp_image_params real_colorspace; - bool shutdown; }; @@ -167,11 +165,6 @@ static int reconfig(struct vo *vo, struct mp_image_params *params, int flags) if (encode_lavc_open_codec(vo->encode_lavc_ctx, vc->stream) < 0) goto error; - vc->real_colorspace.colorspace = - encode_lavc_get_csp(vo->encode_lavc_ctx, vc->stream); - vc->real_colorspace.colorlevels = - encode_lavc_get_csp_levels(vo->encode_lavc_ctx, vc->stream); - vc->buffer_size = 6 * width * height + 200; if (vc->buffer_size < FF_MIN_BUFFER_SIZE) vc->buffer_size = FF_MIN_BUFFER_SIZE; @@ -516,17 +509,7 @@ static void flip_page(struct vo *vo) static int control(struct vo *vo, uint32_t request, void *data) { - struct priv *vc = vo->priv; - int r = VO_NOTIMPL; - pthread_mutex_lock(&vo->encode_lavc_ctx->lock); - switch (request) { - case VOCTRL_GET_COLORSPACE: - *(struct mp_image_params *)data = vc->real_colorspace; - r = 1; - break; - } - pthread_mutex_unlock(&vo->encode_lavc_ctx->lock); - return r; + return VO_NOTIMPL; } const struct vo_driver video_out_lavc = { diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c index 9cf58286e2..589ae7b0db 100644 --- a/video/out/vo_opengl.c +++ b/video/out/vo_opengl.c @@ -366,11 +366,6 @@ static int control(struct vo *vo, uint32_t request, void *data) vo->want_redraw = true; return r ? VO_TRUE : VO_NOTIMPL; } - case VOCTRL_GET_COLORSPACE: - mpgl_lock(p->glctx); - gl_video_get_colorspace(p->renderer, data); - mpgl_unlock(p->glctx); - return VO_TRUE; case VOCTRL_SCREENSHOT_WIN: mpgl_lock(p->glctx); *(struct mp_image **)data = glGetWindowScreenshot(p->gl); diff --git a/video/out/vo_vaapi.c b/video/out/vo_vaapi.c index 6422148a0f..25dc4e9584 100644 --- a/video/out/vo_vaapi.c +++ b/video/out/vo_vaapi.c @@ -540,12 +540,6 @@ static int control(struct vo *vo, uint32_t request, void *data) *arg = &p->hwdec_info; return true; } - case VOCTRL_GET_COLORSPACE: { - struct mp_image_params *params = data; - if (va_get_colorspace_flag(p->image_params.colorspace)) - params->colorspace = p->image_params.colorspace; - return true; - } case VOCTRL_SET_EQUALIZER: { struct voctrl_set_equalizer_args *eq = data; return set_equalizer(p, eq->name, eq->value); diff --git a/video/out/vo_vdpau.c b/video/out/vo_vdpau.c index 3f5776ad36..c0deea8178 100644 --- a/video/out/vo_vdpau.c +++ b/video/out/vo_vdpau.c @@ -1014,15 +1014,6 @@ static int control(struct vo *vo, uint32_t request, void *data) struct voctrl_get_equalizer_args *args = data; return get_equalizer(vo, args->name, args->valueptr); } - case VOCTRL_GET_COLORSPACE: { - struct mp_image_params *params = data; - if (vo->params && !vc->rgb_mode) { - params->colorspace = vo->params->colorspace; - params->colorlevels = vo->params->colorlevels; - params->outputlevels = vo->params->outputlevels; - } - return true; - } case VOCTRL_REDRAW_FRAME: if (status_ok(vo)) video_to_output_surface(vo); diff --git a/video/out/vo_xv.c b/video/out/vo_xv.c index 22090d11c8..3fb9d2ebaf 100644 --- a/video/out/vo_xv.c +++ b/video/out/vo_xv.c @@ -821,12 +821,6 @@ static int control(struct vo *vo, uint32_t request, void *data) struct voctrl_get_equalizer_args *args = data; return xv_get_eq(vo, ctx->xv_port, args->name, args->valueptr); } - case VOCTRL_GET_COLORSPACE: { - struct mp_image_params *params = data; - read_xv_csp(vo); - params->colorspace = ctx->cached_csp; - return true; - } case VOCTRL_REDRAW_FRAME: draw_image(vo, ctx->original_image); return true; -- cgit v1.2.3