Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CaptureConvert.cpp File Reference
#include "CaptureConvert.h"
#include "rendering/capture/CapturePixels.h"
#include "rendering/capture/CaptureTypes.h"
#include "utils/log.h"
#include <algorithm>
#include <cstddef>
#include <cstring>
#include <vector>
#include <libavutil/mastering_display_metadata.h>
#include <libavutil/pixdesc.h>
#include <libswscale/swscale.h>

Namespaces

namespace  KODI
 
namespace  KODI::RENDERING
 
namespace  KODI::RENDERING::CAPTURE
 

Functions

bool KODI::RENDERING::CAPTURE::CaptureCopyBGRA8 (const CaptureResult &result, unsigned int width, unsigned int height, uint8_t *buffer)
 Fit an already-8-bit-BGRA capture to width x height, copying or scaling only, with NO tonemap or color management: the output coding is carried through verbatim. This is the Python RenderCapture contract (raw output-coded bytes, HDR tags ignored) and the cheap path other consumers reach when no conversion is needed. The buffer must hold width*height*4.
 
bool KODI::RENDERING::CAPTURE::CaptureToBGRA (const CaptureResult &result, unsigned int width, unsigned int height, uint8_t *buffer)
 Convert a delivered capture to width x height 8-bit BGRA, tonemapping HDR-tagged or high-depth captures to SDR (bookmark-thumbnail policy). Runs on the consumer's thread, never the render thread; the buffer must hold width * height * 4 bytes.