54#include "CFHDDecoder.h"
67 void (*
convert)(
unsigned char *dst_buffer,
68 unsigned char *src_buffer,
92 if(
status != CFHD_ERROR_OKAY){
96 if(
status != CFHD_ERROR_OKAY){
115 unsigned char *src_buffer,
122 for(
int i = 0; i <
height; i++){
124 src_buffer += src_pitch;
130 unsigned char *src_buffer,
135 for(
int i = 0; i <
height; i++){
137 src_buffer += linesize;
143 unsigned char *src_buffer,
147 src_buffer += linesize * (
height - 1);
150 for(
int i = 0; i <
height; i++){
152 src_buffer -= linesize;
161 unsigned char *src_buffer,
165 {
RG48, CFHD_PIXEL_FORMAT_RG48,
nullptr},
166 {
UYVY, CFHD_PIXEL_FORMAT_2VUY,
nullptr},
167 {
R10k, CFHD_PIXEL_FORMAT_DPX0,
nullptr},
168 {
v210, CFHD_PIXEL_FORMAT_V210,
nullptr},
189 if(i.ug_codec ==
R12L){
200 int rshift,
int gshift,
int bshift,
int pitch,
codec_t out_codec)
219 unsigned int src_len)
229 CFHD_PixelFormat actualFormat;
234 CFHD_DECODED_RESOLUTION_FULL,
235 CFHD_DECODING_FLAGS_NONE,
242 assert(actualWidth == s->
width);
243 assert(actualHeight == s->
height);
247 CFHD_GetImagePitch(actualWidth, actualFormat, &actualPitch);
253 if(
status != CFHD_ERROR_OKAY){
268 CFHD_PixelFormat fmt_list[64];
275 sizeof(fmt_list) /
sizeof(fmt_list[0]),
279 if(
status != CFHD_ERROR_OKAY){
284 for(
int i = 0; i <
count; i++){
286 if(
codec.cfhd_pixfmt == fmt_list[i]){
303 for(
int i = 0; i < 4; i++){
304 out[i] = pixelformat & 0xff;
317 METADATATYPE_ORIGINAL,
320 if(
status != CFHD_ERROR_OKAY){
325 CFHD_MetadataTag tag;
326 CFHD_MetadataType
type;
328 CFHD_MetadataSize size;
340 if(
status != CFHD_ERROR_OKAY ||
type != METADATATYPE_UINT32){
342 "falling back to cineform internal format detection.\n");
381 if(
status == CFHD_ERROR_OKAY){
402 if(*
len >=
sizeof(
int)) {
403#ifdef CINEFORM_ACCEPT_CORRUPTED
421 if (compression !=
CFHD) {
int vc_get_linesize(unsigned int width, codec_t codec)
const char * get_codec_name(codec_t codec)
void log_msg(int level, const char *format,...)
#define LOG_LEVEL_NOTICE
information that may be interesting
#define LOG_LEVEL_ERROR
general errors
#define DECOMPRESS_PROPERTY_ACCEPTS_CORRUPTED_FRAME
@ DECODER_GOT_CODEC
Internal pixel format was determined.
@ LIBRARY_CLASS_VIDEO_DECOMPRESS
#define REGISTER_MODULE(name, info, lclass, abi)
Registers module to global modules' registry.
#define to_fourcc(a, b, c, d)
Creates FourCC word.
decoder_t get_decoder_from_to(codec_t in, codec_t out)
static void vc_copylineRG48toR12L(unsigned char *__restrict dst, const unsigned char *__restrict src, int dst_len, int rshift, int gshift, int bshift)
Converts RG48 to R12L. Converts 16-bit RGB to 12-bit packed RGB in full range (compatible with SMPTE ...
static void vc_copylineBGRtoRGB(unsigned char *__restrict dst, const unsigned char *__restrict src, int dst_len, int rshift, int gshift, int bshift)
decoder_func_t vc_copylineRGBA
decoder_func_t * decoder_t
unsigned int width
width of every tile (!)
unsigned int height
height of every tile (!)
Struct containing callbacks of a video_frame.
@ R10k
RGB 10-bit packed - RGBX, big-endian (2 bit padding)
@ RGB
RGB 8-bit (packed into 24-bit word)
@ UYVY
YCbCr 422 8-bit - Cb Y0 Cr Y1.
@ VIDEO_CODEC_NONE
dummy color spec
@ RG48
16-bit RGB little-endian (RlRhGl...)
@ R12L
RGB 12-bit packed, little-endian.
@ RGBA
RGBA 8-bit, big-endian.
@ v210
YCbCr 422 10-bit - xVY0U|xY2UY1|xUY3V|xY5VY4, little-endian (2 bit padding /'x'/),...
This is an umbrella header for video functions.
struct pixfmt_desc get_pixfmt_desc(codec_t pixfmt)
API for video decompress drivers.
#define VIDEO_DECOMPRESS_ABI_VERSION