From f27a9aaa17eaced765718d096d0b3284c3f15b1f Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 31 Oct 2017 15:29:13 +0100 Subject: vd_lavc: remove more dead legacy code All of this was dead code and completely unused. get_buffer2_hwdec() is the biggest chunk. One unfortunate thing about it is that, while it was active, it could perform a software fallback much faster, because it didn't have to wait until a full frame is decoded (it actually decoded a full frame, but the current code has to decode many more frames due to the codec delay, because the current code waits until the API returns a decoded frame.) We should probably restore the latter, although since it's an optional optimization, and the current behavior doesn't change with the removal of this code, don't actually do anything about it. --- video/decode/lavc.h | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'video/decode/lavc.h') diff --git a/video/decode/lavc.h b/video/decode/lavc.h index e4db1f5f79..cf5485d3b6 100644 --- a/video/decode/lavc.h +++ b/video/decode/lavc.h @@ -99,16 +99,11 @@ struct vd_lavc_hwdec { // efficiency by not blocking on the hardware pipeline by reading back // immediately after decoding. int delay_queue; - // If true, AVCodecContext will destroy the underlying decoder. - bool volatile_context; int (*probe)(struct lavc_ctx *ctx, struct vd_lavc_hwdec *hwdec, const char *codec); int (*init)(struct lavc_ctx *ctx); int (*init_decoder)(struct lavc_ctx *ctx, int w, int h); void (*uninit)(struct lavc_ctx *ctx); - // Note: if init_decoder is set, this will always use the values from the - // last successful init_decoder call. Otherwise, it's up to you. - struct mp_image *(*allocate_image)(struct lavc_ctx *ctx, int w, int h); // Process the image returned by the libavcodec decoder. struct mp_image *(*process_image)(struct lavc_ctx *ctx, struct mp_image *img); // For copy hwdecs. If probing is true, don't log errors if unavailable. @@ -126,12 +121,6 @@ struct vd_lavc_hwdec { // If set, AVCodecContext.hw_frames_ctx will be initialized in get_format, // and pixfmt_map must be non-NULL. bool set_hwframes; - // Array of pixfmt pairs. The first pixfmt is the AVCodecContext.sw_pix_fmt, - // the second the required AVHWFramesContext.sw_format. - const enum AVPixelFormat (*pixfmt_map)[2]; - // The generic hwaccel has a fixed pool size. Enough surfaces need to be - // preallocated before decoding begins. If false, pool size is left to 0. - bool static_pool; }; enum { -- cgit v1.2.3