summaryrefslogtreecommitdiff
path: root/test/ipc/unixsocket.cpp
diff options
context:
space:
mode:
authorUmang Jain <umang.jain@ideasonboard.com>2022-07-13 17:45:34 +0530
committerUmang Jain <umang.jain@ideasonboard.com>2022-07-19 21:43:35 +0530
commit9eb8211160de2e0a879cc5e0b38f50137df989ce (patch)
tree655d52f1265c3d0e64927525b07e8c17fffe988b /test/ipc/unixsocket.cpp
parentf995ff25a3326db90513d1fa936815653f7cade0 (diff)
utils: ipu3-pack: Provide a 10-bit bayer packing utility
Provide a 10-bit bayer packing utility for the unpacked data produced by ipu3-unpack. Usage: ipu3-unpack input-file output-file The output-file can be "-" to pack the data to stdout. The output file generated by ipu3-pack can be directly fed to IMGU for streaming. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'test/ipc/unixsocket.cpp')
0 files changed, 0 insertions, 0 deletions
import os if len(sys.argv) != 2: print("Usage: {} <infile>".format(sys.argv[0])) sys.exit() infile = sys.argv[1] insplit = os.path.splitext(infile) outfile = insplit[0] + '_parsed' + insplit[1] frame_re = re.compile(r'frame (\d+) started') delays = { 'Analogue Gain': 1, 'Exposure': 2, 'Vertical Blanking': 2 } ctrl_action = { 'Write': {}, 'Get': {}, 'Queue': {}, 'No-op': {} } ctrl_re = { 'Write': re.compile(r'Setting (.*?) to (\d+) at index (\d+)'), 'No-op': re.compile(r'Queue is empty, (.*?) (.*?) (.*?)'), 'Get': re.compile(r'Reading (.*?) to (\d+) at index (\d+)'), 'Queue': re.compile(r'Queuing (.*?) to (\d+) at index (\d+)') } frame_num = -1 max_delay = 0 for k, d in delays.items(): if max_delay < d: max_delay = d with open(infile) as f: lines = f.readlines() for line in lines: r = frame_re.search(line) if r: frame_num = int(r.group(1)) for (key, re) in ctrl_re.items(): r = re.search(line) if r: ctrl_action[key][(frame_num, r.group(1))] = (r.group(2), r.group(3))