-
Notifications
You must be signed in to change notification settings - Fork 607
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
Improve error handling in LibTiffDecoder #4210
Conversation
Signed-off-by: Szymon Karpiński <skarpinski@nvidia.com>
DecodeResult LibTiffDecoderInstance::Decode(SampleView<CPUBackend> out, ImageSource *in, | ||
DecodeParams opts, const ROI &requested_roi) { |
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 already out of date due to API changes. Also, please implement DecodeTaskImpl nistead of DecodeImpl, as it is required by ScheduleDecode.
Signed-off-by: Joaquin Anton <janton@nvidia.com>
Signed-off-by: Szymon Karpiński <skarpinski@nvidia.com>
Signed-off-by: Joaquin Anton <janton@nvidia.com>
f0dade1
to
47792e3
Compare
Signed-off-by: Joaquin Anton <janton@nvidia.com>
47792e3
to
81bea7d
Compare
@@ -114,10 +114,12 @@ struct TiffInfo { | |||
uint16_t bit_depth; | |||
uint16_t orientation; | |||
uint16_t compression; | |||
uint16_t photometric; |
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.
Nitpick: the name sounds as if it's a boolean predicate - I'd expect a noun.
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.
Done
Signed-off-by: Joaquin Anton <janton@nvidia.com>
Signed-off-by: Joaquin Anton <janton@nvidia.com>
Signed-off-by: Joaquin Anton <janton@nvidia.com>
!build |
CI MESSAGE: [5958401]: BUILD STARTED |
CI MESSAGE: [5958401]: BUILD PASSED |
While testing LibTiffDecoder, I've identified two major problems with error handling there: Corrupted (or exotic, unsupported) files will cause an exception, which would kill the pipeline. In this PR I add a bulk catch to gracefully handle those and allow for a fallback instead of killing the pipeline Not enough checks were made at the beginning and as a result TIFFs that we couldn't decode correctly (planar or with non-standard photometric interpretation) were not rejected. In this PR I add checks for those Signed-off-by: Szymon Karpiński <skarpinski@nvidia.com>
Category:
Bug fix (non-breaking change which fixes an issue)
Description:
While testing LibTiffDecoder, I've identified two major problems with error handling there:
catch
to gracefully handle those and allow for a fallback instead of killing the pipelineAdditional information:
Affected modules and functionalities:
LibTiffDecoder
Key points relevant for the review:
Tests:
I added an extra test with an incomplete input, which should cause
InputStream
to throw an exception.Checklist
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: DALI-2981