You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this is about 0.10 branch as senpai is not buildable for me.
nokhwa-bindings-macos seems to map both of kCMVideoCodecType_422YpCbCr8 and kCMPixelFormat_422YpCbCr8_yuvs to FrameFormat::YUYV.
according to apple docs, kCMVideoCodecType_422YpCbCr8 is "ordered Cb Y'0 Cr Y'1" and kCMPixelFormat_422YpCbCr8_yuvs is "ordered Y'0 Cb Y'1 Cr."
on the other hand, buf_yuyv422_to_rgb seems assuming the latter ordering.
on my environment (MacBook Pro (15-inch, 2018)) the camera on the top of the display seems to report kCMPixelFormat_422YpCbCr8_yuvs. (confirmed by adding debug code in raw_fcc_to_frameformat)
however, for some reasons, using the threaded-capture example, the buffers given to the callback actually seem to contain bytes in "Cb Y'0 Cr Y'1" order. (thus decoded wrong.)
on my environment (MacBook Pro (15-inch, 2018)) the camera on the top of the display seems to report kCMPixelFormat_422YpCbCr8_yuvs. (confirmed by adding debug code in raw_fcc_to_frameformat)
however, for some reasons, using the threaded-capture example, the buffers given to the callback actually seem to contain bytes in "Cb Y'0 Cr Y'1" order. (thus decoded wrong.)
this is about
0.10
branch assenpai
is not buildable for me.nokhwa-bindings-macos
seems to map both ofkCMVideoCodecType_422YpCbCr8
andkCMPixelFormat_422YpCbCr8_yuvs
toFrameFormat::YUYV
.according to apple docs,
kCMVideoCodecType_422YpCbCr8
is "ordered Cb Y'0 Cr Y'1" andkCMPixelFormat_422YpCbCr8_yuvs
is "ordered Y'0 Cb Y'1 Cr."on the other hand,
buf_yuyv422_to_rgb
seems assuming the latter ordering.on my environment (MacBook Pro (15-inch, 2018)) the camera on the top of the display seems to report
kCMPixelFormat_422YpCbCr8_yuvs
. (confirmed by adding debug code inraw_fcc_to_frameformat
)however, for some reasons, using the
threaded-capture
example, the buffers given to the callback actually seem to contain bytes in "Cb Y'0 Cr Y'1" order. (thus decoded wrong.)cf.
https://developer.apple.com/documentation/coremedia/1564239-video_codec_constants/kcmvideocodectype_422ypcbcr8
https://developer.apple.com/documentation/coremedia/1564244-video_pixel_format_constants/kcmpixelformat_422ypcbcr8_yuvs
The text was updated successfully, but these errors were encountered: