This is a first step towards the ability to produce several different output formats... Refactor the code to separate - the double buffering - the actual image generation, which works in RGB - the conversion routine Furthermore, replace unsigned char by std::byte and introduce std::array and structured binding to avoid many usages of pointers; hopefully this makes the intention of the code clearer. Verified and cross-checked the actual converion logic; in fact this is a conversion to "YUV" as used by MPEG, which in more precise terms is Y'CrCb with Rec.601 colour space and a scan range limitation (16...235) on the Luma component.
46 lines
1.1 KiB
C++
46 lines
1.1 KiB
C++
/*
|
||
DISPLAY-HANDLES.h - opaque handle types for playback and display
|
||
|
||
Copyright (C)
|
||
2009, Hermann Vosseler <Ichthyostega@web.de>
|
||
|
||
**Lumiera** is free software; you can redistribute it and/or modify it
|
||
under the terms of the GNU General Public License as published by the
|
||
Free Software Foundation; either version 2 of the License, or (at your
|
||
option) any later version. See the file COPYING for further details.
|
||
|
||
*/
|
||
|
||
/** @file display-handles.h
|
||
** Opaque handles and similar typedefs used to communicate via the
|
||
** lumiera::Display and lumiera::DummyPlayer facade interfaces.
|
||
**
|
||
** @see stage::DisplayService
|
||
**
|
||
*/
|
||
|
||
|
||
#ifndef LUMIERA_DISPLAY_HANDLES_H
|
||
#define LUMIERA_DISPLAY_HANDLES_H
|
||
|
||
#include <cstddef>
|
||
|
||
|
||
using DummyFrame = std::byte *;
|
||
|
||
|
||
struct lumiera_displaySlot_struct
|
||
{
|
||
void (*put_)(lumiera_displaySlot_struct*, DummyFrame);
|
||
};
|
||
typedef struct lumiera_displaySlot_struct lumiera_displaySlot;
|
||
typedef lumiera_displaySlot* LumieraDisplaySlot;
|
||
|
||
|
||
|
||
struct lumiera_playprocess_struct { };
|
||
typedef struct lumiera_playprocess_struct lumiera_playprocess;
|
||
typedef lumiera_playprocess* LumieraPlayProcess;
|
||
|
||
|
||
#endif
|