hvirtual/plugins/libeffecttv/effecttv.C File Reference

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

Include dependency graph for effecttv.C:

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 Documentation

#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   ) 

Definition at line 522 of file effecttv.C.

Referenced by EffectTV::image_bgset_y().

#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   ) 

Definition at line 353 of file effecttv.C.

Referenced by EffectTV::image_bgsubtract_y().


Generated on Mon Apr 28 14:01:28 2008 for Cinelerra by  doxygen 1.5.5