-
Notifications
You must be signed in to change notification settings - Fork 296
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
Add support to convert from NV12 and YUYV to RGB #825
Comments
@julienvalentin do you plan to expand color conversion namespace in tf.graphics or move It in tf.image? |
This PR adds support of decode_yuy2 to allow convert yuy2 to rgb. This is useful for Video Capture in Linux (Video4Linux2) as the default format is YUYV. This PR fixes tensorflow#825 Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This PR adds support of decode_yuy2 to allow convert yuy2 to rgb. This is useful for Video Capture in Linux (Video4Linux2) as the default format is YUYV. This PR fixes tensorflow#825 Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This PR adds support of decode_yuy2 to allow convert yuy2 to rgb. This is useful for Video Capture in Linux (Video4Linux2) as the default format is YUYV. This PR fixes tensorflow#825 Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This PR adds support of decode_yuy2 to allow convert yuy2 to rgb. This is useful for Video Capture in Linux (Video4Linux2) as the default format is YUYV. This PR fixes tensorflow#825 Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This PR adds support of decode_yuy2 to allow convert yuy2 to rgb. This is useful for Video Capture in Linux (Video4Linux2) as the default format is YUYV. This PR fixes tensorflow#825 Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Let me reopen this one for the following comment:
|
I don't know if we would depend on nv12 for nvidia GPU. I suppose that also intel on linux support that in https://github.com/intel/libva. |
Yes this is super interesting also for other image processing ops that are landing in Addons PRs. Can you share something more about this topic (MLIR tensorflow-io integration)? |
@bhack We are still in exploration mode.. but will circle back soon. |
Let me know |
/cc @antiagainst As he is active in MLIR but also in the Vlukan ML WG. Seems that Vulkan announced HW video enc/dec for H1 2020 https://www.khronos.org/assets/uploads/apis/Vulkan-1-2-Launch_Jan20.pdf |
* Add decode_nv12 to allow convert nv12 to rgb This PR adds support of decode_nv12 decode_nv12 to allow convert nv12 to rgb. This is useful for Video Capture and MP4 decoding on macOS, as macOS's default pixel format is NV12 (hardware-accelerated) This PR fixes 825 Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Add decode_yuy2 (YUYV/YUY2/YUYV422) support This PR adds support of decode_yuy2 to allow convert yuy2 to rgb. This is useful for Video Capture in Linux (Video4Linux2) as the default format is YUYV. This PR fixes tensorflow#825 Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
hello, may i ask how to use this function? i tried to use it in tensorflow 1.14.0 like |
Video capture has been supported in tensorflow-io (see PR #821), through Video4Linux on Linux and AVFoundation on macOS. Now we are able to extract video captures and output raw image format as a Dataset.
The raw format, by default, is kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange (NV12) on macOS, and V4L2_PIX_FMT_YUYV (YUYV) on Linux, they will need to be converted to RGB so that they could be further processed by tf's common ops.
This is an issue to track the progress for NV12 and YUYV support.
/cc @bhack
The text was updated successfully, but these errors were encountered: