#include "colormodels.h"#include "effecttv.h"#include "plugincolors.h"#include "vframe.h"#include <stdint.h>#include <stdio.h>

Go to the source code of this file.
Defines | |
| #define | FRAME_TO_EFFECTTV(type, components) |
| #define | EFFECTTV_TO_FRAME(type, components) |
| #define | IMAGE_BGSUBTRACT_UPDATE_Y(result, input_rows,type,components, is_yuv) |
| #define | IMAGE_BGSUBTRACT_Y(type, components, is_yuv) |
| #define | IMAGE_BGSET_Y(type, components, is_yuv) |
| #define EFFECTTV_TO_FRAME | ( | type, | |||
| components | ) |
Value:
{ \
for(int i = 0; i < width; i++) \
{ \
uint32_t *row = tmp + i * width * sizeof(uint32_t); \
type *output_row = ((type**)frame->get_rows())[i]; \
\
for(int j = 0; j < width; j++) \
{ \
if(sizeof(type) == 1) \
{ \
output_row[0] = (row[j * sizeof(uint32_t)] & 0xff0000) >> 16; \
output_row[1] = (row[j * sizeof(uint32_t)] & 0xff00) >> 8; \
output_row[2] = row[j * sizeof(uint32_t)] & 0xff; \
if(components == 4) output_row[3] = 0xff; \
} \
else \
{ \
output_row[0] = (row[j * sizeof(uint32_t)] & 0xff0000) >> 8; \
output_row[1] = row[j * sizeof(uint32_t)] & 0xff00; \
output_row[2] = (row[j * sizeof(uint32_t)] & 0xff) << 8; \
if(components == 4) output_row[3] = 0xffff; \
} \
output_row += components; \
row++; \
} \
} \
}
Definition at line 117 of file effecttv.C.
Referenced by EffectTV::effecttv_to_frame().
| #define FRAME_TO_EFFECTTV | ( | type, | |||
| components | ) |
Value:
{ \
for(int i = 0; i < width; i++) \
{ \
uint32_t *row = tmp + i * width * sizeof(uint32_t); \
type *input_row = ((type**)frame->get_rows())[i]; \
\
for(int j = 0; j < width; j++) \
{ \
if(sizeof(type) == 1) \
{ \
row[j * sizeof(uint32_t)] = ((uint32_t)input_row[0]) << 16; \
row[j * sizeof(uint32_t)] |= ((uint32_t)input_row[1]) << 8; \
row[j * sizeof(uint32_t)] |= input_row[2]; \
} \
else \
{ \
row[j * sizeof(uint32_t)] = ((uint32_t)input_row[0]) << 8; \
row[j * sizeof(uint32_t)] |= ((uint32_t)input_row[1]); \
row[j * sizeof(uint32_t)] |= input_row[2] >> 8; \
} \
input_row += components; \
row++; \
} \
} \
}
Definition at line 58 of file effecttv.C.
Referenced by EffectTV::frame_to_effecttv().
| #define IMAGE_BGSET_Y | ( | type, | |||
| components, | |||||
| is_yuv | ) |
| #define IMAGE_BGSUBTRACT_UPDATE_Y | ( | result, | |||
| input_rows, | |||||
| type, | |||||
| components, | |||||
| is_yuv | ) |
Definition at line 190 of file effecttv.C.
| #define IMAGE_BGSUBTRACT_Y | ( | type, | |||
| components, | |||||
| is_yuv | ) |
1.5.5