{"action":"created","comment":{"url":"https://api.github.com/repos/01org/libyami/pulls/comments/77283189","id":77283189,"diff_hunk":"@@ -749,72 +790,72 @@ bool Parser::stRefPicSet(ShortTermRefPicSet* stRef, NalReader& nr,\n }\n \n // 7.3.6.2 Reference picture list modification syntax\n-bool Parser::refPicListsModification(SliceHeader* slice, NalReader& nr,\n+bool Parser::refPicListsModification(SliceHeader* slice, NalReader& br,\n     int32_t numPicTotalCurr)\n {\n     uint32_t nbits = ceil(log2(numPicTotalCurr));\n     RefPicListModification* rplm = &slice->ref_pic_list_modification;\n     memset(rplm, 0, sizeof(RefPicListModification));\n-    rplm->ref_pic_list_modification_flag_l0 = nr.read(1);\n+    READ(rplm->ref_pic_list_modification_flag_l0);\n     if (rplm->ref_pic_list_modification_flag_l0) {\n         for (uint32_t i = 0; i <= slice->num_ref_idx_l0_active_minus1; i++) {\n-            rplm->list_entry_l0[i] = nr.read(nbits);\n+            READ_BITS(rplm->list_entry_l0[i], nbits);\n         }\n     }\n     if (slice->isBSlice()) {\n-        rplm->ref_pic_list_modification_flag_l1 = nr.read(1);\n+        READ(rplm->ref_pic_list_modification_flag_l1);\n         if (rplm->ref_pic_list_modification_flag_l1)\n             for (uint32_t i = 0; i <= slice->num_ref_idx_l1_active_minus1; i++) {\n-                rplm->list_entry_l1[i] = nr.read(nbits);\n+                READ_BITS(rplm->list_entry_l1[i], nbits);\n             }\n     }\n \n     return true;\n }\n \n //merge parse l0 and l1 for function predWeightTable\n-#define SUB_PRED_WEIGHT_TABLE(slice, pwt, nr, sps, mode)                           \\\n+#define SUB_PRED_WEIGHT_TABLE(slice, pwt, br, sps, mode)                           \\\n     {                                                                              \\\n         uint32_t i, j;                                                             \\\n         for (i = 0; i <= slice->num_ref_idx_##mode##_active_minus1; i++)           \\\n-            pwt->luma_weight_##mode##_flag[i] = nr.read(1);                        \\\n+            READ_BITS(pwt->luma_weight_##mode##_flag[i], 1);                       \\\n         if (sps->chroma_format_idc) {                                              \\\n             for (i = 0; i <= slice->num_ref_idx_##mode##_active_minus1; i++)       \\\n-                pwt->chroma_weight_##mode##_flag[i] = nr.read(1);                  \\\n+                READ_BITS(pwt->chroma_weight_##mode##_flag[i], 1);                 \\","path":"codecparsers/h265Parser.cpp","position":654,"original_position":654,"commit_id":"4f8db496d72e14a468eddd5d8334abe561a31a59","original_commit_id":"4f8db496d72e14a468eddd5d8334abe561a31a59","user":{"login":"xuguangxin","id":6667546,"avatar_url":"https://avatars.githubusercontent.com/u/6667546?v=3","gravatar_id":"","url":"https://api.github.com/users/xuguangxin","html_url":"https://github.com/xuguangxin","followers_url":"https://api.github.com/users/xuguangxin/followers","following_url":"https://api.github.com/users/xuguangxin/following{/other_user}","gists_url":"https://api.github.com/users/xuguangxin/gists{/gist_id}","starred_url":"https://api.github.com/users/xuguangxin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xuguangxin/subscriptions","organizations_url":"https://api.github.com/users/xuguangxin/orgs","repos_url":"https://api.github.com/users/xuguangxin/repos","events_url":"https://api.github.com/users/xuguangxin/events{/privacy}","received_events_url":"https://api.github.com/users/xuguangxin/received_events","type":"User","site_admin":false},"body":"could we use READ?","created_at":"2016-09-02T01:52:51Z","updated_at":"2016-09-02T01:52:51Z","html_url":"https://github.com/01org/libyami/pull/546#discussion_r77283189","pull_request_url":"https://api.github.com/repos/01org/libyami/pulls/546","_links":{"self":{"href":"https://api.github.com/repos/01org/libyami/pulls/comments/77283189"},"html":{"href":"https://github.com/01org/libyami/pull/546#discussion_r77283189"},"pull_request":{"href":"https://api.github.com/repos/01org/libyami/pulls/546"}}},"pull_request":{"url":"https://api.github.com/repos/01org/libyami/pulls/546","id":83204875,"html_url":"https://github.com/01org/libyami/pull/546","diff_url":"https://github.com/01org/libyami/pull/546.diff","patch_url":"https://github.com/01org/libyami/pull/546.patch","issue_url":"https://api.github.com/repos/01org/libyami/issues/546","number":546,"state":"open","locked":false,"title":"h265parser: add check boundary for every read bits","user":{"login":"yizhouwei","id":21072199,"avatar_url":"https://avatars.githubusercontent.com/u/21072199?v=3","gravatar_id":"","url":"https://api.github.com/users/yizhouwei","html_url":"https://github.com/yizhouwei","followers_url":"https://api.github.com/users/yizhouwei/followers","following_url":"https://api.github.com/users/yizhouwei/following{/other_user}","gists_url":"https://api.github.com/users/yizhouwei/gists{/gist_id}","starred_url":"https://api.github.com/users/yizhouwei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yizhouwei/subscriptions","organizations_url":"https://api.github.com/users/yizhouwei/orgs","repos_url":"https://api.github.com/users/yizhouwei/repos","events_url":"https://api.github.com/users/yizhouwei/events{/privacy}","received_events_url":"https://api.github.com/users/yizhouwei/received_events","type":"User","site_admin":false},"body":"solve issue #526","created_at":"2016-08-30T03:58:20Z","updated_at":"2016-09-02T01:52:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ec7412d120670ea5b236889c0bba9d4de25e58eb","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/01org/libyami/pulls/546/commits","review_comments_url":"https://api.github.com/repos/01org/libyami/pulls/546/comments","review_comment_url":"https://api.github.com/repos/01org/libyami/pulls/comments{/number}","comments_url":"https://api.github.com/repos/01org/libyami/issues/546/comments","statuses_url":"https://api.github.com/repos/01org/libyami/statuses/4f8db496d72e14a468eddd5d8334abe561a31a59","head":{"label":"yizhouwei:apache","ref":"apache","sha":"4f8db496d72e14a468eddd5d8334abe561a31a59","user":{"login":"yizhouwei","id":21072199,"avatar_url":"https://avatars.githubusercontent.com/u/21072199?v=3","gravatar_id":"","url":"https://api.github.com/users/yizhouwei","html_url":"https://github.com/yizhouwei","followers_url":"https://api.github.com/users/yizhouwei/followers","following_url":"https://api.github.com/users/yizhouwei/following{/other_user}","gists_url":"https://api.github.com/users/yizhouwei/gists{/gist_id}","starred_url":"https://api.github.com/users/yizhouwei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yizhouwei/subscriptions","organizations_url":"https://api.github.com/users/yizhouwei/orgs","repos_url":"https://api.github.com/users/yizhouwei/repos","events_url":"https://api.github.com/users/yizhouwei/events{/privacy}","received_events_url":"https://api.github.com/users/yizhouwei/received_events","type":"User","site_admin":false},"repo":{"id":66904304,"name":"libyami","full_name":"yizhouwei/libyami","owner":{"login":"yizhouwei","id":21072199,"avatar_url":"https://avatars.githubusercontent.com/u/21072199?v=3","gravatar_id":"","url":"https://api.github.com/users/yizhouwei","html_url":"https://github.com/yizhouwei","followers_url":"https://api.github.com/users/yizhouwei/followers","following_url":"https://api.github.com/users/yizhouwei/following{/other_user}","gists_url":"https://api.github.com/users/yizhouwei/gists{/gist_id}","starred_url":"https://api.github.com/users/yizhouwei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yizhouwei/subscriptions","organizations_url":"https://api.github.com/users/yizhouwei/orgs","repos_url":"https://api.github.com/users/yizhouwei/repos","events_url":"https://api.github.com/users/yizhouwei/events{/privacy}","received_events_url":"https://api.github.com/users/yizhouwei/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yizhouwei/libyami","description":"Yet Another Media Infrastructure. it is core part of media codec with hardware acceleration, it is yummy to your video experience on Linux like platform.","fork":true,"url":"https://api.github.com/repos/yizhouwei/libyami","forks_url":"https://api.github.com/repos/yizhouwei/libyami/forks","keys_url":"https://api.github.com/repos/yizhouwei/libyami/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yizhouwei/libyami/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yizhouwei/libyami/teams","hooks_url":"https://api.github.com/repos/yizhouwei/libyami/hooks","issue_events_url":"https://api.github.com/repos/yizhouwei/libyami/issues/events{/number}","events_url":"https://api.github.com/repos/yizhouwei/libyami/events","assignees_url":"https://api.github.com/repos/yizhouwei/libyami/assignees{/user}","branches_url":"https://api.github.com/repos/yizhouwei/libyami/branches{/branch}","tags_url":"https://api.github.com/repos/yizhouwei/libyami/tags","blobs_url":"https://api.github.com/repos/yizhouwei/libyami/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yizhouwei/libyami/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yizhouwei/libyami/git/refs{/sha}","trees_url":"https://api.github.com/repos/yizhouwei/libyami/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yizhouwei/libyami/statuses/{sha}","languages_url":"https://api.github.com/repos/yizhouwei/libyami/languages","stargazers_url":"https://api.github.com/repos/yizhouwei/libyami/stargazers","contributors_url":"https://api.github.com/repos/yizhouwei/libyami/contributors","subscribers_url":"https://api.github.com/repos/yizhouwei/libyami/subscribers","subscription_url":"https://api.github.com/repos/yizhouwei/libyami/subscription","commits_url":"https://api.github.com/repos/yizhouwei/libyami/commits{/sha}","git_commits_url":"https://api.github.com/repos/yizhouwei/libyami/git/commits{/sha}","comments_url":"https://api.github.com/repos/yizhouwei/libyami/comments{/number}","issue_comment_url":"https://api.github.com/repos/yizhouwei/libyami/issues/comments{/number}","contents_url":"https://api.github.com/repos/yizhouwei/libyami/contents/{+path}","compare_url":"https://api.github.com/repos/yizhouwei/libyami/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yizhouwei/libyami/merges","archive_url":"https://api.github.com/repos/yizhouwei/libyami/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yizhouwei/libyami/downloads","issues_url":"https://api.github.com/repos/yizhouwei/libyami/issues{/number}","pulls_url":"https://api.github.com/repos/yizhouwei/libyami/pulls{/number}","milestones_url":"https://api.github.com/repos/yizhouwei/libyami/milestones{/number}","notifications_url":"https://api.github.com/repos/yizhouwei/libyami/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yizhouwei/libyami/labels{/name}","releases_url":"https://api.github.com/repos/yizhouwei/libyami/releases{/id}","deployments_url":"https://api.github.com/repos/yizhouwei/libyami/deployments","created_at":"2016-08-30T03:47:58Z","updated_at":"2016-08-30T03:48:00Z","pushed_at":"2016-08-31T08:20:18Z","git_url":"git://github.com/yizhouwei/libyami.git","ssh_url":"git@github.com:yizhouwei/libyami.git","clone_url":"https://github.com/yizhouwei/libyami.git","svn_url":"https://github.com/yizhouwei/libyami","homepage":null,"size":3678,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"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":0,"default_branch":"apache"}},"base":{"label":"01org:apache","ref":"apache","sha":"e57989fdfa59c448cf8f825fa093fbec0cdc04cf","user":{"login":"01org","id":1635439,"avatar_url":"https://avatars.githubusercontent.com/u/1635439?v=3","gravatar_id":"","url":"https://api.github.com/users/01org","html_url":"https://github.com/01org","followers_url":"https://api.github.com/users/01org/followers","following_url":"https://api.github.com/users/01org/following{/other_user}","gists_url":"https://api.github.com/users/01org/gists{/gist_id}","starred_url":"https://api.github.com/users/01org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/01org/subscriptions","organizations_url":"https://api.github.com/users/01org/orgs","repos_url":"https://api.github.com/users/01org/repos","events_url":"https://api.github.com/users/01org/events{/privacy}","received_events_url":"https://api.github.com/users/01org/received_events","type":"Organization","site_admin":false},"repo":{"id":18320220,"name":"libyami","full_name":"01org/libyami","owner":{"login":"01org","id":1635439,"avatar_url":"https://avatars.githubusercontent.com/u/1635439?v=3","gravatar_id":"","url":"https://api.github.com/users/01org","html_url":"https://github.com/01org","followers_url":"https://api.github.com/users/01org/followers","following_url":"https://api.github.com/users/01org/following{/other_user}","gists_url":"https://api.github.com/users/01org/gists{/gist_id}","starred_url":"https://api.github.com/users/01org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/01org/subscriptions","organizations_url":"https://api.github.com/users/01org/orgs","repos_url":"https://api.github.com/users/01org/repos","events_url":"https://api.github.com/users/01org/events{/privacy}","received_events_url":"https://api.github.com/users/01org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/01org/libyami","description":"Yet Another Media Infrastructure. it is core part of media codec with hardware acceleration, it is yummy to your video experience on Linux like platform.","fork":false,"url":"https://api.github.com/repos/01org/libyami","forks_url":"https://api.github.com/repos/01org/libyami/forks","keys_url":"https://api.github.com/repos/01org/libyami/keys{/key_id}","collaborators_url":"https://api.github.com/repos/01org/libyami/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/01org/libyami/teams","hooks_url":"https://api.github.com/repos/01org/libyami/hooks","issue_events_url":"https://api.github.com/repos/01org/libyami/issues/events{/number}","events_url":"https://api.github.com/repos/01org/libyami/events","assignees_url":"https://api.github.com/repos/01org/libyami/assignees{/user}","branches_url":"https://api.github.com/repos/01org/libyami/branches{/branch}","tags_url":"https://api.github.com/repos/01org/libyami/tags","blobs_url":"https://api.github.com/repos/01org/libyami/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/01org/libyami/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/01org/libyami/git/refs{/sha}","trees_url":"https://api.github.com/repos/01org/libyami/git/trees{/sha}","statuses_url":"https://api.github.com/repos/01org/libyami/statuses/{sha}","languages_url":"https://api.github.com/repos/01org/libyami/languages","stargazers_url":"https://api.github.com/repos/01org/libyami/stargazers","contributors_url":"https://api.github.com/repos/01org/libyami/contributors","subscribers_url":"https://api.github.com/repos/01org/libyami/subscribers","subscription_url":"https://api.github.com/repos/01org/libyami/subscription","commits_url":"https://api.github.com/repos/01org/libyami/commits{/sha}","git_commits_url":"https://api.github.com/repos/01org/libyami/git/commits{/sha}","comments_url":"https://api.github.com/repos/01org/libyami/comments{/number}","issue_comment_url":"https://api.github.com/repos/01org/libyami/issues/comments{/number}","contents_url":"https://api.github.com/repos/01org/libyami/contents/{+path}","compare_url":"https://api.github.com/repos/01org/libyami/compare/{base}...{head}","merges_url":"https://api.github.com/repos/01org/libyami/merges","archive_url":"https://api.github.com/repos/01org/libyami/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/01org/libyami/downloads","issues_url":"https://api.github.com/repos/01org/libyami/issues{/number}","pulls_url":"https://api.github.com/repos/01org/libyami/pulls{/number}","milestones_url":"https://api.github.com/repos/01org/libyami/milestones{/number}","notifications_url":"https://api.github.com/repos/01org/libyami/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/01org/libyami/labels{/name}","releases_url":"https://api.github.com/repos/01org/libyami/releases{/id}","deployments_url":"https://api.github.com/repos/01org/libyami/deployments","created_at":"2014-04-01T06:44:19Z","updated_at":"2016-08-19T16:44:33Z","pushed_at":"2016-09-01T09:50:57Z","git_url":"git://github.com/01org/libyami.git","ssh_url":"git@github.com:01org/libyami.git","clone_url":"https://github.com/01org/libyami.git","svn_url":"https://github.com/01org/libyami","homepage":null,"size":4949,"stargazers_count":39,"watchers_count":39,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":58,"mirror_url":null,"open_issues_count":29,"forks":58,"open_issues":29,"watchers":39,"default_branch":"apache"}},"_links":{"self":{"href":"https://api.github.com/repos/01org/libyami/pulls/546"},"html":{"href":"https://github.com/01org/libyami/pull/546"},"issue":{"href":"https://api.github.com/repos/01org/libyami/issues/546"},"comments":{"href":"https://api.github.com/repos/01org/libyami/issues/546/comments"},"review_comments":{"href":"https://api.github.com/repos/01org/libyami/pulls/546/comments"},"review_comment":{"href":"https://api.github.com/repos/01org/libyami/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/01org/libyami/pulls/546/commits"},"statuses":{"href":"https://api.github.com/repos/01org/libyami/statuses/4f8db496d72e14a468eddd5d8334abe561a31a59"}}}}
{"actor":{"display_login":"xuguangxin"}}