/*
* CINELERRA
* Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
- *
+ *
* This program 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.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ *
*/
#include "bccmodels.h"
#include "effecttv.h"
-#include "cicolors.h"
+#include "bccolors.h"
#include "vframe.h"
-#include <stdint.h>
+#include <stdint.h>
#include <stdio.h>
diff = new unsigned char[w * h];
diff2 = new unsigned char[w * h];
yuv_init();
- yuv = new YUV;
}
EffectTV::~EffectTV()
delete [] background;
delete [] diff;
delete [] diff2;
- delete yuv;
}
case BC_YUV888:
FRAME_TO_EFFECTTV(uint8_t, 3);
break;
-
+
case BC_RGBA8888:
case BC_YUVA8888:
FRAME_TO_EFFECTTV(uint8_t, 4);
case BC_YUV161616:
FRAME_TO_EFFECTTV(uint16_t, 3);
break;
-
+
case BC_RGBA16161616:
case BC_YUVA16161616:
FRAME_TO_EFFECTTV(uint16_t, 4);
case BC_YUV888:
EFFECTTV_TO_FRAME(uint8_t, 3, 0xff);
break;
-
+
case BC_RGBA8888:
case BC_YUVA8888:
EFFECTTV_TO_FRAME(uint8_t, 4, 0xff);
case BC_YUV161616:
EFFECTTV_TO_FRAME(uint16_t, 3, 0xffff);
break;
-
+
case BC_RGBA16161616:
case BC_YUVA16161616:
EFFECTTV_TO_FRAME(uint16_t, 4, 0xffff);
-unsigned char* EffectTV::image_bgsubtract_update_y(unsigned char **input_rows,
- unsigned char **output_rows,
+unsigned char* EffectTV::image_bgsubtract_update_y(unsigned char **input_rows,
+ unsigned char **output_rows,
int color_model)
{
switch(color_model)
IMAGE_BGSUBTRACT_UPDATE_Y(uint16_t, 4, 1);
break;
}
-
+
return diff;
}
}
-unsigned char* EffectTV::image_bgsubtract_y(unsigned char **input_rows,
+unsigned char* EffectTV::image_bgsubtract_y(unsigned char **input_rows,
int color_model)
{
int16_t *q;
src = diff;
dest = diff2 + width + 1;
- for(y = 1; y < height - 1; y++)
+ for(y = 1; y < height - 1; y++)
{
sum1 = src[0] + src[width] + src[width * 2];
sum2 = src[1] + src[width + 1] + src[width * 2 + 1];
src += 2;
- for(x = 1; x < width - 1; x++)
+ for(x = 1; x < width - 1; x++)
{
sum3 = src[0] + src[width] + src[width * 2];
count = sum1 + sum2 + sum3;