-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[I420 color conversion] I420toRGB/I420toBGR reference implementation #8605
[I420 color conversion] I420toRGB/I420toBGR reference implementation #8605
Conversation
Common plugin tests CPU compliance tests Serialization tests
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.
Looks good with few comments. Agree to merge as is
namespace ngraph { | ||
namespace op { | ||
namespace v8 { | ||
using ov::op::v8::I420toRGB; |
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.
Why do we add it to old structure?
It has no legacy place, so it seems we can only keep it in openvino/
folder
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.
@ilyachur Can you comment on this?
For NV12, you've requested to have such aliases in 'ngraph' namespace. See #7601 (comment)
if (!shape_uv[i420_op::H_DIM].is_dynamic()) { | ||
shape_uv[i420_op::H_DIM] *= 2; | ||
} | ||
if (!shape_uv[i420_op::W_DIM].is_dynamic()) { | ||
shape_uv[i420_op::W_DIM] *= 2; | ||
} |
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.
Basically we can multiply dimensions without checking if it is dynamic. Please see
if (!shape_uv[i420_op::H_DIM].is_dynamic()) { | |
shape_uv[i420_op::H_DIM] *= 2; | |
} | |
if (!shape_uv[i420_op::W_DIM].is_dynamic()) { | |
shape_uv[i420_op::W_DIM] *= 2; | |
} | |
shape_uv[i420_op::H_DIM] *= 2; | |
shape_uv[i420_op::W_DIM] *= 2; |
Feel free to change it in the next PR -- as you stated in the description there will be a follow up PR.
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 propose to use new evaluate API
} | ||
}; | ||
|
||
TEST_F(ReferenceConvertColorI420LayerTest, CompareWithHardcodedRefs_r_u8_single_rgb) { |
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.
Looks like you can use parametrized tests
bool visit_attributes(AttributeVisitor& visitor) override; | ||
|
||
OPENVINO_SUPPRESS_DEPRECATED_START | ||
bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override; |
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 think we can use new evaluate API
…penvinotoolkit#8605) * ngraph part * Template reference tests Common plugin tests CPU compliance tests Serialization tests * Clang format fixes * Remove reference implementation for f16, bf16, f64 types * Fix ninja build * Fix opset8_dump test * Fix opset8_dump test * Fix CentOS build * Removed Myriad preprocessing tests (to be added by separate PR)
…penvinotoolkit#8605) * ngraph part * Template reference tests Common plugin tests CPU compliance tests Serialization tests * Clang format fixes * Remove reference implementation for f16, bf16, f64 types * Fix ninja build * Fix opset8_dump test * Fix opset8_dump test * Fix CentOS build * Removed Myriad preprocessing tests (to be added by separate PR)
Details:
TODO:
Tickets: