|
vdr-plugin-softhddevice-drm-gles 1.4.0
|
Some helper functions header file. More...
#include "drmbuffer.h"

Go to the source code of this file.
Functions | |
| uint8_t * | BufToRgb (cDrmBuffer *buf, int *size, int w, int h, enum AVPixelFormat dst_pix_fmt) |
| Convert a DRM buffer to rgb format image. More... | |
| uint8_t * | ScaleRgb24 (uint8_t *src, int *size, int src_w, int src_h, int dst_w, int dst_h) |
| Scale an image. More... | |
| void | AlphaBlend (uint8_t *result, uint8_t *front, uint8_t *back, const unsigned int width, const unsigned int height) |
| Blend two images. More... | |
| int | BlitVideo (uint8_t *dst, uint8_t *src, int dst_w, int dst_h, int dst_x, int dst_y, int src_w, int src_h) |
| Blit the video on black background. More... | |
| void | PrintStreamData (const uint8_t *data, int size) |
| Print raw stream data. More... | |
Some helper functions header file.
AGPLv3
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
Definition in file buf2rgb.h.
| void AlphaBlend | ( | uint8_t * | result, |
| uint8_t * | front, | ||
| uint8_t * | back, | ||
| const unsigned int | width, | ||
| const unsigned int | height | ||
| ) |
Blend two images.
Both, front and back image data have to be same size front is the OSD (ARGB) back is the video (RGB) result is RGB
| [out] | result | pointer to the resulting image data |
| [in] | front | pointer to the upper image data |
| [in] | back | pointer to the lower image data |
| [in] | width | image width |
| [in] | height | image height |
Definition at line 203 of file buf2rgb.cpp.
References BLEND, OPAQUE, TRANSPARENT, and UNMULTIPLY.
Referenced by cSoftHdDevice::GrabImage().
| int BlitVideo | ( | uint8_t * | dst, |
| uint8_t * | src, | ||
| int | dstW, | ||
| int | dstH, | ||
| int | dstX, | ||
| int | dstY, | ||
| int | srcW, | ||
| int | srcH | ||
| ) |
Blit the video on black background.
| [in] | dst | pointer to the destination video |
| [in] | src | pointer to the source video |
| [in] | dstW | destination width of the image |
| [in] | dstH | destination height of the image |
| [in] | dstX | x offset of the (already scaled) video on the image |
| [in] | dstY | y offset of the (already scaled) video on the image |
| [in] | srcW | source video width |
| [in] | srcH | source video height |
Definition at line 264 of file buf2rgb.cpp.
References L_GRAB, and LOGDEBUG2.
Referenced by cSoftHdDevice::GrabImage().
| uint8_t * BufToRgb | ( | cDrmBuffer * | buf, |
| int * | size, | ||
| int | dstW, | ||
| int | dstH, | ||
| enum AVPixelFormat | dstPixFmt | ||
| ) |
Convert a DRM buffer to rgb format image.
Conversion is done with ffmpegs swscale
| [in] | buf | pointer to the source drm buffer struct |
| [out] | size | size of the return data |
| [in] | dstW | width of the returned image |
| [in] | dstH | height of the returned image |
| [in] | dstPixFmt | pixel format of the returned image |
Definition at line 74 of file buf2rgb.cpp.
References DrmFormatToAVFormat(), cDrmBuffer::Height(), L_GRAB, LOGDEBUG2, LOGERROR, cDrmBuffer::NumPlanes(), cDrmBuffer::Offset(), cDrmBuffer::Pitch(), cDrmBuffer::Plane(), cDrmBuffer::Size(), and cDrmBuffer::Width().
Referenced by cVideoRender::ConvertOsdBufToRgb(), cVideoRender::ConvertPipBufToRgb(), and cVideoRender::ConvertVideoBufToRgb().
| void PrintStreamData | ( | const uint8_t * | data, |
| int | size | ||
| ) |
Print raw stream data.
| data | pointer to stream data |
| size | data size |
Definition at line 288 of file buf2rgb.cpp.
References LOGDEBUG.
| uint8_t * ScaleRgb24 | ( | uint8_t * | src, |
| int * | size, | ||
| int | srcW, | ||
| int | srcH, | ||
| int | dstW, | ||
| int | dstH | ||
| ) |
Scale an image.
Conversion is done with ffmpegs swscale
| [in] | src | pointer to the source data |
| [out] | size | size of the return data |
| [in] | srcW | source width |
| [in] | srcH | source height |
| [in] | dstW | width of the returned image |
| [in] | dstH | height of the returned image |
Definition at line 152 of file buf2rgb.cpp.
References L_GRAB, LOGDEBUG2, and LOGERROR.
Referenced by cSoftHdDevice::GrabImage().