{"action":"created","comment":{"url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments/63652756","id":63652756,"diff_hunk":"@@ -1012,6 +1012,30 @@ union UPE_Copy\n \t}\n };\n \n+union CopyFilterCoefficients\n+{\n+\tu64 Hex;\n+\n+\tBitField< 0, 6, u64> a;\n+\tBitField< 6, 6, u64> b;\n+\tBitField<12, 6, u64> c;\n+\tBitField<18, 6, u64> d;\n+\tBitField<32, 6, u64> e;\n+\tBitField<38, 6, u64> f;\n+\tBitField<44, 6, u64> g;\n+\n+\tvoid getCoefficients(u8 *filterCoefficients)","path":"Source/Core/VideoCommon/BPMemory.h","position":16,"original_position":16,"commit_id":"4ebed592ad0fa1e339fd756ee1ad0eb870b4c5df","original_commit_id":"4ebed592ad0fa1e339fd756ee1ad0eb870b4c5df","user":{"login":"degasus","id":2787141,"avatar_url":"https://avatars.githubusercontent.com/u/2787141?v=3","gravatar_id":"","url":"https://api.github.com/users/degasus","html_url":"https://github.com/degasus","followers_url":"https://api.github.com/users/degasus/followers","following_url":"https://api.github.com/users/degasus/following{/other_user}","gists_url":"https://api.github.com/users/degasus/gists{/gist_id}","starred_url":"https://api.github.com/users/degasus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/degasus/subscriptions","organizations_url":"https://api.github.com/users/degasus/orgs","repos_url":"https://api.github.com/users/degasus/repos","events_url":"https://api.github.com/users/degasus/events{/privacy}","received_events_url":"https://api.github.com/users/degasus/received_events","type":"User","site_admin":false},"body":"What do you think about a pointer to u8[7]?","created_at":"2016-05-18T06:42:55Z","updated_at":"2016-05-18T06:42:55Z","html_url":"https://github.com/dolphin-emu/dolphin/pull/3845#discussion_r63652756","pull_request_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3845","_links":{"self":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments/63652756"},"html":{"href":"https://github.com/dolphin-emu/dolphin/pull/3845#discussion_r63652756"},"pull_request":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3845"}}},"pull_request":{"url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3845","id":70430464,"html_url":"https://github.com/dolphin-emu/dolphin/pull/3845","diff_url":"https://github.com/dolphin-emu/dolphin/pull/3845.diff","patch_url":"https://github.com/dolphin-emu/dolphin/pull/3845.patch","issue_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/3845","number":3845,"state":"open","locked":false,"title":"VideoSoftware: Implement xfb copy filter (Deflickering/Brightness)","user":{"login":"phire","id":138484,"avatar_url":"https://avatars.githubusercontent.com/u/138484?v=3","gravatar_id":"","url":"https://api.github.com/users/phire","html_url":"https://github.com/phire","followers_url":"https://api.github.com/users/phire/followers","following_url":"https://api.github.com/users/phire/following{/other_user}","gists_url":"https://api.github.com/users/phire/gists{/gist_id}","starred_url":"https://api.github.com/users/phire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phire/subscriptions","organizations_url":"https://api.github.com/users/phire/orgs","repos_url":"https://api.github.com/users/phire/repos","events_url":"https://api.github.com/users/phire/events{/privacy}","received_events_url":"https://api.github.com/users/phire/received_events","type":"User","site_admin":false},"body":"The Copy filter does 3 things.\r\n\r\n**1)** Resolve the Multisampled framebuffer. Games can specify 7 coefficients, the 3 samples from the current pixel, and two samples from the pixels above and below. \r\nSince dolphin hasn't implemented Multisampling, even in video software, I haven't implemented this fully.\r\n\r\nWhen games aren't using the multisampling mode, the 3 middle coefficients all point at the current pixel, while the upper/lower coefficients also point at a single upper or lower pixel.\r\n\r\n**2)** Deflicker filter. The game does a vertical blur across 3 lines, blending the odd and even fields together which minimises the flickering effect inherent to 480i consoles on interlaced TVs.\r\nThis is why 99.9% of games render all 480 lines each frame even when rendering at 60fps.\r\n\r\nThe filter is counter-productive for progressive displays, which is why dolphin hasn't implemented it before now, though it does blur away the dither pattern. \r\n\r\nWhen we implement this in the hardware backends, we can add an enhancement which points all 7 coefficients at the middle pixel, forcing the deflicker filter off.\r\n\r\n**3)** Brightness filter. You are meant to choose coefficients that add up to 64. But some games cleverly break this rule to create a brightness filter. Resident Evil 4 uses this to implement a global brightness slider option, while other (Rogue Squadron 3?, mario galaxy?) games use it to implement a fade to black effect.\r\n\r\nIf it wasn't for **3**, there would be little reason to implement this, except so users of melee/brawl could see the deflicker on/off option in action. \r\n\r\n#### Note:\r\n\r\n@degasus broke the bypass xfb option in video software. So to actually see this in action, add these lines to `config/gfx_software.ini`\r\n\r\n    [Settings]\r\n    UseXFB = True\r\n    UseRealXFB = True\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"35\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/dolphin-emu/dolphin/3845)\n<!-- Reviewable:end -->\n","created_at":"2016-05-17T21:06:39Z","updated_at":"2016-05-18T06:42:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"353a0921c19a7050c660a1dd147bee165f819c1e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3845/commits","review_comments_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3845/comments","review_comment_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/3845/comments","statuses_url":"https://api.github.com/repos/dolphin-emu/dolphin/statuses/4ebed592ad0fa1e339fd756ee1ad0eb870b4c5df","head":{"label":"phire:VideoSW_xfbCopyFilter","ref":"VideoSW_xfbCopyFilter","sha":"4ebed592ad0fa1e339fd756ee1ad0eb870b4c5df","user":{"login":"phire","id":138484,"avatar_url":"https://avatars.githubusercontent.com/u/138484?v=3","gravatar_id":"","url":"https://api.github.com/users/phire","html_url":"https://github.com/phire","followers_url":"https://api.github.com/users/phire/followers","following_url":"https://api.github.com/users/phire/following{/other_user}","gists_url":"https://api.github.com/users/phire/gists{/gist_id}","starred_url":"https://api.github.com/users/phire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phire/subscriptions","organizations_url":"https://api.github.com/users/phire/orgs","repos_url":"https://api.github.com/users/phire/repos","events_url":"https://api.github.com/users/phire/events{/privacy}","received_events_url":"https://api.github.com/users/phire/received_events","type":"User","site_admin":false},"repo":{"id":16432729,"name":"dolphin","full_name":"phire/dolphin","owner":{"login":"phire","id":138484,"avatar_url":"https://avatars.githubusercontent.com/u/138484?v=3","gravatar_id":"","url":"https://api.github.com/users/phire","html_url":"https://github.com/phire","followers_url":"https://api.github.com/users/phire/followers","following_url":"https://api.github.com/users/phire/following{/other_user}","gists_url":"https://api.github.com/users/phire/gists{/gist_id}","starred_url":"https://api.github.com/users/phire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phire/subscriptions","organizations_url":"https://api.github.com/users/phire/orgs","repos_url":"https://api.github.com/users/phire/repos","events_url":"https://api.github.com/users/phire/events{/privacy}","received_events_url":"https://api.github.com/users/phire/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/phire/dolphin","description":"Dolphin is a GameCube/Wii emulator, allowing you to play games for these two platforms on PC, with improvements.","fork":true,"url":"https://api.github.com/repos/phire/dolphin","forks_url":"https://api.github.com/repos/phire/dolphin/forks","keys_url":"https://api.github.com/repos/phire/dolphin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phire/dolphin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phire/dolphin/teams","hooks_url":"https://api.github.com/repos/phire/dolphin/hooks","issue_events_url":"https://api.github.com/repos/phire/dolphin/issues/events{/number}","events_url":"https://api.github.com/repos/phire/dolphin/events","assignees_url":"https://api.github.com/repos/phire/dolphin/assignees{/user}","branches_url":"https://api.github.com/repos/phire/dolphin/branches{/branch}","tags_url":"https://api.github.com/repos/phire/dolphin/tags","blobs_url":"https://api.github.com/repos/phire/dolphin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phire/dolphin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phire/dolphin/git/refs{/sha}","trees_url":"https://api.github.com/repos/phire/dolphin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phire/dolphin/statuses/{sha}","languages_url":"https://api.github.com/repos/phire/dolphin/languages","stargazers_url":"https://api.github.com/repos/phire/dolphin/stargazers","contributors_url":"https://api.github.com/repos/phire/dolphin/contributors","subscribers_url":"https://api.github.com/repos/phire/dolphin/subscribers","subscription_url":"https://api.github.com/repos/phire/dolphin/subscription","commits_url":"https://api.github.com/repos/phire/dolphin/commits{/sha}","git_commits_url":"https://api.github.com/repos/phire/dolphin/git/commits{/sha}","comments_url":"https://api.github.com/repos/phire/dolphin/comments{/number}","issue_comment_url":"https://api.github.com/repos/phire/dolphin/issues/comments{/number}","contents_url":"https://api.github.com/repos/phire/dolphin/contents/{+path}","compare_url":"https://api.github.com/repos/phire/dolphin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phire/dolphin/merges","archive_url":"https://api.github.com/repos/phire/dolphin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phire/dolphin/downloads","issues_url":"https://api.github.com/repos/phire/dolphin/issues{/number}","pulls_url":"https://api.github.com/repos/phire/dolphin/pulls{/number}","milestones_url":"https://api.github.com/repos/phire/dolphin/milestones{/number}","notifications_url":"https://api.github.com/repos/phire/dolphin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phire/dolphin/labels{/name}","releases_url":"https://api.github.com/repos/phire/dolphin/releases{/id}","deployments_url":"https://api.github.com/repos/phire/dolphin/deployments","created_at":"2014-02-01T11:17:19Z","updated_at":"2015-04-16T04:27:36Z","pushed_at":"2016-05-17T20:32:17Z","git_url":"git://github.com/phire/dolphin.git","ssh_url":"git@github.com:phire/dolphin.git","clone_url":"https://github.com/phire/dolphin.git","svn_url":"https://github.com/phire/dolphin","homepage":null,"size":239370,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"dolphin-emu:master","ref":"master","sha":"2959f3607c403e9ede26c9b1704359026292646c","user":{"login":"dolphin-emu","id":5050316,"avatar_url":"https://avatars.githubusercontent.com/u/5050316?v=3","gravatar_id":"","url":"https://api.github.com/users/dolphin-emu","html_url":"https://github.com/dolphin-emu","followers_url":"https://api.github.com/users/dolphin-emu/followers","following_url":"https://api.github.com/users/dolphin-emu/following{/other_user}","gists_url":"https://api.github.com/users/dolphin-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/dolphin-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dolphin-emu/subscriptions","organizations_url":"https://api.github.com/users/dolphin-emu/orgs","repos_url":"https://api.github.com/users/dolphin-emu/repos","events_url":"https://api.github.com/users/dolphin-emu/events{/privacy}","received_events_url":"https://api.github.com/users/dolphin-emu/received_events","type":"Organization","site_admin":false},"repo":{"id":11577304,"name":"dolphin","full_name":"dolphin-emu/dolphin","owner":{"login":"dolphin-emu","id":5050316,"avatar_url":"https://avatars.githubusercontent.com/u/5050316?v=3","gravatar_id":"","url":"https://api.github.com/users/dolphin-emu","html_url":"https://github.com/dolphin-emu","followers_url":"https://api.github.com/users/dolphin-emu/followers","following_url":"https://api.github.com/users/dolphin-emu/following{/other_user}","gists_url":"https://api.github.com/users/dolphin-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/dolphin-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dolphin-emu/subscriptions","organizations_url":"https://api.github.com/users/dolphin-emu/orgs","repos_url":"https://api.github.com/users/dolphin-emu/repos","events_url":"https://api.github.com/users/dolphin-emu/events{/privacy}","received_events_url":"https://api.github.com/users/dolphin-emu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dolphin-emu/dolphin","description":"Dolphin is a GameCube / Wii emulator, allowing you to play games for these two platforms on PC with improvements.","fork":false,"url":"https://api.github.com/repos/dolphin-emu/dolphin","forks_url":"https://api.github.com/repos/dolphin-emu/dolphin/forks","keys_url":"https://api.github.com/repos/dolphin-emu/dolphin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dolphin-emu/dolphin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dolphin-emu/dolphin/teams","hooks_url":"https://api.github.com/repos/dolphin-emu/dolphin/hooks","issue_events_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/events{/number}","events_url":"https://api.github.com/repos/dolphin-emu/dolphin/events","assignees_url":"https://api.github.com/repos/dolphin-emu/dolphin/assignees{/user}","branches_url":"https://api.github.com/repos/dolphin-emu/dolphin/branches{/branch}","tags_url":"https://api.github.com/repos/dolphin-emu/dolphin/tags","blobs_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/refs{/sha}","trees_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dolphin-emu/dolphin/statuses/{sha}","languages_url":"https://api.github.com/repos/dolphin-emu/dolphin/languages","stargazers_url":"https://api.github.com/repos/dolphin-emu/dolphin/stargazers","contributors_url":"https://api.github.com/repos/dolphin-emu/dolphin/contributors","subscribers_url":"https://api.github.com/repos/dolphin-emu/dolphin/subscribers","subscription_url":"https://api.github.com/repos/dolphin-emu/dolphin/subscription","commits_url":"https://api.github.com/repos/dolphin-emu/dolphin/commits{/sha}","git_commits_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/commits{/sha}","comments_url":"https://api.github.com/repos/dolphin-emu/dolphin/comments{/number}","issue_comment_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/comments{/number}","contents_url":"https://api.github.com/repos/dolphin-emu/dolphin/contents/{+path}","compare_url":"https://api.github.com/repos/dolphin-emu/dolphin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dolphin-emu/dolphin/merges","archive_url":"https://api.github.com/repos/dolphin-emu/dolphin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dolphin-emu/dolphin/downloads","issues_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues{/number}","pulls_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls{/number}","milestones_url":"https://api.github.com/repos/dolphin-emu/dolphin/milestones{/number}","notifications_url":"https://api.github.com/repos/dolphin-emu/dolphin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dolphin-emu/dolphin/labels{/name}","releases_url":"https://api.github.com/repos/dolphin-emu/dolphin/releases{/id}","deployments_url":"https://api.github.com/repos/dolphin-emu/dolphin/deployments","created_at":"2013-07-22T09:07:57Z","updated_at":"2016-05-16T22:29:34Z","pushed_at":"2016-05-17T21:06:45Z","git_url":"git://github.com/dolphin-emu/dolphin.git","ssh_url":"git@github.com:dolphin-emu/dolphin.git","clone_url":"https://github.com/dolphin-emu/dolphin.git","svn_url":"https://github.com/dolphin-emu/dolphin","homepage":"https://dolphin-emu.org/","size":273227,"stargazers_count":2240,"watchers_count":2240,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":662,"mirror_url":null,"open_issues_count":141,"forks":662,"open_issues":141,"watchers":2240,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3845"},"html":{"href":"https://github.com/dolphin-emu/dolphin/pull/3845"},"issue":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/issues/3845"},"comments":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/issues/3845/comments"},"review_comments":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3845/comments"},"review_comment":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3845/commits"},"statuses":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/statuses/4ebed592ad0fa1e339fd756ee1ad0eb870b4c5df"}}}}