{"action":"created","comment":{"url":"https://api.github.com/repos/libass/libass/pulls/comments/145923207","pull_request_review_id":70795243,"id":145923207,"diff_hunk":"@@ -2079,6 +2080,24 @@ static void calculate_rotation_params(ASS_Renderer *render_priv, ASS_DRect *bbox\n }\n \n \n+static int quantize_blur(double radius, int32_t *shadow_mask)\n+{\n+    const double scale = TRANFORM_ACCURACY / (64 * BLUR_ACCURACY);\n+    radius *= 2 / sqrt(log(256)) / scale;\n+\n+    int ord;\n+    frexp((1 + radius) * (TRANFORM_ACCURACY / 2), &ord);\n+    *shadow_mask = ((uint32_t) 1 << ord) - 1;\n+    return lrint(log1p(radius) / BLUR_ACCURACY);\n+}\n+\n+static double restore_blur(int qblur)\n+{\n+    const double scale = TRANFORM_ACCURACY / (64 * BLUR_ACCURACY);\n+    double sigma = scale * (exp(BLUR_ACCURACY * qblur) - 1);","path":"libass/ass_render.c","position":1192,"original_position":26,"commit_id":"692966936232dee570f608fb0e619b3fa59af3fd","original_commit_id":"385c6482946a78a1e476f57bdca95b9306ba1af7","user":{"login":"astiob","id":515193,"avatar_url":"https://avatars0.githubusercontent.com/u/515193?v=4","gravatar_id":"","url":"https://api.github.com/users/astiob","html_url":"https://github.com/astiob","followers_url":"https://api.github.com/users/astiob/followers","following_url":"https://api.github.com/users/astiob/following{/other_user}","gists_url":"https://api.github.com/users/astiob/gists{/gist_id}","starred_url":"https://api.github.com/users/astiob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astiob/subscriptions","organizations_url":"https://api.github.com/users/astiob/orgs","repos_url":"https://api.github.com/users/astiob/repos","events_url":"https://api.github.com/users/astiob/events{/privacy}","received_events_url":"https://api.github.com/users/astiob/received_events","type":"User","site_admin":false},"body":"Er… guaranteed if the platform supports IEEE arithmetic (Annex F of the C standard). Nothing is guaranteed if it doesn’t. So I guess we do need to keep that epsilon over in `ass_synth_blur`.","created_at":"2017-10-20T09:56:07Z","updated_at":"2017-10-20T09:56:07Z","html_url":"https://github.com/libass/libass/pull/285#discussion_r145923207","pull_request_url":"https://api.github.com/repos/libass/libass/pulls/285","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/libass/libass/pulls/comments/145923207"},"html":{"href":"https://github.com/libass/libass/pull/285#discussion_r145923207"},"pull_request":{"href":"https://api.github.com/repos/libass/libass/pulls/285"}},"in_reply_to_id":145922040},"pull_request":{"url":"https://api.github.com/repos/libass/libass/pulls/285","id":146357992,"html_url":"https://github.com/libass/libass/pull/285","diff_url":"https://github.com/libass/libass/pull/285.diff","patch_url":"https://github.com/libass/libass/pull/285.patch","issue_url":"https://api.github.com/repos/libass/libass/issues/285","number":285,"state":"open","locked":false,"title":"Quantization of cache keys","user":{"login":"MrSmile","id":3741834,"avatar_url":"https://avatars0.githubusercontent.com/u/3741834?v=4","gravatar_id":"","url":"https://api.github.com/users/MrSmile","html_url":"https://github.com/MrSmile","followers_url":"https://api.github.com/users/MrSmile/followers","following_url":"https://api.github.com/users/MrSmile/following{/other_user}","gists_url":"https://api.github.com/users/MrSmile/gists{/gist_id}","starred_url":"https://api.github.com/users/MrSmile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrSmile/subscriptions","organizations_url":"https://api.github.com/users/MrSmile/orgs","repos_url":"https://api.github.com/users/MrSmile/repos","events_url":"https://api.github.com/users/MrSmile/events{/privacy}","received_events_url":"https://api.github.com/users/MrSmile/received_events","type":"User","site_admin":false},"body":"That's large architectural PR which consist of the following:\r\n- Enforce strict cache logic. Every cache value should be constructed from corresponding key data plus some global state, so I've made difficult to access other data. A couple of bugs have fixed thanks to that.\r\n- Do not cache primary and border outline/bitmap together, use separate entries for that. That's mostly needed for next items, but also can be considered a step to separate rendering backend.\r\n- Gather all outline transformations in one place, immediately before rasterization. It's better to do scaling together with all other transformations and not in 3 different places.\r\n- Quantize that complete transformation and use it in bitmap cache key. That improve performance of slow animations. Also abstraction from tags (\\fax, \\frz, \\fscx, etc.) is good for separate rendering backend.\r\n- Blur radius and shadow offset is also quantized, but composite cache value isn't split to layers yet.\r\n\r\nThe main driving force for that PR was performance of slow animations, architectural part came on the way. Reviews, suggestions and testing are welcome.\r\n\r\nNot ready for merge yet, I think I'll try to shuffle and merge some commits for better history.","created_at":"2017-10-13T02:25:18Z","updated_at":"2017-10-20T09:56:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4fe30ce87ed8bbb9c9c4af463df99fef9413e710","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/libass/libass/pulls/285/commits","review_comments_url":"https://api.github.com/repos/libass/libass/pulls/285/comments","review_comment_url":"https://api.github.com/repos/libass/libass/pulls/comments{/number}","comments_url":"https://api.github.com/repos/libass/libass/issues/285/comments","statuses_url":"https://api.github.com/repos/libass/libass/statuses/692966936232dee570f608fb0e619b3fa59af3fd","head":{"label":"MrSmile:transform-quantization","ref":"transform-quantization","sha":"692966936232dee570f608fb0e619b3fa59af3fd","user":{"login":"MrSmile","id":3741834,"avatar_url":"https://avatars0.githubusercontent.com/u/3741834?v=4","gravatar_id":"","url":"https://api.github.com/users/MrSmile","html_url":"https://github.com/MrSmile","followers_url":"https://api.github.com/users/MrSmile/followers","following_url":"https://api.github.com/users/MrSmile/following{/other_user}","gists_url":"https://api.github.com/users/MrSmile/gists{/gist_id}","starred_url":"https://api.github.com/users/MrSmile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrSmile/subscriptions","organizations_url":"https://api.github.com/users/MrSmile/orgs","repos_url":"https://api.github.com/users/MrSmile/repos","events_url":"https://api.github.com/users/MrSmile/events{/privacy}","received_events_url":"https://api.github.com/users/MrSmile/received_events","type":"User","site_admin":false},"repo":{"id":16222589,"name":"libass","full_name":"MrSmile/libass","owner":{"login":"MrSmile","id":3741834,"avatar_url":"https://avatars0.githubusercontent.com/u/3741834?v=4","gravatar_id":"","url":"https://api.github.com/users/MrSmile","html_url":"https://github.com/MrSmile","followers_url":"https://api.github.com/users/MrSmile/followers","following_url":"https://api.github.com/users/MrSmile/following{/other_user}","gists_url":"https://api.github.com/users/MrSmile/gists{/gist_id}","starred_url":"https://api.github.com/users/MrSmile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrSmile/subscriptions","organizations_url":"https://api.github.com/users/MrSmile/orgs","repos_url":"https://api.github.com/users/MrSmile/repos","events_url":"https://api.github.com/users/MrSmile/events{/privacy}","received_events_url":"https://api.github.com/users/MrSmile/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MrSmile/libass","description":"libass is a portable subtitle renderer for the ASS/SSA (Advanced Substation Alpha/Substation Alpha) subtitle format.","fork":true,"url":"https://api.github.com/repos/MrSmile/libass","forks_url":"https://api.github.com/repos/MrSmile/libass/forks","keys_url":"https://api.github.com/repos/MrSmile/libass/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MrSmile/libass/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MrSmile/libass/teams","hooks_url":"https://api.github.com/repos/MrSmile/libass/hooks","issue_events_url":"https://api.github.com/repos/MrSmile/libass/issues/events{/number}","events_url":"https://api.github.com/repos/MrSmile/libass/events","assignees_url":"https://api.github.com/repos/MrSmile/libass/assignees{/user}","branches_url":"https://api.github.com/repos/MrSmile/libass/branches{/branch}","tags_url":"https://api.github.com/repos/MrSmile/libass/tags","blobs_url":"https://api.github.com/repos/MrSmile/libass/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MrSmile/libass/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MrSmile/libass/git/refs{/sha}","trees_url":"https://api.github.com/repos/MrSmile/libass/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MrSmile/libass/statuses/{sha}","languages_url":"https://api.github.com/repos/MrSmile/libass/languages","stargazers_url":"https://api.github.com/repos/MrSmile/libass/stargazers","contributors_url":"https://api.github.com/repos/MrSmile/libass/contributors","subscribers_url":"https://api.github.com/repos/MrSmile/libass/subscribers","subscription_url":"https://api.github.com/repos/MrSmile/libass/subscription","commits_url":"https://api.github.com/repos/MrSmile/libass/commits{/sha}","git_commits_url":"https://api.github.com/repos/MrSmile/libass/git/commits{/sha}","comments_url":"https://api.github.com/repos/MrSmile/libass/comments{/number}","issue_comment_url":"https://api.github.com/repos/MrSmile/libass/issues/comments{/number}","contents_url":"https://api.github.com/repos/MrSmile/libass/contents/{+path}","compare_url":"https://api.github.com/repos/MrSmile/libass/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MrSmile/libass/merges","archive_url":"https://api.github.com/repos/MrSmile/libass/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MrSmile/libass/downloads","issues_url":"https://api.github.com/repos/MrSmile/libass/issues{/number}","pulls_url":"https://api.github.com/repos/MrSmile/libass/pulls{/number}","milestones_url":"https://api.github.com/repos/MrSmile/libass/milestones{/number}","notifications_url":"https://api.github.com/repos/MrSmile/libass/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MrSmile/libass/labels{/name}","releases_url":"https://api.github.com/repos/MrSmile/libass/releases{/id}","deployments_url":"https://api.github.com/repos/MrSmile/libass/deployments","created_at":"2014-01-25T01:50:20Z","updated_at":"2017-04-19T22:22:57Z","pushed_at":"2017-10-13T03:37:46Z","git_url":"git://github.com/MrSmile/libass.git","ssh_url":"git@github.com:MrSmile/libass.git","clone_url":"https://github.com/MrSmile/libass.git","svn_url":"https://github.com/MrSmile/libass","homepage":"https://code.google.com/p/libass/","size":2636,"stargazers_count":3,"watchers_count":3,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":3,"default_branch":"master"}},"base":{"label":"libass:master","ref":"master","sha":"9b874841274ef0262872c53f9b9eb5d2bc054c8f","user":{"login":"libass","id":5098953,"avatar_url":"https://avatars3.githubusercontent.com/u/5098953?v=4","gravatar_id":"","url":"https://api.github.com/users/libass","html_url":"https://github.com/libass","followers_url":"https://api.github.com/users/libass/followers","following_url":"https://api.github.com/users/libass/following{/other_user}","gists_url":"https://api.github.com/users/libass/gists{/gist_id}","starred_url":"https://api.github.com/users/libass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libass/subscriptions","organizations_url":"https://api.github.com/users/libass/orgs","repos_url":"https://api.github.com/users/libass/repos","events_url":"https://api.github.com/users/libass/events{/privacy}","received_events_url":"https://api.github.com/users/libass/received_events","type":"Organization","site_admin":false},"repo":{"id":11696642,"name":"libass","full_name":"libass/libass","owner":{"login":"libass","id":5098953,"avatar_url":"https://avatars3.githubusercontent.com/u/5098953?v=4","gravatar_id":"","url":"https://api.github.com/users/libass","html_url":"https://github.com/libass","followers_url":"https://api.github.com/users/libass/followers","following_url":"https://api.github.com/users/libass/following{/other_user}","gists_url":"https://api.github.com/users/libass/gists{/gist_id}","starred_url":"https://api.github.com/users/libass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libass/subscriptions","organizations_url":"https://api.github.com/users/libass/orgs","repos_url":"https://api.github.com/users/libass/repos","events_url":"https://api.github.com/users/libass/events{/privacy}","received_events_url":"https://api.github.com/users/libass/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/libass/libass","description":"libass is a portable subtitle renderer for the ASS/SSA (Advanced Substation Alpha/Substation Alpha) subtitle format.","fork":false,"url":"https://api.github.com/repos/libass/libass","forks_url":"https://api.github.com/repos/libass/libass/forks","keys_url":"https://api.github.com/repos/libass/libass/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libass/libass/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libass/libass/teams","hooks_url":"https://api.github.com/repos/libass/libass/hooks","issue_events_url":"https://api.github.com/repos/libass/libass/issues/events{/number}","events_url":"https://api.github.com/repos/libass/libass/events","assignees_url":"https://api.github.com/repos/libass/libass/assignees{/user}","branches_url":"https://api.github.com/repos/libass/libass/branches{/branch}","tags_url":"https://api.github.com/repos/libass/libass/tags","blobs_url":"https://api.github.com/repos/libass/libass/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libass/libass/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libass/libass/git/refs{/sha}","trees_url":"https://api.github.com/repos/libass/libass/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libass/libass/statuses/{sha}","languages_url":"https://api.github.com/repos/libass/libass/languages","stargazers_url":"https://api.github.com/repos/libass/libass/stargazers","contributors_url":"https://api.github.com/repos/libass/libass/contributors","subscribers_url":"https://api.github.com/repos/libass/libass/subscribers","subscription_url":"https://api.github.com/repos/libass/libass/subscription","commits_url":"https://api.github.com/repos/libass/libass/commits{/sha}","git_commits_url":"https://api.github.com/repos/libass/libass/git/commits{/sha}","comments_url":"https://api.github.com/repos/libass/libass/comments{/number}","issue_comment_url":"https://api.github.com/repos/libass/libass/issues/comments{/number}","contents_url":"https://api.github.com/repos/libass/libass/contents/{+path}","compare_url":"https://api.github.com/repos/libass/libass/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libass/libass/merges","archive_url":"https://api.github.com/repos/libass/libass/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libass/libass/downloads","issues_url":"https://api.github.com/repos/libass/libass/issues{/number}","pulls_url":"https://api.github.com/repos/libass/libass/pulls{/number}","milestones_url":"https://api.github.com/repos/libass/libass/milestones{/number}","notifications_url":"https://api.github.com/repos/libass/libass/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libass/libass/labels{/name}","releases_url":"https://api.github.com/repos/libass/libass/releases{/id}","deployments_url":"https://api.github.com/repos/libass/libass/deployments","created_at":"2013-07-26T23:11:51Z","updated_at":"2017-10-17T16:29:32Z","pushed_at":"2017-10-13T03:37:47Z","git_url":"git://github.com/libass/libass.git","ssh_url":"git@github.com:libass/libass.git","clone_url":"https://github.com/libass/libass.git","svn_url":"https://github.com/libass/libass","homepage":"","size":2222,"stargazers_count":238,"watchers_count":238,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":82,"mirror_url":null,"open_issues_count":90,"forks":82,"open_issues":90,"watchers":238,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/libass/libass/pulls/285"},"html":{"href":"https://github.com/libass/libass/pull/285"},"issue":{"href":"https://api.github.com/repos/libass/libass/issues/285"},"comments":{"href":"https://api.github.com/repos/libass/libass/issues/285/comments"},"review_comments":{"href":"https://api.github.com/repos/libass/libass/pulls/285/comments"},"review_comment":{"href":"https://api.github.com/repos/libass/libass/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/libass/libass/pulls/285/commits"},"statuses":{"href":"https://api.github.com/repos/libass/libass/statuses/692966936232dee570f608fb0e619b3fa59af3fd"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"astiob"}}