new->color_tables = NULL;
new->convert = NULL;
- DEBUG("gst_colorspace: new\n");
+ GST_DEBUG (0,"gst_colorspace: new\n");
if (GST_COLORSPACE_IS_RGB_TYPE(srcspace)) {
if (GST_COLORSPACE_IS_RGB_TYPE(destspace)) {
new->convert = gst_colorspace_rgb2rgb_get_converter(new, srcspace, destspace);
gint size;
gchar temp;
- DEBUG("gst_colorspace_rgb24_to_bgr24 %p %p %d\n", src, dest, space->outsize);
+ GST_DEBUG (0,"gst_colorspace_rgb24_to_bgr24 %p %p %d\n", src, dest, space->outsize);
size = space->outsize/3;
src+=3;
}
}
- DEBUG("gst_colorspace_rgb24_to_bgr24 end\n");
+ GST_DEBUG (0,"gst_colorspace_rgb24_to_bgr24 end\n");
}
static void gst_colorspace_rgb32_to_bgr32(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest)
gint size;
gchar temp;
- DEBUG("gst_colorspace_rgb32_to_bgr32 %p %p %d\n", src, dest, space->outsize);
+ GST_DEBUG (0,"gst_colorspace_rgb32_to_bgr32 %p %p %d\n", src, dest, space->outsize);
size = space->outsize/4;
src+=4;
}
}
- DEBUG("gst_colorspace_rgb32_to_bgr32 end\n");
+ GST_DEBUG (0,"gst_colorspace_rgb32_to_bgr32 end\n");
}
static void gst_colorspace_rgb555_to_rgb565(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest)
guint32 *srcptr = (guint32 *) src;
guint32 *destptr = (guint32 *) dest;
- DEBUG("gst_colorspace_rgb555_to_rgb565 %p %p %d\n", src, dest, space->outsize);
+ GST_DEBUG (0,"gst_colorspace_rgb555_to_rgb565 %p %p %d\n", src, dest, space->outsize);
size = space->outsize/4;
long red_mask, long green_mask, long blue_mask);
GstColorSpaceConvertFunction gst_colorspace_yuv2rgb_get_converter(GstColorSpaceConverter *space, GstColorSpaceType src, GstColorSpaceType dest) {
- DEBUG("gst_colorspace_yuv2rgb_get_converter %d %d\n", src, dest);
+ GST_DEBUG (0,"gst_colorspace_yuv2rgb_get_converter %d %d\n", src, dest);
switch(src) {
case GST_COLORSPACE_YUV420P:
space->insize = space->width*space->height+space->width*space->height/2;
static void gst_colorspace_yuv420P_to_bgr32(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest)
{
int size;
- DEBUG("gst_colorspace_yuv420P_to_bgr32\n");
+ GST_DEBUG (0,"gst_colorspace_yuv420P_to_bgr32\n");
size = space->width * space->height;
static void gst_colorspace_yuv420P_to_rgb32(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest)
{
int size;
- DEBUG("gst_colorspace_yuv420P_to_rgb32\n");
+ GST_DEBUG (0,"gst_colorspace_yuv420P_to_rgb32\n");
size = space->width * space->height;
static void gst_colorspace_yuv420P_to_bgr24(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest) {
int size;
- DEBUG("gst_colorspace_yuv420P_to_bgr24\n");
+ GST_DEBUG (0,"gst_colorspace_yuv420P_to_bgr24\n");
size = space->width * space->height;
static void gst_colorspace_yuv420P_to_rgb24(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest) {
int size;
- DEBUG("gst_colorspace_yuv420P_to_rgb24\n");
+ GST_DEBUG (0,"gst_colorspace_yuv420P_to_rgb24\n");
size = space->width * space->height;
static void gst_colorspace_yuv420P_to_rgb16(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest) {
int size;
- DEBUG("gst_colorspace_yuv420P_to_rgb16\n");
+ GST_DEBUG (0,"gst_colorspace_yuv420P_to_rgb16\n");
size = space->width * space->height;
static void gst_colorspace_yuv420P_to_bgr32_mmx(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest) {
int size;
- DEBUG("gst_colorspace_yuv420P_to_rgb32_mmx\n");
+ GST_DEBUG (0,"gst_colorspace_yuv420P_to_rgb32_mmx\n");
size = space->width * space->height;
}
static void gst_colorspace_yuv420P_to_bgr16_mmx(GstColorSpaceConverter *space, unsigned char *src, unsigned char *dest) {
int size;
- DEBUG("gst_colorspace_yuv420P_to_bgr16_mmx \n");
+ GST_DEBUG (0,"gst_colorspace_yuv420P_to_bgr16_mmx \n");
size = space->width * space->height;
dest,
space->height,
space->width);
- DEBUG("gst_colorspace_yuv420P_to_bgr16_mmx done\n");
+ GST_DEBUG (0,"gst_colorspace_yuv420P_to_bgr16_mmx done\n");
}
#endif
gb->ptr += (gb->bits>>3);
gb->bits &= 0x7;
- DEBUG("getbits%d, %08x\n", bits, rval);
+ GST_DEBUG (0,"getbits%d, %08x\n", bits, rval);
return rval>>7;
}
gb->ptr += (gb->bits>>3);
gb->bits &= 0x7;
- DEBUG("getbits%d, %08x\n", bits, rval);
+ GST_DEBUG (0,"getbits%d, %08x\n", bits, rval);
return rval;
}
gb->ptr += (gb->bits>>3);
gb->bits &= 0x7;
- DEBUG("getbits%d, %08x\n", bits, rval);
+ GST_DEBUG (0,"getbits%d, %08x\n", bits, rval);
return rval;
}
rval <<= gb->bits;
rval >>= (32-bits);
- DEBUG("showbits%d, %08x\n", bits, rval);
+ GST_DEBUG (0,"showbits%d, %08x\n", bits, rval);
return rval;
}
gb->bits += bits;
gb->ptr += (gb->bits>>3);
gb->bits &= 0x7;
- DEBUG("flushbits%d\n", bits);
+ GST_DEBUG (0,"flushbits%d\n", bits);
}
void _gst_getbits_back_int(gst_getbits_t *gb, unsigned long bits) {
GstRiff *riff;
gst_riff_list *list;
- DEBUG("gst_riff_encoder: making %4.4s encoder\n", (char *)&type);
+ GST_DEBUG (0,"gst_riff_encoder: making %4.4s encoder\n", (char *)&type);
riff = (GstRiff *)g_malloc(sizeof(GstRiff));
g_return_val_if_fail(riff != NULL, NULL);
g_return_val_if_fail(riff->state == GST_RIFF_STATE_INITIAL, GST_RIFF_EINVAL);
- DEBUG("gst_riff_encoder: add avih\n");
+ GST_DEBUG (0,"gst_riff_encoder: add avih\n");
ADD_LIST(riff, 0xB8, GST_RIFF_LIST_hdrl);
g_return_val_if_fail(riff->state == GST_RIFF_STATE_HASAVIH ||
riff->state == GST_RIFF_STATE_HASSTRF, GST_RIFF_EINVAL);
- DEBUG("gst_riff_encoder: add strh type %08x (%4.4s)\n", fcc_type, (char *)&fcc_type);
+ GST_DEBUG (0,"gst_riff_encoder: add strh type %08x (%4.4s)\n", fcc_type, (char *)&fcc_type);
ADD_LIST(riff, 108, GST_RIFF_LIST_strl);
g_return_val_if_fail(riff->state == GST_RIFF_STATE_HASSTRH, GST_RIFF_EINVAL);
- DEBUG("gst_riff_encoder: add strf\n");
+ GST_DEBUG (0,"gst_riff_encoder: add strf\n");
ADD_CHUNK(riff, GST_RIFF_TAG_strf, size);
riff->state = GST_RIFF_STATE_MOVI;
}
- DEBUG("gst_riff_encoder: add chunk type %08x (%4.4s)\n", chunk_type, (char *)&chunk_type);
+ GST_DEBUG (0,"gst_riff_encoder: add chunk type %08x (%4.4s)\n", chunk_type, (char *)&chunk_type);
ADD_CHUNK(riff, chunk_type, size);
size = GST_BUFFER_SIZE(buf);
last = off + size;
- DEBUG("gst_riff_parser: offset new buffer 0x%08lx size 0x%08x\n", off, GST_BUFFER_SIZE(buf));
+ GST_DEBUG (0,"gst_riff_parser: offset new buffer 0x%08lx size 0x%08x\n", off, GST_BUFFER_SIZE(buf));
if (riff->dataleft) {
gulong newsize;
- DEBUG("gst_riff_parser: recovering left data\n");
+ GST_DEBUG (0,"gst_riff_parser: recovering left data\n");
newsize = riff->dataleft_size + size;
riff->dataleft = g_realloc(riff->dataleft, newsize);
memcpy(riff->dataleft+riff->dataleft_size, GST_BUFFER_DATA(buf), size);
// if we have an incomplete chunk from the previous buffer
if (riff->incomplete_chunk) {
guint leftover;
- DEBUG("gst_riff_parser: have incomplete chunk %08x filled\n", riff->incomplete_chunk_size);
+ GST_DEBUG (0,"gst_riff_parser: have incomplete chunk %08x filled\n", riff->incomplete_chunk_size);
leftover = riff->incomplete_chunk->size - riff->incomplete_chunk_size;
if (leftover <= size) {
- DEBUG("gst_riff_parser: we can fill it from %08x with %08x bytes = %08x\n",
+ GST_DEBUG (0,"gst_riff_parser: we can fill it from %08x with %08x bytes = %08x\n",
riff->incomplete_chunk_size, leftover,
riff->incomplete_chunk_size+leftover);
memcpy(riff->incomplete_chunk->data+riff->incomplete_chunk_size, GST_BUFFER_DATA(buf), leftover);
riff->incomplete_chunk = NULL;
}
else {
- DEBUG("gst_riff_parser: we cannot fill it %08x >= %08lx\n", leftover, size);
+ GST_DEBUG (0,"gst_riff_parser: we cannot fill it %08x >= %08lx\n", leftover, size);
memcpy(riff->incomplete_chunk->data+riff->incomplete_chunk_size, GST_BUFFER_DATA(buf), size);
riff->incomplete_chunk_size += size;
return 0;
if (riff->nextlikely & 0x01) riff->nextlikely++;
- DEBUG("gst_riff_parser: next 0x%08x last 0x%08lx offset %08x\n",riff->nextlikely, last, off);
+ GST_DEBUG (0,"gst_riff_parser: next 0x%08x last 0x%08lx offset %08x\n",riff->nextlikely, last, off);
/* loop while the next likely chunk header is in this buffer */
while ((riff->nextlikely+12) <= last) {
gulong *words = (gulong *)((guchar *)GST_BUFFER_DATA(buf) + riff->nextlikely - off );
while (riff->chunks) {
chunk = g_list_nth_data(riff->chunks, 0);
- DEBUG("gst_riff_parser: next 0x%08x offset 0x%08lx size 0x%08x\n",riff->nextlikely,
+ GST_DEBUG (0,"gst_riff_parser: next 0x%08x offset 0x%08lx size 0x%08x\n",riff->nextlikely,
chunk->offset, chunk->size);
if (riff->nextlikely >= chunk->offset+chunk->size) {
- DEBUG("gst_riff_parser: found END LIST\n");
+ GST_DEBUG (0,"gst_riff_parser: found END LIST\n");
// we have the end of the chunk on the stack, remove it
riff->chunks = g_list_remove(riff->chunks, chunk);
}
else break;
}
- DEBUG("gst_riff_parser: next likely chunk is at offset 0x%08x\n",riff->nextlikely);
+ GST_DEBUG (0,"gst_riff_parser: next likely chunk is at offset 0x%08x\n",riff->nextlikely);
chunk = (GstRiffChunk *)g_malloc(sizeof(GstRiffChunk));
g_return_val_if_fail(chunk != NULL, GST_RIFF_ENOMEM);
if (chunk->id == GST_RIFF_TAG_LIST) {
- DEBUG("found LIST %s\n", gst_riff_id_to_fourcc(chunk->form));
+ GST_DEBUG (0,"found LIST %s\n", gst_riff_id_to_fourcc(chunk->form));
riff->nextlikely += 12;
// we push the list chunk on our 'stack'
riff->chunks = g_list_prepend(riff->chunks,chunk);
}
else {
- DEBUG("gst_riff_parser: chunk id offset %08x is 0x%08lx '%s' and is 0x%08lx long\n",
+ GST_DEBUG (0,"gst_riff_parser: chunk id offset %08x is 0x%08lx '%s' and is 0x%08lx long\n",
riff->nextlikely, words[0],
gst_riff_id_to_fourcc(words[0]),words[1]);
if (riff->nextlikely > last) {
guint left = size - (riff->nextlikely - chunk->size - off);
- DEBUG("make incomplete buffer %08x\n", left);
+ GST_DEBUG (0,"make incomplete buffer %08x\n", left);
chunk->data = g_malloc(chunk->size);
memcpy(chunk->data, (gchar *)(words+2), left);
riff->incomplete_chunk = chunk;
}
if ((riff->nextlikely+12) > last && !riff->incomplete_chunk) {
guint left = last - riff->nextlikely;
- DEBUG("gst_riff_parser: not enough data next 0x%08x last 0x%08lx %08x %08x\n",riff->nextlikely,
+ GST_DEBUG (0,"gst_riff_parser: not enough data next 0x%08x last 0x%08lx %08x %08x\n",riff->nextlikely,
last, left, off);
riff->dataleft = g_malloc(left);
switch (method) {
case GST_VIDEOSCALE_POINT_SAMPLE:
new->scaler = gst_videoscale_scale_point_sample;
- DEBUG("videoscale: scaling method POINT_SAMPLE\n");
+ GST_DEBUG (0,"videoscale: scaling method POINT_SAMPLE\n");
break;
case GST_VIDEOSCALE_NEAREST:
generate_rowbytes(new->copy_row, sw, dw, scale_bytes);
new->scaler = gst_videoscale_scale_nearest;
- DEBUG("videoscale: scaling method NEAREST\n");
+ GST_DEBUG (0,"videoscale: scaling method NEAREST\n");
break;
case GST_VIDEOSCALE_BILINEAR:
new->scaler = gst_videoscale_scale_plane_slow;
new->filter = gst_videoscale_bilinear;
- DEBUG("videoscale: scaling method BILINEAR\n");
+ GST_DEBUG (0,"videoscale: scaling method BILINEAR\n");
break;
case GST_VIDEOSCALE_BICUBIC:
new->scaler = gst_videoscale_scale_plane_slow;
new->filter = gst_videoscale_bicubic;
- DEBUG("videoscale: scaling method BICUBIC\n");
+ GST_DEBUG (0,"videoscale: scaling method BICUBIC\n");
break;
default:
g_print("videoscale: unsupported scaling method %d\n", method);
int sh = scale->source_height;
int dw = scale->dest_width;
int dh = scale->dest_height;
- DEBUG("videoscale: scaling RGB %dx%d to %dx%d\n", sw, sh, dw, dh);
+ GST_DEBUG (0,"videoscale: scaling RGB %dx%d to %dx%d\n", sw, sh, dw, dh);
dw = ((dw + 1) & ~1) << 1;
sw = sw<<1;
- DEBUG("videoscale: %p %p\n", src, dest);
+ GST_DEBUG (0,"videoscale: %p %p\n", src, dest);
scale->scaler(scale, src, dest, sw, sh, dw, dh);
}
int dw = scale->dest_width;
int dh = scale->dest_height;
- DEBUG("videoscale: scaling YUV420P %dx%d to %dx%d\n", sw, sh, dw, dh);
+ GST_DEBUG (0,"videoscale: scaling YUV420P %dx%d to %dx%d\n", sw, sh, dw, dh);
scale->scaler(scale, src, dest, sw, sh, dw, dh);
double t1, t2, t3, t4;
double a1, a2, a3, a4;
- DEBUG("videoscale: scaling bicubic %dx%d\n", sw, sh);
+ GST_DEBUG (0,"videoscale: scaling bicubic %dx%d\n", sw, sh);
a1 = -a*(1-a)*(1-a);
a2 = (1-2*a*a+a*a*a);
double xr, yr;
int x, y;
- DEBUG("videoscale: scale plane slow %dx%d %dx%d %g %g %p %p\n", sw, sh, dw, dh, zoomx, zoomy, src, dest);
+ GST_DEBUG (0,"videoscale: scale plane slow %dx%d %dx%d %g %g %p %p\n", sw, sh, dw, dh, zoomx, zoomy, src, dest);
for (y=0; y<dh; y++) {
yr = ((double)y)/zoomy;
for (x=0; x<dw; x++) {
xr = ((double)x)/zoomx;
- DEBUG("videoscale: scale plane slow %g %g %p\n", xr, yr, (src+(int)(x)+(int)((y)*sw)));
+ GST_DEBUG (0,"videoscale: scale plane slow %g %g %p\n", xr, yr, (src+(int)(x)+(int)((y)*sw)));
if (floor(xr) == xr && floor(yr) == yr){
- DEBUG("videoscale: scale plane %g %g %p %p\n", xr, yr, (src+(int)(x)+(int)((y)*sw)), dest);
+ GST_DEBUG (0,"videoscale: scale plane %g %g %p %p\n", xr, yr, (src+(int)(x)+(int)((y)*sw)), dest);
*dest++ = RC(xr, yr);
}
else {
unsigned char *eip;
unsigned char load, store;
- DEBUG("videoscale: setup scaling %p\n", copy_row);
+ GST_DEBUG (0,"videoscale: setup scaling %p\n", copy_row);
switch (bpp) {
case 1:
pos += inc;
}
*eip++ = RETURN;
- DEBUG("scaler start/end %p %p %p\n", copy_row, eip, eip-copy_row);
+ GST_DEBUG (0,"scaler start/end %p %p %p\n", copy_row, eip, eip-copy_row);
}
int sum, xcount, ycount, loop;
unsigned char *srcp, *srcp2;
- DEBUG("videoscale: scaling nearest %p %p %d\n", src, dest, dw);
+ GST_DEBUG (0,"videoscale: scaling nearest %p %p %d\n", src, dest, dw);
ypos = 0x10000;
scale->temp = scale->copy_row;
- DEBUG("videoscale: scaling nearest %p %p %p %d\n", scale->copy_row, src, dest, dw);
+ GST_DEBUG (0,"videoscale: scaling nearest %p %p %p %d\n", scale->copy_row, src, dest, dw);
pos = 0x10000;
pos += inc;
}
- DEBUG("videoscale: scaling nearest done %p\n", scale->copy_row);
+ GST_DEBUG (0,"videoscale: scaling nearest done %p\n", scale->copy_row);
}
gchar temp;
gchar *data;
- DEBUG("gst_colorspace_rgb24_to_bgr24 %d\n", GST_BUFFER_SIZE(src));
+ GST_DEBUG (0,"gst_colorspace_rgb24_to_bgr24 %d\n", GST_BUFFER_SIZE(src));
size = GST_BUFFER_SIZE(src)/3;
if (params != NULL && params->outbuf != NULL) {
data = params->outbuf;
- DEBUG("gst_colorspace: to buffer %p\n", data);
+ GST_DEBUG (0,"gst_colorspace: to buffer %p\n", data);
}
else {
data = GST_BUFFER_DATA(src);
data[2] = temp;
data+=3;
}
- DEBUG("gst_colorspace_rgb24_to_bgr24 end %d\n", GST_BUFFER_SIZE(src));
+ GST_DEBUG (0,"gst_colorspace_rgb24_to_bgr24 end %d\n", GST_BUFFER_SIZE(src));
return src;
}
long red_mask, long green_mask, long blue_mask);
GstColorSpaceConverter gst_colorspace_yuv2rgb_get_converter(GstColorSpace src, GstColorSpace dest) {
- DEBUG("gst_colorspace_yuv2rgb_get_converter %d\n", dest);
+ GST_DEBUG (0,"gst_colorspace_yuv2rgb_get_converter %d\n", dest);
switch(src) {
case GST_COLORSPACE_YUV420P:
switch(dest) {
int size;
GstBuffer *buf = NULL;
guchar *out;
- DEBUG("gst_colorspace_yuv420P_to_bgr32\n");
+ GST_DEBUG (0,"gst_colorspace_yuv420P_to_bgr32\n");
g_return_val_if_fail(params != NULL, NULL);
int size;
GstBuffer *buf = NULL;
guchar *out;
- DEBUG("gst_colorspace_yuv420P_to_rgb32\n");
+ GST_DEBUG (0,"gst_colorspace_yuv420P_to_rgb32\n");
g_return_val_if_fail(params != NULL, NULL);
int size;
GstBuffer *buf = NULL;
guchar *out;
- DEBUG("gst_colorspace_yuv420P_to_bgr24\n");
+ GST_DEBUG (0,"gst_colorspace_yuv420P_to_bgr24\n");
g_return_val_if_fail(params != NULL, NULL);
int size;
GstBuffer *buf = NULL;
guchar *out;
- DEBUG("gst_colorspace_yuv420P_to_rgb24\n");
+ GST_DEBUG (0,"gst_colorspace_yuv420P_to_rgb24\n");
g_return_val_if_fail(params != NULL, NULL);
static GstBuffer *gst_colorspace_yuv420P_to_rgb16(GstBuffer *src, GstColorSpaceParameters *params) {
static GstColorSpaceYUVTables *color_tables = NULL;
int size;
- DEBUG("gst_colorspace_yuv420P_to_rgb16\n");
+ GST_DEBUG (0,"gst_colorspace_yuv420P_to_rgb16\n");
g_return_val_if_fail(params != NULL, NULL);
g_return_val_if_fail(params->visual != NULL, NULL);
int size;
GstBuffer *buf = NULL;
guchar *out;
- DEBUG("gst_colorspace_yuv420P_to_rgb32_mmx\n");
+ GST_DEBUG (0,"gst_colorspace_yuv420P_to_rgb32_mmx\n");
g_return_val_if_fail(params != NULL, NULL);
}
static GstBuffer *gst_colorspace_yuv420P_to_bgr16_mmx(GstBuffer *src, GstColorSpaceParameters *params) {
int size;
- DEBUG("gst_colorspace_yuv420P_to_bgr16_mmx \n");
+ GST_DEBUG (0,"gst_colorspace_yuv420P_to_bgr16_mmx \n");
g_return_val_if_fail(params != NULL, NULL);