{"action":"created","issue":{"url":"https://api.github.com/repos/mpv-player/mpv/issues/2145","labels_url":"https://api.github.com/repos/mpv-player/mpv/issues/2145/labels{/name}","comments_url":"https://api.github.com/repos/mpv-player/mpv/issues/2145/comments","events_url":"https://api.github.com/repos/mpv-player/mpv/issues/2145/events","html_url":"https://github.com/mpv-player/mpv/issues/2145","id":95368724,"number":2145,"title":"Correcting color level mastering mastering mistakes.","user":{"login":"kevmitch","id":116549,"avatar_url":"https://avatars.githubusercontent.com/u/116549?v=3","gravatar_id":"","url":"https://api.github.com/users/kevmitch","html_url":"https://github.com/kevmitch","followers_url":"https://api.github.com/users/kevmitch/followers","following_url":"https://api.github.com/users/kevmitch/following{/other_user}","gists_url":"https://api.github.com/users/kevmitch/gists{/gist_id}","starred_url":"https://api.github.com/users/kevmitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevmitch/subscriptions","organizations_url":"https://api.github.com/users/kevmitch/orgs","repos_url":"https://api.github.com/users/kevmitch/repos","events_url":"https://api.github.com/users/kevmitch/events{/privacy}","received_events_url":"https://api.github.com/users/kevmitch/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mpv-player/mpv/labels/question","name":"question","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-16T07:24:09Z","updated_at":"2015-07-16T20:29:43Z","closed_at":null,"body":"I've rented a blu ray copy of Margin Call only to find that the colorlevels seem to be off as evidenced most obviously by the grey background of the end credits:\r\n\r\n![Margin Call screenshot](https://dl.dropboxusercontent.com/u/60598588/Margin_Call_t00.mkv.01%3A43%3A12.019.jpg)\r\n\r\nApparently this is a [known mastering error](http://www.avsforum.com/forum/150-blu-ray-software/1496542-blu-rays-incorrectly-encoded-rgb-pc-levels.html).\r\n\r\nIndeed, if I take a sample of ```--vo=image:format=pgmyuv``` from throughout the film, and plot the histogram, I get the following:\r\n\r\n![Margin Call Histogram](https://dl.dropboxusercontent.com/u/60598588/margin_call.png)\r\n\r\nNote how the frequency of the luma drops off sharply below 29 and above 209 indicating that the image has been **doubly limited**.\r\n\r\nCompare to It Follows, which looks correct:\r\n\r\n![It Follows Histogram](https://dl.dropboxusercontent.com/u/60598588/it_follows.png)\r\n\r\nSo the question is, is there a way to correct for this on playback? I've tried messing around with the various permutations of ```--vf=format=colorlevels=x:outputlevel=y```, but they either have no effect, or make make the problem worse by further squeezing the range.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mpv-player/mpv/issues/comments/122080315","html_url":"https://github.com/mpv-player/mpv/issues/2145#issuecomment-122080315","issue_url":"https://api.github.com/repos/mpv-player/mpv/issues/2145","id":122080315,"user":{"login":"wm4","id":1387750,"avatar_url":"https://avatars.githubusercontent.com/u/1387750?v=3","gravatar_id":"","url":"https://api.github.com/users/wm4","html_url":"https://github.com/wm4","followers_url":"https://api.github.com/users/wm4/followers","following_url":"https://api.github.com/users/wm4/following{/other_user}","gists_url":"https://api.github.com/users/wm4/gists{/gist_id}","starred_url":"https://api.github.com/users/wm4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wm4/subscriptions","organizations_url":"https://api.github.com/users/wm4/orgs","repos_url":"https://api.github.com/users/wm4/repos","events_url":"https://api.github.com/users/wm4/events{/privacy}","received_events_url":"https://api.github.com/users/wm4/received_events","type":"User","site_admin":false},"created_at":"2015-07-16T20:29:43Z","updated_at":"2015-07-16T20:29:43Z","body":"I think libavfilter's vf_lut can apply expressions on each color, and accelerates it with a LUT."}}