-
Notifications
You must be signed in to change notification settings - Fork 615
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
ImageDecoder libtiff implementation #1264
Conversation
Signed-off-by: Joaquin Anton <janton@nvidia.com>
Signed-off-by: Joaquin Anton <janton@nvidia.com>
Signed-off-by: Joaquin Anton <janton@nvidia.com>
Signed-off-by: Joaquin Anton <janton@nvidia.com>
a7b1c31
to
a8e2b80
Compare
Signed-off-by: Joaquin Anton <janton@nvidia.com>
Signed-off-by: Joaquin Anton <janton@nvidia.com>
Signed-off-by: Joaquin Anton <janton@nvidia.com>
CI MESSAGE: [907590]: BUILD STARTED |
Signed-off-by: Joaquin Anton <janton@nvidia.com>
1fafb69
to
83f1475
Compare
CI MESSAGE: [907594]: BUILD STARTED |
Signed-off-by: Joaquin Anton <janton@nvidia.com>
CI MESSAGE: [907594]: BUILD FAILED |
!build |
CI MESSAGE: [907791]: BUILD STARTED |
CI MESSAGE: [907791]: BUILD FAILED |
Signed-off-by: Joaquin Anton <janton@nvidia.com>
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.
That's incorrect design here.
IMHO You should leverage the object-oriented design and do it like:
image_factory.cc
std::unique_ptr<Image>
ImageFactory::CreateImage(const uint8_t *encoded_image, size_t length, DALIImageType image_type) {
[...]
} else if (CheckIsTiff(encoded_image, length)) {
if (DALI_USE_LIBTIFF)
return std::make_unique<TiffImage_LibTiff>(encoded_image, length, image_type);
return std::make_unique<TiffImage>(encoded_image, length, image_type);
}
[...]
}
And create class TiffImage_LibTiff : public TiffImage
. That way, PeekDims
is the same for both implementation (which I think it should be), fallback for OpenCV is guaranteed and you only write DecodeImpl
function.
CI MESSAGE: [907825]: BUILD STARTED |
CI MESSAGE: [907825]: BUILD FAILED |
Signed-off-by: Joaquin Anton <janton@nvidia.com>
I agree. Fixed |
5bc4017
to
4e94ec5
Compare
CI MESSAGE: [908043]: BUILD STARTED |
Signed-off-by: Joaquin Anton <janton@nvidia.com>
ec8e037
to
6bdc239
Compare
CI MESSAGE: [908055]: BUILD STARTED |
CI MESSAGE: [908089]: BUILD STARTED |
CI MESSAGE: [908055]: BUILD FAILED |
CI MESSAGE: [908110]: BUILD STARTED |
CI MESSAGE: [908089]: BUILD FAILED |
CI MESSAGE: [908110]: BUILD FAILED |
Signed-off-by: Joaquin Anton <janton@nvidia.com>
CI MESSAGE: [909512]: BUILD STARTED |
CI MESSAGE: [909527]: BUILD STARTED |
CI MESSAGE: [909536]: BUILD STARTED |
|
||
const auto ifd_offset = buffer.Read<uint32_t>(4); | ||
const auto entry_count = buffer.Read<uint16_t>(ifd_offset); | ||
bool width_read = false, height_read = false; | ||
size_t width, height; | ||
size_t width = 0, height = 0; |
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.
Just change the type here to int64_t and avoid the cast in return?
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.
Will take care of it in #1280
CI MESSAGE: [909527]: BUILD FAILED |
|
||
#define DALI_ERROR(str) \ |
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.
Either align the backslashes
if (a) \
asdf \
or move them to one space after end of line
if (a) \
asdf \
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.
Will do in #1280
CI MESSAGE: [909536]: BUILD FAILED |
CI MESSAGE: [909602]: BUILD STARTED |
CI MESSAGE: [909602]: BUILD PASSED |
CI MESSAGE: [909708]: BUILD STARTED |
CI MESSAGE: [909708]: BUILD FAILED |
CI MESSAGE: [909602]: BUILD PASSED |
Signed-off-by: Joaquin Anton <janton@nvidia.com> Signed-off-by: Jianjun Liu <00liujj@163.com>
Signed-off-by: Joaquin Anton janton@nvidia.com
Why we need this PR?
What happened in this PR?
JIRA TASK: [DALI-1038]