{"comment":{"url":"https://api.github.com/repos/videolan/vlc/comments/17430659","html_url":"https://github.com/videolan/vlc/commit/e83a49c0621f71960357467391cec973e25fe206#commitcomment-17430659","id":17430659,"user":{"login":"adishavit","id":1814800,"avatar_url":"https://avatars.githubusercontent.com/u/1814800?v=3","gravatar_id":"","url":"https://api.github.com/users/adishavit","html_url":"https://github.com/adishavit","followers_url":"https://api.github.com/users/adishavit/followers","following_url":"https://api.github.com/users/adishavit/following{/other_user}","gists_url":"https://api.github.com/users/adishavit/gists{/gist_id}","starred_url":"https://api.github.com/users/adishavit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adishavit/subscriptions","organizations_url":"https://api.github.com/users/adishavit/orgs","repos_url":"https://api.github.com/users/adishavit/repos","events_url":"https://api.github.com/users/adishavit/events{/privacy}","received_events_url":"https://api.github.com/users/adishavit/received_events","type":"User","site_admin":false},"position":191,"line":191,"path":"modules/video_filter/colorthres.c","commit_id":"e83a49c0621f71960357467391cec973e25fe206","created_at":"2016-05-11T09:05:34Z","updated_at":"2016-05-11T09:05:34Z","body":"Why subtract 128 from the u,v values here?  \r\n[BGR-to-YUV in `int`s says](https://en.wikipedia.org/wiki/YUV#Studio_swing_for_BT.601) that to avoid negative you need to *add* 128. In this case this offset is not needed so no addition. But why do the subtraction here?\r\nSubtraction here seems to bias the values towards the negative side.\r\n\r\nThe subtraction is important when the UV values are already in offsetted as in the input frame - *then* (line 249) you actually need it to recenter the values around 0."}}