Replace boost::filter_iterator with explicit iterator implementation#2312
Conversation
daa8cb8 to
2d2e524
Compare
|
Filed as internal issue #USD-8056 |
2d2e524 to
465d5db
Compare
465d5db to
1997562
Compare
There was a problem hiding this comment.
I'm pretty sure you have this inverted. According to the boost filter_iterator documentation, the iterator retains the element if the predicate returns true and skips the element if the predicate is false. Here, you're skipping when the predicate is true.
There was a problem hiding this comment.
That was it. All tests are now passing.
There was a problem hiding this comment.
These shouldFilter and filter functions aren't here for API conformance right? If I'm right, they should follow our coding conventions for private methods, i.e. capitalized and starting with an underscore
There was a problem hiding this comment.
The body of all three of these should be on a new line like you did for all the rest of the functions.
1997562 to
bce13c5
Compare
…ationStudios#2312) The B44 and B44A decoder and encoder use channel width (`nx`) and height (`ny`) in row pointer math. `nx` and `ny` are `int`; the scratch buffer is correctly sized with `(uint64_t)ny * (uint64_t)nx * bytes_per_element`, but row bases were computed as: ``` row0 = (uint16_t*)scratch; row0 += y * nx; // int * int -> signed overflow when y*nx > INT_MAX ``` For large `nx` (e.g. 268435456), `y*nx` overflows, so `row0`/`row1`/`row2`/`row3` point before the scratch buffer. Fix: compute the row offset in `uint64_t` before pointer arithmetic in both `uncompress_b44_impl` (decoder) and `compress_b44_impl` (encoder). Analysis and solution with the help of Curor / Claude Opus 4.5 Signed-off-by: Cary Phillips <cary@ilm.com>
Description of Change(s)
Converts the
_Predicateprivate class into an explicit_FilterIteratorbidirectional iterator implementation.Fixes Issue(s)
boost::filter_iteratorusage with fully specified iterator class #2311