diff options
author | wm4 <wm4@nowhere> | 2012-11-04 17:17:11 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-01-13 17:39:31 +0100 |
commit | cfa1f9e082f3da83adb5161be140e477b38bc5c7 (patch) | |
tree | 3734904c1328ccc4967f34f20b3cbd405c54030c /video/filter | |
parent | 58d3469fd6e983887a64afc51e0611504b749b3e (diff) | |
download | mpv-cfa1f9e082f3da83adb5161be140e477b38bc5c7.tar.bz2 mpv-cfa1f9e082f3da83adb5161be140e477b38bc5c7.tar.xz |
video: make vdpau hardware decoding not use slices code path
For some reason, libavcodec abuses the slices rendering code path for
hardware decoding: in that case, the only purpose of the draw callback
is to pass a vdpau video surface object to video output. (It is unclear
to me why this had to use the slices code, instead of just returning an
AVFrame with the required vdpau state.)
Make this code separate within mpv, so that the internal slices code
path is not used for hardware decoding. Pass the vdpau state with
VOCTRL_HWDEC_DECODER_RENDER instead.
Remove the mencoder specific VOCTRLs.
Diffstat (limited to 'video/filter')
-rw-r--r-- | video/filter/vf.h | 4 | ||||
-rw-r--r-- | video/filter/vf_vo.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/video/filter/vf.h b/video/filter/vf.h index 8f20b20466..f470bdc3b9 100644 --- a/video/filter/vf.h +++ b/video/filter/vf.h @@ -100,9 +100,7 @@ struct vf_ctrl_screenshot { #define VFCTRL_SET_PP_LEVEL 5 // set postprocessing level #define VFCTRL_SET_EQUALIZER 6 // set color options (brightness,contrast etc) #define VFCTRL_GET_EQUALIZER 8 // get color options (brightness,contrast etc) -#define VFCTRL_DUPLICATE_FRAME 11 // For encoding - encode zero-change frame -#define VFCTRL_SKIP_NEXT_FRAME 12 // For encoding - drop the next frame that passes thru -#define VFCTRL_FLUSH_FRAMES 13 // For encoding - flush delayed frames +#define VFCTRL_HWDEC_DECODER_RENDER 9 // vdpau hw decoding #define VFCTRL_SCREENSHOT 14 // Take screenshot, arg is vf_ctrl_screenshot #define VFCTRL_INIT_OSD 15 // Filter OSD renderer present? #define VFCTRL_SET_DEINTERLACE 18 // Set deinterlacing status diff --git a/video/filter/vf_vo.c b/video/filter/vf_vo.c index f1931126f3..8fe30bf415 100644 --- a/video/filter/vf_vo.c +++ b/video/filter/vf_vo.c @@ -107,6 +107,8 @@ static int control(struct vf_instance *vf, int request, void *data) }; return vo_control(video_out, VOCTRL_GET_EQUALIZER, ¶m) == VO_TRUE; } + case VFCTRL_HWDEC_DECODER_RENDER: + return vo_control(video_out, VOCTRL_HWDEC_DECODER_RENDER, data); } return CONTROL_UNKNOWN; } |