-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Range Coder and Golomb Rice pseudo-code formatting #196
Conversation
bump ;-) |
Other codec specifications from mpeg4 asp to h265 put pseudocode like if() interspaced with bitstream stuff in tables. So iam a bit reluctant to apply this as it would move us away from that "look" |
d98818e
to
69da236
Compare
I close this PR for the moment and send this feedback to IETF reviewers. |
hmmm... I reopen this PR, for the remaining commit proposal, as I was actually not myself convinced while preparing my answer to AD review. We have 2 different parts impacted about this "type" column, "Sample Coding" and "Bitstream".
@michaelni please comment/review again. |
put_symbol() doesnt fit very well to get_ur_golomb. |
I don't get it, could you explain a bit more? |
one is write and one is read, that is not consistant |
also its the bitstream and reading that is specified so it should all be read |
8a6eef2
to
eab78e7
Compare
The PR was intended for formatting only, without change in the content (planned in a future PR after this one is merged). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to unify either to
if ( ... ) {
something;
}
or to:
if ( ... )
something;
but not to mix the two coding styles.
eab78e7
to
7fb55b3
Compare
This was my goal, but I forgot at one place, if I miss nothing else. Fixed. |
I’m sorry to be picky, but here reads: }
else { and in other places: } else { |
7fb55b3
to
73704e0
Compare
Fixed. |
ffv1.md
Outdated
``` | ||
Figure: A pseudo-code description of the contexts of Range Non Binary Values. {#figureRangeNonBinaryValueExample} | ||
|
||
`put_symbol` is used during the process of (#coding-of-the-sample-difference). | ||
`get_symbol` is used during the process of (#coding-of-the-sample-difference). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This becomes rendered as:
"get_symbol" is used during the process of Section 3.8.
but currently we are in a subsection of Section 3.8 so the reference feels circular.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but currently we are in a subsection of Section 3.8 so the reference feels circular.
Not really circular, the idea is to link the introduction of this section.
I added a commit for referencing the figure in the introduction of this section, for being more precise.
|
||
`put_rac` is the process described in (#range-binary-values). | ||
`get_rac` is the process described in (#range-binary-values). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is rendered as
"get_rac" is the process described in Section 3.8.1.1.
But Section 3.8.1.1 refers to several processes. Could we add a "Figure" label to the process you mean and cross-reference that rather than the whole section. For instance, see how {#figureRelativeSampleNames}
is cited.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But Section 3.8.1.1 refers to several processes.
IMO get_rac
is for all figures in the section, which describe a single process, so the link is correct. I don't see a better way to link, @michaelni would you have a suggestion here about how to improve this description?
I think that no modification is necessary here, and all other issues are fixed, please review again.
ffv1.md
Outdated
return get_bits(bits) + 11 | ||
} | ||
``` | ||
Figure: A pseudo-code description of the read of an unsigned integer in Golomb Rice mode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other Figure labels are terminated with .
, I suggest that here too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other Figure labels are terminated with ., I suggest that here too.
Fixed
ffv1.md
Outdated
} | ||
``` | ||
Figure: A pseudo-code description of the read of a signed integer in Golomb Rice mode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other Figure labels are terminated with .
, I suggest that here too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other Figure labels are terminated with ., I suggest that here too.
Fixed
73704e0
to
5370432
Compare
ffv1.md
Outdated
int get_ur_golomb(k) { | ||
for (prefix = 0; prefix < 12; prefix++) { | ||
if (get_bits(1)) { | ||
return get_bits(k) + (prefix << k) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a ;
to make the pseudo-compiler happy? (also at 613; it’s done at 621-622)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a
;
to make the pseudo-compiler happy? (also at 613; it’s done at 621-622)
Modified (not "fixed" because it was in the current version :-p).
5370432
to
22dc258
Compare
From IETF review, The "type" column here appears superfluous in theses locations.
ur
andsr
namings are clarified by splitting the pseudo-code in 2 parts + a name for each part.log2_run
is actually an array.