{"action":"created","issue":{"url":"https://api.github.com/repos/mpv-player/mpv/issues/1503","labels_url":"https://api.github.com/repos/mpv-player/mpv/issues/1503/labels{/name}","comments_url":"https://api.github.com/repos/mpv-player/mpv/issues/1503/comments","events_url":"https://api.github.com/repos/mpv-player/mpv/issues/1503/events","html_url":"https://github.com/mpv-player/mpv/pull/1503","id":55233981,"number":1503,"title":"vdpau: simplify screenshot code for vdpau","user":{"login":"xylosper","id":4363181,"avatar_url":"https://avatars.githubusercontent.com/u/4363181?v=3","gravatar_id":"","url":"https://api.github.com/users/xylosper","html_url":"https://github.com/xylosper","followers_url":"https://api.github.com/users/xylosper/followers","following_url":"https://api.github.com/users/xylosper/following{/other_user}","gists_url":"https://api.github.com/users/xylosper/gists{/gist_id}","starred_url":"https://api.github.com/users/xylosper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xylosper/subscriptions","organizations_url":"https://api.github.com/users/xylosper/orgs","repos_url":"https://api.github.com/users/xylosper/repos","events_url":"https://api.github.com/users/xylosper/events{/privacy}","received_events_url":"https://api.github.com/users/xylosper/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-01-23T01:31:54Z","updated_at":"2015-01-23T17:44:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mpv-player/mpv/pulls/1503","html_url":"https://github.com/mpv-player/mpv/pull/1503","diff_url":"https://github.com/mpv-player/mpv/pull/1503.diff","patch_url":"https://github.com/mpv-player/mpv/pull/1503.patch"},"body":"Instead of vdpau mixer, download YCbCr data directly.\r\n\r\nOne question: does `video_surface_get_bits_y_cb_cr()` convert data to given VdpYCbCrFormat if underlying format doesn't match?\r\n\r\nFor now, this code always requests VDP_YCBCR_FORMAT_YV12. If automatic conversion is not gauranteed, it's needed to add querying code to figure out what format supported using `VdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities()`.\r\nIn that case, it could be not simplified anymore but I think it's still better code than using mixer because it does not require additional fields in vdpau context structure."},"comment":{"url":"https://api.github.com/repos/mpv-player/mpv/issues/comments/71232486","html_url":"https://github.com/mpv-player/mpv/pull/1503#issuecomment-71232486","issue_url":"https://api.github.com/repos/mpv-player/mpv/issues/1503","id":71232486,"user":{"login":"xylosper","id":4363181,"avatar_url":"https://avatars.githubusercontent.com/u/4363181?v=3","gravatar_id":"","url":"https://api.github.com/users/xylosper","html_url":"https://github.com/xylosper","followers_url":"https://api.github.com/users/xylosper/followers","following_url":"https://api.github.com/users/xylosper/following{/other_user}","gists_url":"https://api.github.com/users/xylosper/gists{/gist_id}","starred_url":"https://api.github.com/users/xylosper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xylosper/subscriptions","organizations_url":"https://api.github.com/users/xylosper/orgs","repos_url":"https://api.github.com/users/xylosper/repos","events_url":"https://api.github.com/users/xylosper/events{/privacy}","received_events_url":"https://api.github.com/users/xylosper/received_events","type":"User","site_admin":false},"created_at":"2015-01-23T17:44:10Z","updated_at":"2015-01-23T17:44:10Z","body":"Well, it will work with window screenshot still, right? Maybe this is not enough, I can think two solution:\r\n\r\n* If other effects by vdpaupp can be ignored except deinterlacing, simple bob can be done in screenshot.c\r\n* Create and destroy mixer whenver downloading image\r\n\r\nEither way,  performance won't be an issue because screenshot is slow anyway. The other option is not to apply this change because it does work perfectly as expected. It's totally OK to close this pull request if other options are not good enough."}}