Adding a new emscripten js method to parse depth images#1029
Adding a new emscripten js method to parse depth images#1029Dakantz wants to merge 1871 commits intostrukturag:masterfrom
Conversation
|
Thanks. One thing, though: your PR contains a lot of code reformatting in unrelated parts. Could you please clean up the PR such that only your new code is contained? Also make sure not to merge "master" into your branch. This will make the history unnecessarily complicated. |
|
Sorry for the merge and formatting mistake, should be fixed now! This is one of my first PRs 😅 I hope it can be merged now! |
| return depth_result; | ||
| } | ||
|
|
||
| depth_result.set("testdata", emscripten::val(emscripten::typed_memory_view(10, "123456890"))); |
There was a problem hiding this comment.
looks like this is a leftover from testing
| depth_result.set("data", emscripten::val(emscripten::typed_memory_view(stride * height, plane))); | ||
| depth_result.set("buffersize", stride * height); | ||
| depth_result.set("channel", channel); | ||
| depth_result.set("testdata", emscripten::val(emscripten::typed_memory_view(10, "123456890"))); |
|
@EzraH442 Could you please do a review on this PR (only the changes in the file |
| { | ||
| depth_result.set("err", "could not get handle of depth image"); | ||
| depth_result.set("id", depth_image_id); | ||
| return depth_result; | ||
| } |
| depth_result.set("err", "could not get image of depth image"); | ||
| depth_result.set("msg", err.message); | ||
| depth_result.set("id", depth_image_id); | ||
| return depth_result; |
| heif_item_id *ids = (heif_item_id *)malloc(n_images * sizeof(heif_item_id)); | ||
|
|
There was a problem hiding this comment.
Also here there should be a check to make sure the malloc didn't return a null pointer, similar to here
| depth_result.set("id", depth_image_id); | ||
| return depth_result; | ||
| } | ||
| static emscripten::val heif_js_get_depth_imgs_decoded(struct heif_image_handle *handle) |
There was a problem hiding this comment.
based on what this function does a better name might be heif_js_image_handle_get_depth_img_handle, since it doesn't actually do any image decoding
| } | ||
| } | ||
|
|
||
| depth_result.set("err", "could get no plane of depth image"); |
There was a problem hiding this comment.
This might be a little bit pedantic but I'd rephrase this error message to "could not get plane of depth image"
Ensures a fail-fast approach as used with other boxes
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v4...v5) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
NV12 data. "Full range" means that the pixel data ranges from 0 to 255. "Limited range" means that it's using a more constrained range, such as 16 to 235. Because the range is being clamped, it prevents images decoded with the VideoDecoder API from using the full range of color. Notably, this caused fully transparent backgrounds to be light gray due to the bottom end of the range starting at 16 instead of 0. Also, explicilty handle the mono image channel used to encode transparency information in HEIC images. Lastly, add the copyright header to decoder_webcodecs.h.
the decoded tiles. Remove custom limited range color remapping that was being done in the plugin.
range. The browser VideoDecoder API may return limited range color data even when the input source is using full range. The webcodecs plugin corrects for this by inspecting whether the output is encoded in full range or not. Note that if the original source is using limited range that this scaling could cause libheif to scale the data again when converting to RGB. This isn't easy to avoid at this time b/c plugins don't know whether the input source is using limited range or not. While it is technically present in the VUI SPS data, it is rather complicated to parse this structure as a one-off.
Signed-off-by: Dinika Saxena <dinika@greyllama.cc>
…tz/libheif into feature/emscripten-fixes-and-depth
|
I think you should revert your push of 1870 commits :-) |
Adding a new emscripten js method to parse depth images