EGL/OpenGL scaler and colorspace conversion pipeline.
More...
#include <src/platform/linux/graphics.h>
|
| void | apply_colorspace (const video::sunshine_colorspace_t &colorspace, bool is_yuv444) |
| | Apply the configured colorspace metadata to the active frame.
|
| |
| int | blank (gl::frame_buf_t &fb, int offsetX_, int offsetY_, int width, int height, bool is_yuv444) |
| | Clear the render target to a blank frame.
|
| |
| int | convert_nv12 (gl::frame_buf_t &fb) |
| | Convert the loaded source image into NV12 output planes.
|
| |
| int | convert_yuv444 (gl::frame_buf_t &fb) |
| | Convert the loaded source image into YUV444 output planes.
|
| |
| int | draw_programs_to_buffers (GLenum attachments[], gl::frame_buf_t &fb, int count, bool is_yuv444) |
| | Render the loaded source texture into output framebuffers.
|
| |
| void | load_ram (platf::img_t &img) |
| | Load ram data from the backing API or store.
|
| |
| void | load_vram (img_descriptor_t &img, int offset_x, int offset_y, int texture, bool is_yuv444) |
| | Load vram data from the backing API or store.
|
| |
|
| static std::optional< sws_t > | make (int in_width, int in_height, int out_width, int out_height, AVPixelFormat format, bool is_yuv444) |
| | Allocate the underlying object and wrap it in the owning handle.
|
| |
| static std::optional< sws_t > | make_nv12 (int in_width, int in_height, int out_width, int out_height, gl::tex_t &&tex) |
| | Create a software-scaling pipeline that renders to NV12 planes.
|
| |
| static std::optional< sws_t > | make_yuv444 (int in_width, int in_height, int out_width, int out_height, gl::tex_t &&tex) |
| | Create a software-scaling pipeline that renders to YUV444 planes.
|
| |
|
|
gl::buffer_t | color_matrix |
| | Color matrix.
|
| |
|
gl::frame_buf_t | copy_framebuffer |
| | Copy framebuffer.
|
| |
|
gl::frame_buf_t | cursor_framebuffer |
| | Cursor framebuffer.
|
| |
|
int | in_height |
| | In height.
|
| |
|
int | in_width |
| | In width.
|
| |
|
int | loaded_texture |
| | Loaded texture.
|
| |
|
int | offsetX |
| | Offset x.
|
| |
|
int | offsetY |
| | Offset y.
|
| |
|
int | out_height |
| | Out height.
|
| |
|
int | out_width |
| | Out width.
|
| |
|
std::array< gl::program_t, 4 > | program |
| | Program.
|
| |
|
std::uint64_t | serial |
| | Serial.
|
| |
|
gl::tex_t | tex |
| | Source and cursor textures used by the conversion pipeline.
|
| |
EGL/OpenGL scaler and colorspace conversion pipeline.
◆ apply_colorspace()
Apply the configured colorspace metadata to the active frame.
- Parameters
-
| colorspace | Colorimetry information used for conversion or encoding. |
| is_yuv444 | Is YUV444. |
◆ blank()
| int egl::sws_t::blank |
( |
gl::frame_buf_t & | fb, |
|
|
int | offsetX_, |
|
|
int | offsetY_, |
|
|
int | width, |
|
|
int | height, |
|
|
bool | is_yuv444 ) |
Clear the render target to a blank frame.
- Parameters
-
| fb | Framebuffer object to bind or update. |
| offsetX_ | Offset x. |
| offsetY_ | Offset y. |
| width | Frame or display width in pixels. |
| height | Frame or display height in pixels. |
| is_yuv444 | Is YUV444. |
- Returns
- 0 when the target area is cleared; nonzero on OpenGL failure.
◆ convert_nv12()
Convert the loaded source image into NV12 output planes.
- Parameters
-
| fb | Framebuffer object to bind or update. |
- Returns
- Conversion status.
◆ convert_yuv444()
Convert the loaded source image into YUV444 output planes.
- Parameters
-
| fb | Framebuffer object to bind or update. |
- Returns
- Conversion status.
◆ draw_programs_to_buffers()
| int egl::sws_t::draw_programs_to_buffers |
( |
GLenum | attachments[], |
|
|
gl::frame_buf_t & | fb, |
|
|
int | count, |
|
|
bool | is_yuv444 ) |
Render the loaded source texture into output framebuffers.
- Parameters
-
| attachments | Framebuffer attachments to bind. |
| fb | Framebuffer object to bind or update. |
| count | Number of output planes to draw. |
| is_yuv444 | Whether to render three YUV444 planes instead of NV12 planes. |
- Returns
- 0 when all draw calls complete; nonzero on OpenGL failure.
◆ load_ram()
Load ram data from the backing API or store.
- Parameters
-
| img | Image or frame object to read from or populate. |
◆ load_vram()
| void egl::sws_t::load_vram |
( |
img_descriptor_t & | img, |
|
|
int | offset_x, |
|
|
int | offset_y, |
|
|
int | texture, |
|
|
bool | is_yuv444 ) |
Load vram data from the backing API or store.
- Parameters
-
| img | Image or frame object to read from or populate. |
| offset_x | Offset x. |
| offset_y | Offset y. |
| texture | Texture resource to bind, update, or attach. |
| is_yuv444 | Is YUV444. |
◆ make()
| std::optional< sws_t > egl::sws_t::make |
( |
int | in_width, |
|
|
int | in_height, |
|
|
int | out_width, |
|
|
int | out_height, |
|
|
AVPixelFormat | format, |
|
|
bool | is_yuv444 ) |
|
static |
Allocate the underlying object and wrap it in the owning handle.
- Parameters
-
| in_width | Source frame width in pixels. |
| in_height | Source frame height in pixels. |
| out_width | Destination frame width in pixels. |
| out_height | Destination frame height in pixels. |
| format | Destination FFmpeg pixel format. |
| is_yuv444 | Whether the destination uses three full-resolution planes. |
- Returns
- Created backend object, or null when creation fails.
◆ make_nv12()
| std::optional< sws_t > egl::sws_t::make_nv12 |
( |
int | in_width, |
|
|
int | in_height, |
|
|
int | out_width, |
|
|
int | out_height, |
|
|
gl::tex_t && | tex ) |
|
static |
Create a software-scaling pipeline that renders to NV12 planes.
- Parameters
-
| in_width | Source frame width in pixels. |
| in_height | Source frame height in pixels. |
| out_width | Destination frame width in pixels. |
| out_height | Destination frame height in pixels. |
| tex | Texture resource used by the converter. |
- Returns
- Constructed NV12 object.
◆ make_yuv444()
| std::optional< sws_t > egl::sws_t::make_yuv444 |
( |
int | in_width, |
|
|
int | in_height, |
|
|
int | out_width, |
|
|
int | out_height, |
|
|
gl::tex_t && | tex ) |
|
static |
Create a software-scaling pipeline that renders to YUV444 planes.
- Parameters
-
| in_width | Source frame width in pixels. |
| in_height | Source frame height in pixels. |
| out_width | Destination frame width in pixels. |
| out_height | Destination frame height in pixels. |
| tex | Texture resource used by the converter. |
- Returns
- Constructed YUV444 object.
The documentation for this class was generated from the following files: