Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
raw [2020/03/30 01:06] – [GRAY8 vs RTP] yair | raw [2024/06/30 17:30] (current) – yair | ||
---|---|---|---|
Line 1: | Line 1: | ||
====GRAY8 vs RTP==== | ====GRAY8 vs RTP==== | ||
**problem**: | **problem**: | ||
- | single plane raw formats are not part of [[https:// | + | single plane raw formats are not part of [[https:// |
**solution**: | **solution**: | ||
- | a missing channel in any image format is **just a convention**, | + | an image format is **just a convention**, |
view the image format as just a stream of octets. here is our stream in Y8 format | view the image format as just a stream of octets. here is our stream in Y8 format | ||
Line 15: | Line 15: | ||
| | ||
+ | note the above represents two sequential pixels. | ||
- | map the GRAY8 **one plane** source into a quarter width **four plane** RGBA output image\\ | + | the trick is to use gstreamer built in [[https:// |
- | we will then remap it to Y8 on the receiving side. \\ | + | |
- | the trick is to use gstreamer built in format | + | |
the [[https:// | the [[https:// | ||
Line 41: | Line 40: | ||
and YUV doesnt use the entire 0-255 space. [[https:// | and YUV doesnt use the entire 0-255 space. [[https:// | ||
+ | **note2**: this example is running on linux/ | ||
+ | to adapt to windows using powershell replace '' | ||
+ | place quotes around | ||
Line 68: | Line 70: | ||
</ | </ | ||
| | ||
- | |||
- | ====raw parsing==== | ||
- | <code c> | ||
- | gst-launch-1.0 videotestsrc pattern=white num-buffers=1 \ | ||
- | ! video/ | ||
- | ! identity dump=1 \ | ||
- | ! filesink location=white.gray8 -q | ||
- | |||
- | gst-launch-1.0 | ||
- | ! rawvideoparse format=rgba width=1 height=4 \ | ||
- | ! identity dump=1 \ | ||
- | ! filesink location=white.rgba -q | ||
- | </ | ||
====strides and offsets==== | ====strides and offsets==== | ||
- | we dont need to dig into the following as we use the capabilities as listed in [[https:// | + | there are caveats |
- | but hopefully this section will advance your understanding. | + | |
Line 220: | Line 208: | ||
</ | </ | ||
- | [[https:// | + | [[https:// |
+ | [[https:// | ||