mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 08:13:04 +04:00
C-API cleanup: backport videoio changes from 5.x
This commit is contained in:
@@ -928,6 +928,17 @@ typedef hfloat float16_t;
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @brief Constructs the 'fourcc' code, used in video codecs and many other places.
|
||||
Simply call it with 4 chars like `CV_FOURCC('I', 'Y', 'U', 'V')`
|
||||
*/
|
||||
CV_INLINE int CV_FOURCC(char c1, char c2, char c3, char c4)
|
||||
{
|
||||
return (c1 & 255) + ((c2 & 255) << 8) + ((c3 & 255) << 16) + ((c4 & 255) << 24);
|
||||
}
|
||||
|
||||
//! Macro to construct the fourcc code of the codec. Same as CV_FOURCC()
|
||||
#define CV_FOURCC_MACRO(c1, c2, c3, c4) (((c1) & 255) + (((c2) & 255) << 8) + (((c3) & 255) << 16) + (((c4) & 255) << 24))
|
||||
|
||||
//! @}
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user