{"action":"created","comment":{"url":"https://api.github.com/repos/google/filament/pulls/comments/209412755","pull_request_review_id":145432219,"id":209412755,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwOTQxMjc1NQ==","diff_hunk":"@@ -0,0 +1,319 @@\n+/*\n+ * Copyright (C) 2018 The Android Open Source Project\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *      http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+#include <image/ImageSampler.h>\n+#include <image/ImageOps.h>\n+\n+#include <math/vec3.h>\n+#include <utils/Panic.h>\n+\n+#include <memory>\n+#include <vector>\n+\n+using namespace image;\n+\n+namespace {\n+\n+struct FilterFn {","path":"libs/image/src/ImageSampler.cpp","position":30,"original_position":30,"commit_id":"47481e3693c862f810ffc55bb847e3fb2bcad862","original_commit_id":"47481e3693c862f810ffc55bb847e3fb2bcad862","user":{"login":"romainguy","id":869684,"node_id":"MDQ6VXNlcjg2OTY4NA==","avatar_url":"https://avatars1.githubusercontent.com/u/869684?v=4","gravatar_id":"","url":"https://api.github.com/users/romainguy","html_url":"https://github.com/romainguy","followers_url":"https://api.github.com/users/romainguy/followers","following_url":"https://api.github.com/users/romainguy/following{/other_user}","gists_url":"https://api.github.com/users/romainguy/gists{/gist_id}","starred_url":"https://api.github.com/users/romainguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romainguy/subscriptions","organizations_url":"https://api.github.com/users/romainguy/orgs","repos_url":"https://api.github.com/users/romainguy/repos","events_url":"https://api.github.com/users/romainguy/events{/privacy}","received_events_url":"https://api.github.com/users/romainguy/received_events","type":"User","site_admin":false},"body":"`FilterFunction`?","created_at":"2018-08-11T01:37:37Z","updated_at":"2018-08-11T01:38:45Z","html_url":"https://github.com/google/filament/pull/80#discussion_r209412755","pull_request_url":"https://api.github.com/repos/google/filament/pulls/80","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/google/filament/pulls/comments/209412755"},"html":{"href":"https://github.com/google/filament/pull/80#discussion_r209412755"},"pull_request":{"href":"https://api.github.com/repos/google/filament/pulls/80"}}},"pull_request":{"url":"https://api.github.com/repos/google/filament/pulls/80","id":207750588,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3NzUwNTg4","html_url":"https://github.com/google/filament/pull/80","diff_url":"https://github.com/google/filament/pull/80.diff","patch_url":"https://github.com/google/filament/pull/80.patch","issue_url":"https://api.github.com/repos/google/filament/issues/80","number":80,"state":"open","locked":false,"title":"Introduce new image library, Phase I.","user":{"login":"prideout","id":1288904,"node_id":"MDQ6VXNlcjEyODg5MDQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1288904?v=4","gravatar_id":"","url":"https://api.github.com/users/prideout","html_url":"https://github.com/prideout","followers_url":"https://api.github.com/users/prideout/followers","following_url":"https://api.github.com/users/prideout/following{/other_user}","gists_url":"https://api.github.com/users/prideout/gists{/gist_id}","starred_url":"https://api.github.com/users/prideout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prideout/subscriptions","organizations_url":"https://api.github.com/users/prideout/orgs","repos_url":"https://api.github.com/users/prideout/repos","events_url":"https://api.github.com/users/prideout/events{/privacy}","received_events_url":"https://api.github.com/users/prideout/received_events","type":"User","site_admin":false},"body":"The preps for our upcoming mipgen command line tool by adding filtering\r\ncapabilities and unit tests for a new LinearImage class, which will\r\nsubsume Image (deprecated).\r\n\r\nFilament's new image library is composed of three components:\r\n\r\n- LinearImage....simple 3D tensor of floats\r\n- ImageOps.......free functions for simple transforms\r\n- ImageSampler...high quality filtering\r\n\r\nThe old Image class was a simple untyped data blob and is now\r\ndeprecated. The new LinearImage class is always float32, and always\r\nstores pixels in packed scanline order. This makes it easier to\r\nimplement image-based algorithms because they can be agnostic of the\r\nunderlying format.\r\n\r\nRemaining refactorings:\r\n- Phase  II will migrate imageio to LinearImage\r\n- Phase III will migrate all downstream tools to LinearImage\r\n- Phase  IV will remove old the Image class","created_at":"2018-08-11T01:16:40Z","updated_at":"2018-08-11T01:38:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e778d6f22f4d0b0e75b7999e7e999fa243177a78","assignee":null,"assignees":[],"requested_reviewers":[{"login":"pixelflinger","id":1240896,"node_id":"MDQ6VXNlcjEyNDA4OTY=","avatar_url":"https://avatars1.githubusercontent.com/u/1240896?v=4","gravatar_id":"","url":"https://api.github.com/users/pixelflinger","html_url":"https://github.com/pixelflinger","followers_url":"https://api.github.com/users/pixelflinger/followers","following_url":"https://api.github.com/users/pixelflinger/following{/other_user}","gists_url":"https://api.github.com/users/pixelflinger/gists{/gist_id}","starred_url":"https://api.github.com/users/pixelflinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pixelflinger/subscriptions","organizations_url":"https://api.github.com/users/pixelflinger/orgs","repos_url":"https://api.github.com/users/pixelflinger/repos","events_url":"https://api.github.com/users/pixelflinger/events{/privacy}","received_events_url":"https://api.github.com/users/pixelflinger/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/google/filament/pulls/80/commits","review_comments_url":"https://api.github.com/repos/google/filament/pulls/80/comments","review_comment_url":"https://api.github.com/repos/google/filament/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/filament/issues/80/comments","statuses_url":"https://api.github.com/repos/google/filament/statuses/47481e3693c862f810ffc55bb847e3fb2bcad862","head":{"label":"google:pr/phase1","ref":"pr/phase1","sha":"47481e3693c862f810ffc55bb847e3fb2bcad862","user":{"login":"google","id":1342004,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDIwMDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1342004?v=4","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":143455116,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM0NTUxMTY=","name":"filament","full_name":"google/filament","owner":{"login":"google","id":1342004,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDIwMDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1342004?v=4","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/filament","description":"Filament is a physically based rendering engine for Android, Windows, Linux and macOS","fork":false,"url":"https://api.github.com/repos/google/filament","forks_url":"https://api.github.com/repos/google/filament/forks","keys_url":"https://api.github.com/repos/google/filament/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/filament/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/filament/teams","hooks_url":"https://api.github.com/repos/google/filament/hooks","issue_events_url":"https://api.github.com/repos/google/filament/issues/events{/number}","events_url":"https://api.github.com/repos/google/filament/events","assignees_url":"https://api.github.com/repos/google/filament/assignees{/user}","branches_url":"https://api.github.com/repos/google/filament/branches{/branch}","tags_url":"https://api.github.com/repos/google/filament/tags","blobs_url":"https://api.github.com/repos/google/filament/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/filament/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/filament/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/filament/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/filament/statuses/{sha}","languages_url":"https://api.github.com/repos/google/filament/languages","stargazers_url":"https://api.github.com/repos/google/filament/stargazers","contributors_url":"https://api.github.com/repos/google/filament/contributors","subscribers_url":"https://api.github.com/repos/google/filament/subscribers","subscription_url":"https://api.github.com/repos/google/filament/subscription","commits_url":"https://api.github.com/repos/google/filament/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/filament/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/filament/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/filament/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/filament/contents/{+path}","compare_url":"https://api.github.com/repos/google/filament/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/filament/merges","archive_url":"https://api.github.com/repos/google/filament/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/filament/downloads","issues_url":"https://api.github.com/repos/google/filament/issues{/number}","pulls_url":"https://api.github.com/repos/google/filament/pulls{/number}","milestones_url":"https://api.github.com/repos/google/filament/milestones{/number}","notifications_url":"https://api.github.com/repos/google/filament/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/filament/labels{/name}","releases_url":"https://api.github.com/repos/google/filament/releases{/id}","deployments_url":"https://api.github.com/repos/google/filament/deployments","created_at":"2018-08-03T17:26:00Z","updated_at":"2018-08-11T01:12:02Z","pushed_at":"2018-08-11T01:16:41Z","git_url":"git://github.com/google/filament.git","ssh_url":"git@github.com:google/filament.git","clone_url":"https://github.com/google/filament.git","svn_url":"https://github.com/google/filament","homepage":"","size":260704,"stargazers_count":3382,"watchers_count":3382,"language":"C++","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":149,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":149,"open_issues":9,"watchers":3382,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"9ac432d5301f7bfb8909457151e5c50df3bc23c3","user":{"login":"google","id":1342004,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDIwMDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1342004?v=4","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":143455116,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM0NTUxMTY=","name":"filament","full_name":"google/filament","owner":{"login":"google","id":1342004,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDIwMDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1342004?v=4","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/filament","description":"Filament is a physically based rendering engine for Android, Windows, Linux and macOS","fork":false,"url":"https://api.github.com/repos/google/filament","forks_url":"https://api.github.com/repos/google/filament/forks","keys_url":"https://api.github.com/repos/google/filament/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/filament/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/filament/teams","hooks_url":"https://api.github.com/repos/google/filament/hooks","issue_events_url":"https://api.github.com/repos/google/filament/issues/events{/number}","events_url":"https://api.github.com/repos/google/filament/events","assignees_url":"https://api.github.com/repos/google/filament/assignees{/user}","branches_url":"https://api.github.com/repos/google/filament/branches{/branch}","tags_url":"https://api.github.com/repos/google/filament/tags","blobs_url":"https://api.github.com/repos/google/filament/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/filament/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/filament/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/filament/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/filament/statuses/{sha}","languages_url":"https://api.github.com/repos/google/filament/languages","stargazers_url":"https://api.github.com/repos/google/filament/stargazers","contributors_url":"https://api.github.com/repos/google/filament/contributors","subscribers_url":"https://api.github.com/repos/google/filament/subscribers","subscription_url":"https://api.github.com/repos/google/filament/subscription","commits_url":"https://api.github.com/repos/google/filament/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/filament/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/filament/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/filament/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/filament/contents/{+path}","compare_url":"https://api.github.com/repos/google/filament/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/filament/merges","archive_url":"https://api.github.com/repos/google/filament/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/filament/downloads","issues_url":"https://api.github.com/repos/google/filament/issues{/number}","pulls_url":"https://api.github.com/repos/google/filament/pulls{/number}","milestones_url":"https://api.github.com/repos/google/filament/milestones{/number}","notifications_url":"https://api.github.com/repos/google/filament/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/filament/labels{/name}","releases_url":"https://api.github.com/repos/google/filament/releases{/id}","deployments_url":"https://api.github.com/repos/google/filament/deployments","created_at":"2018-08-03T17:26:00Z","updated_at":"2018-08-11T01:12:02Z","pushed_at":"2018-08-11T01:16:41Z","git_url":"git://github.com/google/filament.git","ssh_url":"git@github.com:google/filament.git","clone_url":"https://github.com/google/filament.git","svn_url":"https://github.com/google/filament","homepage":"","size":260704,"stargazers_count":3382,"watchers_count":3382,"language":"C++","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":149,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":149,"open_issues":9,"watchers":3382,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/filament/pulls/80"},"html":{"href":"https://github.com/google/filament/pull/80"},"issue":{"href":"https://api.github.com/repos/google/filament/issues/80"},"comments":{"href":"https://api.github.com/repos/google/filament/issues/80/comments"},"review_comments":{"href":"https://api.github.com/repos/google/filament/pulls/80/comments"},"review_comment":{"href":"https://api.github.com/repos/google/filament/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/filament/pulls/80/commits"},"statuses":{"href":"https://api.github.com/repos/google/filament/statuses/47481e3693c862f810ffc55bb847e3fb2bcad862"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"romainguy"}}