Coverage for linuxpy/video/util.py: 100%

4 statements  

« prev     ^ index     » next       coverage.py v7.6.1, created at 2024-10-18 07:40 +0200

1# 

2# This file is part of the linuxpy project 

3# 

4# Copyright (c) 2023 Tiago Coutinho 

5# Distributed under the GPLv3 license. See LICENSE for more info. 

6 

7 

8def v4l2_fourcc(a, b, c, d): 

9 return ord(a) | (ord(b) << 8) | (ord(c) << 16) | (ord(d) << 24) 

10 

11 

12def v4l2_fourcc_be(a, b, c, d): 

13 return (v4l2_fourcc(a, b, c, d)) | (1 << 31)