예제 #1
0
파일: py_test.py 프로젝트: spillai/scanner
def test_slice(cl):
    input = NamedVideoStream(cl, 'test1')
    frame = cl.io.Input([input])
    slice_frame = cl.streams.Slice(frame, partitions=[cl.partitioner.all(50)])
    unsliced_frame = cl.streams.Unslice(slice_frame)
    output = NamedStream(cl, 'test_slicing')
    output_op = cl.io.Output(unsliced_frame, [output])
    cl.run(output_op,
           PerfParams.estimate(),
           cache_mode=CacheMode.Overwrite,
           show_progress=False)
    assert input.len() == output.len()
예제 #2
0
파일: py_test.py 프로젝트: spillai/scanner
def test_unbounded_state(cl):
    input = NamedVideoStream(cl, 'test1')
    frame = cl.io.Input([input])
    slice_frame = cl.streams.Slice(frame, partitions=[cl.partitioner.all(50)])
    increment = cl.ops.TestIncrementUnbounded(ignore=slice_frame)
    unsliced_increment = cl.streams.Unslice(increment)
    output = NamedStream(cl, 'test_unbounded_state')
    output_op = cl.io.Output(unsliced_increment, [output])
    cl.run(output_op,
           PerfParams.estimate(),
           cache_mode=CacheMode.Overwrite,
           show_progress=False)
    assert output.len() == input.len()