Handbook
Glossary
fake-data ( -- rgb yuv )
Vocabulary
benchmark
.
yuv-to-rgb
Inputs
None
Outputs
rgb
an
object
yuv
an
object
Definition
USING:
accessors
alien.data
byte-arrays
classes.struct
kernel
libc
math
sequences
;
IN:
benchmark.yuv-to-rgb
::
fake-data
( -- rgb yuv )
1600
:>
w 1200
:>
h
yuv-buffer
<struct>
:>
buffer w h
*
3
*
<byte-array>
:>
rgb rgb buffer w
>>y_width
h
>>y_height
h
>>uv_height
w
>>y_stride
w
>>uv_stride
w h
*
<iota>
[
dup
*
]
B{
}
map-as
malloc-byte-array
&free
>>y
w h
*
2/
<iota>
[
dup
dup
*
*
]
B{
}
map-as
malloc-byte-array
&free
>>u
w h
*
2/
<iota>
[
dup
*
dup
*
]
B{
}
map-as
malloc-byte-array
&free
>>v
;