summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2009-09-18 20:27:44 -0700
committerDavid Schleef <ds@schleef.org>2009-09-19 14:13:25 -0700
commitbc25896579909282c8670c00dd7dfaf4c55c1c8c (patch)
treedd18af1f4aaa53f263b35dba5d051a596b292223
parent314e2dabd52e6b98117d1c87f9aadf396f9714fd (diff)
cog: remove // comments
-rw-r--r--ext/cog/cogframe.c23
-rw-r--r--ext/cog/cogvirtframe.c5
-rw-r--r--ext/cog/gstcog.c4
-rw-r--r--ext/cog/gstcogcolorspace.c3
-rw-r--r--ext/cog/gstcogdownsample.c4
-rw-r--r--ext/cog/gstcogfilter.c6
-rw-r--r--ext/cog/gstcogmse.c3
-rw-r--r--ext/cog/gstcogutils.c4
-rw-r--r--ext/cog/gstcolorconvert.c21
-rw-r--r--ext/cog/gstlogoinsert.c6
10 files changed, 19 insertions, 60 deletions
diff --git a/ext/cog/cogframe.c b/ext/cog/cogframe.c
index c3923768b..10317516b 100644
--- a/ext/cog/cogframe.c
+++ b/ext/cog/cogframe.c
@@ -84,12 +84,7 @@ cog_frame_new_and_alloc_extended (CogMemoryDomain * domain,
}
frame->components[0].length = frame->components[0].stride * height;
- if (domain) {
- //frame->regions[0] = cog_memory_domain_alloc (domain,
- // frame->components[0].length);
- } else {
- frame->regions[0] = g_malloc (frame->components[0].length);
- }
+ frame->regions[0] = g_malloc (frame->components[0].length);
frame->components[0].data = frame->regions[0];
frame->components[0].v_shift = 0;
@@ -151,14 +146,8 @@ cog_frame_new_and_alloc_extended (CogMemoryDomain * domain,
frame->components[2].v_shift = v_shift;
frame->components[2].h_shift = h_shift;
- if (domain) {
- //frame->regions[0] = cog_memory_domain_alloc (domain,
- // frame->components[0].length +
- // frame->components[1].length + frame->components[2].length);
- } else {
- frame->regions[0] = malloc (frame->components[0].length +
- frame->components[1].length + frame->components[2].length);
- }
+ frame->regions[0] = malloc (frame->components[0].length +
+ frame->components[1].length + frame->components[2].length);
frame->components[0].data = COG_OFFSET (frame->regions[0],
frame->components[0].stride * extension + bytes_pp * extension);
@@ -792,11 +781,7 @@ cog_frame_unref (CogFrame * frame)
for (i = 0; i < 3; i++) {
if (frame->regions[i]) {
- if (frame->domain) {
- //cog_memory_domain_memfree(frame->domain, frame->regions[i]);
- } else {
- free (frame->regions[i]);
- }
+ g_free (frame->regions[i]);
}
}
diff --git a/ext/cog/cogvirtframe.c b/ext/cog/cogvirtframe.c
index e92608e1a..3cb9f816e 100644
--- a/ext/cog/cogvirtframe.c
+++ b/ext/cog/cogvirtframe.c
@@ -362,8 +362,6 @@ static void
cog_virt_frame_render_downsample_vert_halfsite_2tap (CogFrame * frame,
void *_dest, int component, int i)
{
- //static OrcProgram *p = NULL;
- //OrcExecutor _ex, *ex = &_ex;
uint8_t *dest = _dest;
uint8_t *src1;
uint8_t *src2;
@@ -383,8 +381,6 @@ static void
cog_virt_frame_render_downsample_vert_halfsite_4tap (CogFrame * frame,
void *_dest, int component, int i)
{
- //static OrcProgram *p = NULL;
- //OrcExecutor _ex, *ex = &_ex;
uint8_t *dest = _dest;
uint8_t *src1;
uint8_t *src2;
@@ -461,7 +457,6 @@ cog_virt_frame_render_downsample_vert_halfsite (CogFrame * frame,
for (j = 0; j < frame->components[component].width; j++) {
int x = 0;
const int taps10[10] = { 1, -2, -5, 9, 29, 29, 9, -5, -2, 1 };
- //const int taps10[10] = { -1, 1, 6, 11, 15, 15, 11, 6, 1, -1 };
for (k = 0; k < 10; k++) {
x += taps10[k] * src[k][j];
}
diff --git a/ext/cog/gstcog.c b/ext/cog/gstcog.c
index 877e7c739..b7363913a 100644
--- a/ext/cog/gstcog.c
+++ b/ext/cog/gstcog.c
@@ -37,11 +37,15 @@ GType gst_decimate_get_type (void);
GType gst_motion_detect_get_type (void);
#endif
+GST_DEBUG_CATEGORY (cog_debug);
+
static gboolean
plugin_init (GstPlugin * plugin)
{
orc_init ();
+ GST_DEBUG_CATEGORY_INIT (cog_debug, "cog", 0, "Cog");
+
gst_element_register (plugin, "cogdownsample", GST_RANK_NONE,
gst_cogdownsample_get_type ());
gst_element_register (plugin, "cogcolorspace", GST_RANK_NONE,
diff --git a/ext/cog/gstcogcolorspace.c b/ext/cog/gstcogcolorspace.c
index deadaf3d2..68d4e7691 100644
--- a/ext/cog/gstcogcolorspace.c
+++ b/ext/cog/gstcogcolorspace.c
@@ -154,7 +154,6 @@ gst_cogcolorspace_base_init (gpointer g_class)
"YCbCr format conversion",
"David Schleef <ds@schleef.org>");
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
- //GstBaseTransformClass *base_transform_class = GST_BASE_TRANSFORM_CLASS (g_class);
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_cogcolorspace_src_template));
@@ -195,8 +194,6 @@ gst_cogcolorspace_class_init (gpointer g_class, gpointer class_data)
static void
gst_cogcolorspace_init (GTypeInstance * instance, gpointer g_class)
{
- //GstCogcolorspace *compress = GST_COGCOLORSPACE (instance);
- //GstBaseTransform *btrans = GST_BASE_TRANSFORM (instance);
GST_DEBUG ("gst_cogcolorspace_init");
}
diff --git a/ext/cog/gstcogdownsample.c b/ext/cog/gstcogdownsample.c
index ec422fcf8..0c9d60543 100644
--- a/ext/cog/gstcogdownsample.c
+++ b/ext/cog/gstcogdownsample.c
@@ -55,7 +55,6 @@ struct _GstCogdownsample
{
GstBaseTransform base_transform;
- //CogVideoFormat format;
};
struct _GstCogdownsampleClass
@@ -146,7 +145,6 @@ gst_cogdownsample_base_init (gpointer g_class)
"Decreases size of video by a factor of 2",
"David Schleef <ds@schleef.org>");
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
- //GstBaseTransformClass *base_transform_class = GST_BASE_TRANSFORM_CLASS (g_class);
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_cogdownsample_src_template));
@@ -187,8 +185,6 @@ gst_cogdownsample_class_init (gpointer g_class, gpointer class_data)
static void
gst_cogdownsample_init (GTypeInstance * instance, gpointer g_class)
{
- //GstCogdownsample *compress = GST_COGDOWNSAMPLE (instance);
- //GstBaseTransform *btrans = GST_BASE_TRANSFORM (instance);
GST_DEBUG ("gst_cogdownsample_init");
}
diff --git a/ext/cog/gstcogfilter.c b/ext/cog/gstcogfilter.c
index d25775e79..78b4cf744 100644
--- a/ext/cog/gstcogfilter.c
+++ b/ext/cog/gstcogfilter.c
@@ -150,7 +150,6 @@ gst_cog_filter_base_init (gpointer g_class)
"Applies a cog pre-filter to video",
"David Schleef <ds@schleef.org>");
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
- //GstBaseTransformClass *base_transform_class = GST_BASE_TRANSFORM_CLASS (g_class);
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_cog_filter_src_template));
@@ -187,8 +186,6 @@ gst_cog_filter_class_init (gpointer g_class, gpointer class_data)
static void
gst_cog_filter_init (GTypeInstance * instance, gpointer g_class)
{
- //GstCogFilter *compress = GST_COG_FILTER (instance);
- //GstBaseTransform *btrans = GST_BASE_TRANSFORM (instance);
GST_DEBUG ("gst_cog_filter_init");
}
@@ -253,7 +250,8 @@ gst_cog_filter_transform_ip (GstBaseTransform * base_transform, GstBuffer * buf)
"height", &height);
frame = cog_frame_new_from_data_I420 (GST_BUFFER_DATA (buf), width, height);
- //cog_frame_filter_lowpass2 (frame, 5.0);
+
+ /* FIXME do something here */
return GST_FLOW_OK;
}
diff --git a/ext/cog/gstcogmse.c b/ext/cog/gstcogmse.c
index d6838fd86..b66216823 100644
--- a/ext/cog/gstcogmse.c
+++ b/ext/cog/gstcogmse.c
@@ -101,7 +101,6 @@ static GstFlowReturn gst_mse_chain_test (GstPad * pad, GstBuffer * buffer);
static GstFlowReturn gst_mse_chain_ref (GstPad * pad, GstBuffer * buffer);
static gboolean gst_mse_sink_event (GstPad * pad, GstEvent * event);
static void gst_mse_reset (GstMSE * filter);
-//static GstPadLinkReturn gst_mse_link_src (GstPad *pad, GstPad *peer);
static GstCaps *gst_mse_getcaps (GstPad * pad);
static gboolean gst_mse_set_caps (GstPad * pad, GstCaps * outcaps);
static void gst_mse_finalize (GObject * object);
@@ -173,7 +172,6 @@ gst_mse_init (GstMSE * filter, GstMSEClass * klass)
filter->srcpad = gst_element_get_static_pad (GST_ELEMENT (filter), "src");
- //gst_pad_set_link_function (filter->srcpad, gst_mse_link_src);
gst_pad_set_getcaps_function (filter->srcpad, gst_mse_getcaps);
filter->sinkpad_ref =
@@ -271,7 +269,6 @@ static void
gst_mse_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
- //GstMSE *fs = GST_MSE (object);
switch (prop_id) {
default:
diff --git a/ext/cog/gstcogutils.c b/ext/cog/gstcogutils.c
index 03f45a673..da37d9573 100644
--- a/ext/cog/gstcogutils.c
+++ b/ext/cog/gstcogutils.c
@@ -28,8 +28,8 @@
#include <math.h>
#include <string.h>
-//GST_DEBUG_CATEGORY_EXTERN (cog_debug);
-//#define GST_CAT_DEFAULT cog_debug
+GST_DEBUG_CATEGORY_EXTERN (cog_debug);
+#define GST_CAT_DEFAULT cog_debug
diff --git a/ext/cog/gstcolorconvert.c b/ext/cog/gstcolorconvert.c
index d3318b375..d4527c854 100644
--- a/ext/cog/gstcolorconvert.c
+++ b/ext/cog/gstcolorconvert.c
@@ -141,7 +141,6 @@ gst_colorconvert_base_init (gpointer g_class)
"Template for a video filter",
"David Schleef <ds@schleef.org>");
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
- //GstBaseTransformClass *base_transform_class = GST_BASE_TRANSFORM_CLASS (g_class);
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_colorconvert_src_template));
@@ -172,8 +171,6 @@ gst_colorconvert_class_init (gpointer g_class, gpointer class_data)
static void
gst_colorconvert_init (GTypeInstance * instance, gpointer g_class)
{
- //GstColorconvert *compress = GST_COLORCONVERT (instance);
- //GstBaseTransform *btrans = GST_BASE_TRANSFORM (instance);
GST_DEBUG ("gst_colorconvert_init");
}
@@ -526,15 +523,16 @@ color_matrix_build_yuv_to_rgb_601 (ColorMatrix * dst)
/* colour matrix, YCbCr -> RGB */
/* Requires Y in [0,1.0], Cb&Cr in [-0.5,0.5] */
- color_matrix_YCbCr_to_RGB (dst, 0.2990, 0.1140); // SD
- //color_matrix_YCbCr_to_RGB (dst, 0.2126, 0.0722); // HD
+ color_matrix_YCbCr_to_RGB (dst, 0.2990, 0.1140); /* SD */
/*
* We are now in RGB space
*/
+#if 0
/* scale to output range. */
- //color_matrix_scale_components (dst, 255.0, 255.0, 255.0);
+ color_matrix_scale_components (dst, 255.0, 255.0, 255.0);
+#endif
}
void
@@ -550,10 +548,9 @@ color_matrix_build_bt709_to_bt601 (ColorMatrix * dst)
/* colour matrix, YCbCr -> RGB */
/* Requires Y in [0,1.0], Cb&Cr in [-0.5,0.5] */
- //color_matrix_YCbCr_to_RGB (dst, 0.2990, 0.1140); // SD
- color_matrix_YCbCr_to_RGB (dst, 0.2126, 0.0722); // HD
+ color_matrix_YCbCr_to_RGB (dst, 0.2126, 0.0722); /* HD */
- color_matrix_RGB_to_YCbCr (dst, 0.2990, 0.1140); // SD
+ color_matrix_RGB_to_YCbCr (dst, 0.2990, 0.1140); /* SD */
color_matrix_scale_components (dst, 219.0, 224.0, 224.0);
@@ -565,11 +562,7 @@ color_matrix_build_rgb_to_yuv_601 (ColorMatrix * dst)
{
color_matrix_set_identity (dst);
- //color_matrix_scale_components (dst, (1/255.0), (1/255.0), (1/255.0));
-
- color_matrix_RGB_to_YCbCr (dst, 0.2990, 0.1140); // SD
- //color_matrix_RGB_to_YCbCr (dst, 0.2126, 0.0722); // HD
- //color_matrix_RGB_to_YCbCr (dst, 0.212, 0.087); // SMPTE 240M
+ color_matrix_RGB_to_YCbCr (dst, 0.2990, 0.1140); /* SD */
color_matrix_scale_components (dst, 219.0, 224.0, 224.0);
diff --git a/ext/cog/gstlogoinsert.c b/ext/cog/gstlogoinsert.c
index 70f0ac71d..c91641b3c 100644
--- a/ext/cog/gstlogoinsert.c
+++ b/ext/cog/gstlogoinsert.c
@@ -153,7 +153,6 @@ gst_logoinsert_base_init (gpointer g_class)
"Template for a video filter",
"David Schleef <ds@schleef.org>");
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
- //GstBaseTransformClass *base_transform_class = GST_BASE_TRANSFORM_CLASS (g_class);
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_logoinsert_src_template));
@@ -188,8 +187,6 @@ gst_logoinsert_class_init (gpointer g_class, gpointer class_data)
static void
gst_logoinsert_init (GTypeInstance * instance, gpointer g_class)
{
- //GstLogoinsert *compress = GST_LOGOINSERT (instance);
- //GstBaseTransform *btrans = GST_BASE_TRANSFORM (instance);
GST_DEBUG ("gst_logoinsert_init");
}
@@ -409,11 +406,8 @@ cog_frame_new_from_png (void *data, int size)
png_read_image (png_ptr, rows);
g_free (rows);
- // PNG_TRANSFORM_STRP_16 | PNG_TRANSFORM_PACKING,
-
png_destroy_read_struct (&png_ptr, &info_ptr, png_infopp_NULL);
-
return frame;
}