From: <tho...@fr...> - 2005-12-06 19:57:27
|
CVS Root: /cvs/gstreamer Module: gst-ffmpeg Changes by: thomasvs Date: Tue Dec 06 2005 11:57:20 PST Log message: expand tabs Modified files: . : ChangeLog ext/ffmpeg : gstffmpegcodecmap.c gstffmpegcodecmap.h gstffmpegdeinterlace.c gstffmpegenc.c gstffmpegmux.c gstffmpegprotocol.c gstffmpegscale.c ext/libpostproc : gstpostproc.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-ffmpeg/ChangeLog.diff?r1=1.230&r2=1.231 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-ffmpeg/ext/ffmpeg/gstffmpegcodecmap.c.diff?r1=1.98&r2=1.99 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-ffmpeg/ext/ffmpeg/gstffmpegcodecmap.h.diff?r1=1.19&r2=1.20 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-ffmpeg/ext/ffmpeg/gstffmpegdeinterlace.c.diff?r1=1.5&r2=1.6 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-ffmpeg/ext/ffmpeg/gstffmpegenc.c.diff?r1=1.79&r2=1.80 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-ffmpeg/ext/ffmpeg/gstffmpegmux.c.diff?r1=1.34&r2=1.35 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-ffmpeg/ext/ffmpeg/gstffmpegprotocol.c.diff?r1=1.24&r2=1.25 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-ffmpeg/ext/ffmpeg/gstffmpegscale.c.diff?r1=1.6&r2=1.7 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-ffmpeg/ext/libpostproc/gstpostproc.c.diff?r1=1.5&r2=1.6 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-ffmpeg/ChangeLog,v retrieving revision 1.230 retrieving revision 1.231 diff -u -d -r1.230 -r1.231 --- ChangeLog 5 Dec 2005 18:00:41 -0000 1.230 +++ ChangeLog 6 Dec 2005 19:57:08 -0000 1.231 @@ -1,3 +1,26 @@ +2005-12-06 Thomas Vander Stichele <thomas at apestaart dot org> + + * ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps), + (gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_pixfmt), + (gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid): + * ext/ffmpeg/gstffmpegcodecmap.h: + * ext/ffmpeg/gstffmpegdeinterlace.c: + (gst_ffmpegdeinterlace_pad_link), (gst_ffmpegdeinterlace_init), + (gst_ffmpegdeinterlace_chain): + * ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_class_init), + (gst_ffmpegenc_chain_audio): + * ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_loop): + * ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_write): + * ext/ffmpeg/gstffmpegscale.c: (gst_ffmpegscale_pad_link), + (gst_ffmpegscale_init), (gst_ffmpegscale_chain), + (gst_ffmpegscale_change_state): + * ext/libpostproc/gstpostproc.c: (change_context), (change_mode), + (gst_postproc_base_init), (gst_postproc_class_init), + (gst_postproc_init), (gst_postproc_link), (gst_postproc_chain), + (gst_postproc_change_state), (gst_postproc_set_property), + (gst_postproc_get_property), (gst_postproc_register): + expand tabs === release 0.10.0 === 2005-12-05 <thomas (at) apestaart (dot) org> Index: gstffmpegcodecmap.c RCS file: /cvs/gstreamer/gst-ffmpeg/ext/ffmpeg/gstffmpegcodecmap.c,v retrieving revision 1.98 retrieving revision 1.99 diff -u -d -r1.98 -r1.99 --- gstffmpegcodecmap.c 22 Nov 2005 23:33:41 -0000 1.98 +++ gstffmpegcodecmap.c 6 Dec 2005 19:57:08 -0000 1.99 @@ -81,34 +81,34 @@ * but I'm too lazy today. Maybe later. */ -#define GST_FF_VID_CAPS_NEW(mimetype, ...) \ - (context != NULL) ? \ - gst_caps_new_simple (mimetype, \ - "width", G_TYPE_INT, context->width, \ - "height", G_TYPE_INT, context->height, \ - "framerate", GST_TYPE_FRACTION, context->time_base.den, \ - context->time_base.num, __VA_ARGS__, NULL) \ - : \ - "width", GST_TYPE_INT_RANGE, 16, 4096, \ - "height", GST_TYPE_INT_RANGE, 16, 4096, \ - "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, \ +#define GST_FF_VID_CAPS_NEW(mimetype, ...) \ + (context != NULL) ? \ + gst_caps_new_simple (mimetype, \ + "width", G_TYPE_INT, context->width, \ + "height", G_TYPE_INT, context->height, \ + "framerate", GST_TYPE_FRACTION, context->time_base.den, \ + context->time_base.num, __VA_ARGS__, NULL) \ + : \ + "width", GST_TYPE_INT_RANGE, 16, 4096, \ + "height", GST_TYPE_INT_RANGE, 16, 4096, \ + "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, \ G_MAXINT, 1, __VA_ARGS__, NULL) /* same for audio - now with channels/sample rate -#define GST_FF_AUD_CAPS_NEW(mimetype, ...) \ - (context != NULL) ? \ - gst_caps_new_simple (mimetype, \ - "rate", G_TYPE_INT, context->sample_rate, \ - "channels", G_TYPE_INT, context->channels, \ - __VA_ARGS__, NULL) \ - : \ - "rate", GST_TYPE_INT_RANGE, 8000, 96000, \ - "channels", GST_TYPE_INT_RANGE, 1, 2, \ - __VA_ARGS__, NULL) +#define GST_FF_AUD_CAPS_NEW(mimetype, ...) \ + "rate", G_TYPE_INT, context->sample_rate, \ + "channels", G_TYPE_INT, context->channels, \ + __VA_ARGS__, NULL) \ + "rate", GST_TYPE_INT_RANGE, 8000, 96000, \ + "channels", GST_TYPE_INT_RANGE, 1, 2, \ + __VA_ARGS__, NULL) /* Convert a FFMPEG codec ID and optional AVCodecContext * to a GstCaps. If the context is ommitted, no fixed values @@ -259,7 +259,7 @@ switch (context->codec_tag) { case GST_MAKE_FOURCC ('D', 'I', 'V', 'X'): caps = GST_FF_VID_CAPS_NEW ("video/x-divx", - "divxversion", G_TYPE_INT, 5, NULL); + "divxversion", G_TYPE_INT, 5, NULL); break; case GST_MAKE_FOURCC ('m', 'p', '4', 'v'): default: @@ -450,10 +450,10 @@ case CODEC_ID_MSRLE: caps = GST_FF_VID_CAPS_NEW ("video/x-rle", - "layout", G_TYPE_STRING, "microsoft", NULL); + "layout", G_TYPE_STRING, "microsoft", NULL); if (context) { gst_caps_set_simple (caps, - "depth", G_TYPE_INT, (gint) context->bits_per_sample, NULL); + "depth", G_TYPE_INT, (gint) context->bits_per_sample, NULL); } else { gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 1, 64, NULL); } @@ -472,7 +472,7 @@ case CODEC_ID_MSVIDEO1: caps = GST_FF_VID_CAPS_NEW ("video/x-msvideocodec", - "msvideoversion", G_TYPE_INT, 1, NULL); + "msvideoversion", G_TYPE_INT, 1, NULL); break; case CODEC_ID_WMV3: @@ -899,8 +899,8 @@ case PIX_FMT_GRAY8: bpp = depth = 8; caps = GST_FF_VID_CAPS_NEW ("video/x-raw-gray", - "bpp", G_TYPE_INT, bpp, - "depth", G_TYPE_INT, depth, NULL); + "bpp", G_TYPE_INT, bpp, + "depth", G_TYPE_INT, depth, NULL); default: /* give up ... */ @@ -910,28 +910,28 @@ if (caps == NULL) { if (bpp != 0) { if (r_mask != 0) { - caps = GST_FF_VID_CAPS_NEW ("video/x-raw-rgb", - "bpp", G_TYPE_INT, bpp, - "depth", G_TYPE_INT, depth, - "red_mask", G_TYPE_INT, r_mask, - "green_mask", G_TYPE_INT, g_mask, - "blue_mask", G_TYPE_INT, b_mask, - "endianness", G_TYPE_INT, endianness, NULL); - if (a_mask) { - gst_caps_set_simple (caps, "alpha_mask", G_TYPE_INT, a_mask, NULL); - } + caps = GST_FF_VID_CAPS_NEW ("video/x-raw-rgb", + "bpp", G_TYPE_INT, bpp, + "depth", G_TYPE_INT, depth, + "red_mask", G_TYPE_INT, r_mask, + "green_mask", G_TYPE_INT, g_mask, + "blue_mask", G_TYPE_INT, b_mask, + "endianness", G_TYPE_INT, endianness, NULL); + if (a_mask) { + gst_caps_set_simple (caps, "alpha_mask", G_TYPE_INT, a_mask, NULL); + } - if (context) { - gst_ffmpeg_set_palette (caps, context); + if (context) { + gst_ffmpeg_set_palette (caps, context); } else if (fmt) { caps = GST_FF_VID_CAPS_NEW ("video/x-raw-yuv", - "format", GST_TYPE_FOURCC, fmt, NULL); + "format", GST_TYPE_FOURCC, fmt, NULL); } } @@ -1116,8 +1116,8 @@ context->time_base.num = gst_value_get_fraction_denominator (fps); GST_DEBUG ("setting framerate %d/%d = %lf", - context->time_base.den, context->time_base.num, - 1. * context->time_base.den / context->time_base.num); + context->time_base.den, context->time_base.num, + 1. * context->time_base.den / context->time_base.num); if (!raw) @@ -1273,7 +1273,7 @@ if (!context->extradata) { gint halfpel_flag, thirdpel_flag, low_delay, unknown_svq3_flag; guint16 flags; - + if (gst_structure_get_int (str, "halfpel_flag", &halfpel_flag) || gst_structure_get_int (str, "thirdpel_flag", &thirdpel_flag) || gst_structure_get_int (str, "low_delay", &low_delay) || @@ -1872,7 +1872,7 @@ if ((codec = avcodec_find_decoder_by_name (ext)) || (codec = avcodec_find_encoder_by_name (ext))) { id = codec->id; - audio = TRUE; + audio = TRUE; } else if (!strncmp (mimetype, "video/x-gst_ff-", 15)) { Index: gstffmpegcodecmap.h RCS file: /cvs/gstreamer/gst-ffmpeg/ext/ffmpeg/gstffmpegcodecmap.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- gstffmpegcodecmap.h 20 Sep 2005 10:50:22 -0000 1.19 +++ gstffmpegcodecmap.h 6 Dec 2005 19:57:08 -0000 1.20 @@ -35,7 +35,7 @@ GstCaps * gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, AVCodecContext *context, - gboolean encode); + gboolean encode); /* * _codectype_to_caps () gets the GstCaps that belongs to @@ -63,9 +63,9 @@ void gst_ffmpeg_caps_with_codecid (enum CodecID codec_id, - enum CodecType codec_type, - const GstCaps *caps, - AVCodecContext *context); + enum CodecType codec_type, + const GstCaps *caps, + AVCodecContext *context); * caps_with_codectype () transforms a GstCaps that belongs to @@ -95,8 +95,8 @@ gboolean gst_ffmpeg_formatid_get_codecids (const gchar *format_name, - enum CodecID ** video_codec_list, - enum CodecID ** audio_codec_list); + enum CodecID ** video_codec_list, + enum CodecID ** audio_codec_list); * Since FFMpeg has such really cool and useful descriptions @@ -118,10 +118,10 @@ int gst_ffmpeg_avpicture_fill (AVPicture * picture, - uint8_t * ptr, - enum PixelFormat pix_fmt, - int width, - int height); + uint8_t * ptr, + enum PixelFormat pix_fmt, + int width, + int height); * convert an image, we only use this for copying the image, ie, @@ -129,8 +129,8 @@ gst_ffmpeg_img_convert (AVPicture * dst, int dst_pix_fmt, - const AVPicture * src, int src_pix_fmt, - int src_width, int src_height); + const AVPicture * src, int src_pix_fmt, + int src_width, int src_height); * Convert from/to a GStreamer <-> FFMpeg timestamp. Index: gstffmpegdeinterlace.c RCS file: /cvs/gstreamer/gst-ffmpeg/ext/ffmpeg/gstffmpegdeinterlace.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- gstffmpegdeinterlace.c 5 Dec 2005 13:04:39 -0000 1.5 +++ gstffmpegdeinterlace.c 6 Dec 2005 19:57:08 -0000 1.6 @@ -183,7 +183,7 @@ deinterlace->width = width; deinterlace->height = height; deinterlace->to_size = avpicture_get_size (deinterlace->pixfmt, - deinterlace->width, deinterlace->height); + deinterlace->width, deinterlace->height); return GST_PAD_LINK_OK; } @@ -246,16 +246,16 @@ gst_ffmpegdeinterlace_init (GstFFMpegDeinterlace * deinterlace) { deinterlace->sinkpad = gst_pad_new_from_template (gst_static_pad_template_get - (&gst_ffmpegdeinterlace_sink_template), - "sink"); + (&gst_ffmpegdeinterlace_sink_template), + "sink"); gst_pad_set_link_function (deinterlace->sinkpad, gst_ffmpegdeinterlace_pad_link); gst_pad_set_getcaps_function (deinterlace->sinkpad, gst_ffmpegdeinterlace_getcaps); gst_pad_set_chain_function (deinterlace->sinkpad, gst_ffmpegdeinterlace_chain); gst_element_add_pad (GST_ELEMENT (deinterlace), deinterlace->sinkpad); deinterlace->srcpad = gst_pad_new_from_template (gst_static_pad_template_get - (&gst_ffmpegdeinterlace_src_template), - "src"); + (&gst_ffmpegdeinterlace_src_template), + "src"); gst_element_add_pad (GST_ELEMENT (deinterlace), deinterlace->srcpad); gst_pad_set_link_function (deinterlace->srcpad, gst_ffmpegdeinterlace_pad_link); gst_pad_set_getcaps_function (deinterlace->srcpad, gst_ffmpegdeinterlace_getcaps); @@ -285,20 +285,20 @@ outbuf = gst_pad_alloc_buffer_and_set_caps (deinterlace->srcpad, - GST_BUFFER_OFFSET_NONE, deinterlace->to_size); + GST_BUFFER_OFFSET_NONE, deinterlace->to_size); gst_ffmpeg_avpicture_fill (&deinterlace->from_frame, - GST_BUFFER_DATA (inbuf), - deinterlace->pixfmt, - deinterlace->width, deinterlace->height); + GST_BUFFER_DATA (inbuf), + deinterlace->pixfmt, + deinterlace->width, deinterlace->height); gst_ffmpeg_avpicture_fill (&deinterlace->to_frame, - GST_BUFFER_DATA (outbuf), - deinterlace->width, deinterlace->height); + GST_BUFFER_DATA (outbuf), + deinterlace->width, deinterlace->height); avpicture_deinterlace (&deinterlace->to_frame, &deinterlace->from_frame, - deinterlace->pixfmt, deinterlace->width, deinterlace->height); + deinterlace->pixfmt, deinterlace->width, deinterlace->height); gst_buffer_stamp (outbuf, (const GstBuffer *) inbuf); Index: gstffmpegenc.c RCS file: /cvs/gstreamer/gst-ffmpeg/ext/ffmpeg/gstffmpegenc.c,v retrieving revision 1.79 retrieving revision 1.80 diff -u -d -r1.79 -r1.80 --- gstffmpegenc.c 28 Nov 2005 17:12:13 -0000 1.79 +++ gstffmpegenc.c 6 Dec 2005 19:57:08 -0000 1.80 @@ -228,7 +228,7 @@ "Size of the video buffers", 0, G_MAXULONG, 0, G_PARAM_READWRITE)); g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_RTP_PAYLOAD_SIZE, - g_param_spec_ulong ("rtp_payload_size", "RTP Payload Size", + g_param_spec_ulong ("rtp_payload_size", "RTP Payload Size", "Target GOB length", 0, G_MAXULONG, 0, G_PARAM_READWRITE)); } else if (klass->in_plugin->type == CODEC_TYPE_AUDIO) { g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_BIT_RATE, @@ -566,7 +566,7 @@ /* this is panic! we got a buffer, but still don't have enough * data. Merge them and retry in the next cycle... */ ffmpegenc->cache = gst_buffer_span (ffmpegenc->cache, 0, inbuf, - GST_BUFFER_SIZE (ffmpegenc->cache) + GST_BUFFER_SIZE (inbuf)); + GST_BUFFER_SIZE (ffmpegenc->cache) + GST_BUFFER_SIZE (inbuf)); } else if (in_size == size) { /* exactly the same! how wonderful */ ffmpegenc->cache = inbuf; @@ -593,7 +593,7 @@ GST_BUFFER_DURATION (subbuf) = GST_BUFFER_DURATION (inbuf) * GST_BUFFER_SIZE (subbuf) / size; subbuf = gst_buffer_span (ffmpegenc->cache, 0, subbuf, - GST_BUFFER_SIZE (ffmpegenc->cache) + GST_BUFFER_SIZE (subbuf)); + GST_BUFFER_SIZE (ffmpegenc->cache) + GST_BUFFER_SIZE (subbuf)); ffmpegenc->cache = NULL; } else { subbuf = gst_buffer_create_sub (inbuf, size - in_size, frame_size); Index: gstffmpegmux.c RCS file: /cvs/gstreamer/gst-ffmpeg/ext/ffmpeg/gstffmpegmux.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- gstffmpegmux.c 5 Sep 2005 14:06:29 -0000 1.34 +++ gstffmpegmux.c 6 Dec 2005 19:57:08 -0000 1.35 @@ -414,10 +414,10 @@ gst_tag_list_free (tags); - /* set the streamheader flag for gstffmpegprotocol if codec supports it */ - if (!strcmp (ffmpegmux->context->oformat->name, "flv") ) { - open_flags |= GST_FFMPEG_URL_STREAMHEADER; + /* set the streamheader flag for gstffmpegprotocol if codec supports it */ + if (!strcmp (ffmpegmux->context->oformat->name, "flv") ) { + open_flags |= GST_FFMPEG_URL_STREAMHEADER; if (url_fopen (&ffmpegmux->context->pb, ffmpegmux->context->filename, open_flags) < 0) { @@ -441,7 +441,7 @@ ("Failed to write file header - check codec settings")); return; - + /* flush the header so it will be used as streamheader */ put_flush_packet (&ffmpegmux->context->pb); Index: gstffmpegprotocol.c RCS file: /cvs/gstreamer/gst-ffmpeg/ext/ffmpeg/gstffmpegprotocol.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- gstffmpegprotocol.c 20 Jul 2005 15:40:57 -0000 1.24 +++ gstffmpegprotocol.c 6 Dec 2005 19:57:08 -0000 1.25 @@ -220,7 +220,7 @@ g_value_init (&list, GST_TYPE_FIXED_LIST); GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_IN_CAPS); - + g_value_init (&value, GST_TYPE_BUFFER); g_value_set_boxed (&value, outbuf); gst_value_list_append_value (&list, &value); @@ -234,7 +234,7 @@ /* only set the first buffer */ info->set_streamheader = FALSE; gst_pad_push (info->pad, GST_DATA (outbuf)); return size; Index: gstffmpegscale.c RCS file: /cvs/gstreamer/gst-ffmpeg/ext/ffmpeg/gstffmpegscale.c,v retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- gstffmpegscale.c 5 Dec 2005 13:04:39 -0000 1.6 +++ gstffmpegscale.c 6 Dec 2005 19:57:08 -0000 1.7 @@ -255,7 +255,7 @@ if (scale->res != NULL) img_resample_close (scale->res); scale->res = img_resample_init (scale->to_width, scale->to_height, - scale->from_width, scale->from_height); + scale->from_width, scale->from_height); @@ -321,16 +321,16 @@ gst_ffmpegscale_init (GstFFMpegScale * scale) scale->sinkpad = gst_pad_new_from_template (gst_static_pad_template_get - (&gst_ffmpegscale_sink_template), + (&gst_ffmpegscale_sink_template), gst_pad_set_link_function (scale->sinkpad, gst_ffmpegscale_pad_link); gst_pad_set_getcaps_function (scale->sinkpad, gst_ffmpegscale_getcaps); gst_pad_set_chain_function (scale->sinkpad, gst_ffmpegscale_chain); gst_element_add_pad (GST_ELEMENT (scale), scale->sinkpad); scale->srcpad = gst_pad_new_from_template (gst_static_pad_template_get - (&gst_ffmpegscale_src_template), + (&gst_ffmpegscale_src_template), gst_element_add_pad (GST_ELEMENT (scale), scale->srcpad); gst_pad_set_link_function (scale->srcpad, gst_ffmpegscale_pad_link); gst_pad_set_getcaps_function (scale->srcpad, gst_ffmpegscale_getcaps); @@ -370,14 +370,14 @@ outbuf = gst_pad_alloc_buffer_and_set_caps (scale->srcpad, GST_BUFFER_OFFSET_NONE, scale->to_size); gst_ffmpeg_avpicture_fill (&scale->from_frame, - scale->pixfmt, - scale->from_width, scale->from_height); + scale->pixfmt, + scale->from_width, scale->from_height); gst_ffmpeg_avpicture_fill (&scale->to_frame, - scale->to_width, scale->to_height); + scale->to_width, scale->to_height); img_resample (scale->res, &scale->to_frame, &scale->from_frame); @@ -398,7 +398,7 @@ switch (transition) { case GST_STATE_CHANGE_READY_TO_NULL: if (scale->res != NULL) - img_resample_close (scale->res); + img_resample_close (scale->res); Index: gstpostproc.c RCS file: /cvs/gstreamer/gst-ffmpeg/ext/libpostproc/gstpostproc.c,v --- gstpostproc.c 5 Sep 2005 14:06:29 -0000 1.5 +++ gstpostproc.c 6 Dec 2005 19:57:08 -0000 1.6 @@ -36,54 +36,54 @@ typedef struct _PostProcDetails PostProcDetails; struct _PostProcDetails { - char *shortname; - char *longname; - char *description; + char *shortname; + char *longname; + char *description; }; static PostProcDetails filterdetails[] = { - {"hb", "hdeblock", "horizontal deblocking filter"}, - {"vb", "vdeblock", "vertical deblocking filter"}, - {"h1", "x1hdeblock", "experimental horizontal deblocking filter 1"}, - {"v1", "x1vdeblock", "experimental vertical deblocking filter 1"}, - {"ha", "ahdeblock", "another horizontal deblocking filter"}, - {"va", "avdeblock", "another vertical deblocking filter"}, - {"dr", "dering", "deringing filter"}, - {"al", "autolevels", "automatic brightness/contrast filter"}, - {"lb", "linblenddeint", "linear blend interpolater"}, - {"li", "linipoldeint", "linear interpolation deinterlacer"}, - {"ci", "cubicipoldeint", "cubic interpolation deinterlacer"}, - {"md", "mediandeint", "median deinterlacer"}, - {"fd", "ffmpegdeint", "ffmpeg deinterlacer"}, - {"l5", "lowpass5", "FIR lowpass deinterlacer"}, - {"tn", "tmpnoise", "temporal noise reducer"}, - {"fq", "forcequant", "force quantizer"}, - {"de", "default", "default filters"}, - {NULL, NULL, NULL} + {"hb", "hdeblock", "horizontal deblocking filter"}, + {"vb", "vdeblock", "vertical deblocking filter"}, + {"h1", "x1hdeblock", "experimental horizontal deblocking filter 1"}, + {"v1", "x1vdeblock", "experimental vertical deblocking filter 1"}, + {"ha", "ahdeblock", "another horizontal deblocking filter"}, + {"va", "avdeblock", "another vertical deblocking filter"}, + {"dr", "dering", "deringing filter"}, + {"al", "autolevels", "automatic brightness/contrast filter"}, + {"lb", "linblenddeint", "linear blend interpolater"}, + {"li", "linipoldeint", "linear interpolation deinterlacer"}, + {"ci", "cubicipoldeint", "cubic interpolation deinterlacer"}, + {"md", "mediandeint", "median deinterlacer"}, + {"fd", "ffmpegdeint", "ffmpeg deinterlacer"}, + {"l5", "lowpass5", "FIR lowpass deinterlacer"}, + {"tn", "tmpnoise", "temporal noise reducer"}, + {"fq", "forcequant", "force quantizer"}, + {"de", "default", "default filters"}, + {NULL, NULL, NULL} -typedef struct _GstPostProc GstPostProc; +typedef struct _GstPostProc GstPostProc; -struct _GstPostProc { - GstElement element; +struct _GstPostProc { + GstElement element; - GstPad *sinkpad, *srcpad; - guint quality; - gint width, height; + GstPad *sinkpad, *srcpad; + guint quality; + gint width, height; - gint ystride, ustride, vstride; - gint ysize, usize, vsize; + gint ystride, ustride, vstride; + gint ysize, usize, vsize; - pp_mode_t *mode; - pp_context_t *context; + pp_mode_t *mode; + pp_context_t *context; -typedef struct _GstPostProcClass GstPostProcClass; +typedef struct _GstPostProcClass GstPostProcClass; -struct _GstPostProcClass { - GstElementClass parent_class; +struct _GstPostProcClass { + GstElementClass parent_class; - gint filterid; + gint filterid; enum { @@ -92,46 +92,46 @@ /* hashtable, key = gtype, value = filterdetails index */ -static GHashTable *global_plugins; +static GHashTable *global_plugins; /* TODO : add support for the other format supported by libpostproc */ static GstStaticPadTemplate gst_postproc_src_template = GST_STATIC_PAD_TEMPLATE ("src", - GST_PAD_SRC, - GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV("I420")) - ); - + GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS (GST_VIDEO_CAPS_YUV("I420")) + ); + static GstStaticPadTemplate gst_postproc_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", - GST_PAD_SINK, + GST_PAD_SINK, GST_DEBUG_CATEGORY (postproc_debug); #define GST_CAT_DEFAULT postproc_debug -static void gst_postproc_class_init (GstPostProcClass * klass); -static void gst_postproc_base_init (GstPostProcClass * klass); -static void gst_postproc_init (GstPostProc * pproc); -static void gst_postproc_dispose (GObject * object); +static void gst_postproc_class_init (GstPostProcClass * klass); +static void gst_postproc_base_init (GstPostProcClass * klass); +static void gst_postproc_init (GstPostProc * pproc); +static void gst_postproc_dispose (GObject * object); -static GstPadLinkReturn gst_postproc_link (GstPad * pad, const GstCaps * caps); +static GstPadLinkReturn gst_postproc_link (GstPad * pad, const GstCaps * caps); -static void gst_postproc_chain (GstPad * pad, GstData * data); +static void gst_postproc_chain (GstPad * pad, GstData * data); -static GstStateChangeReturn gst_postproc_change_state (GstElement * element, +static GstStateChangeReturn gst_postproc_change_state (GstElement * element, GstStateChange transition); -static void gst_postproc_set_property ( GObject * object, guint prop_id, - const GValue * value, - GParamSpec *pspec ); -static void gst_postproc_get_property ( GObject * object, guint prop_id, - GValue * value, GParamSpec *pspec ); +static void gst_postproc_set_property ( GObject * object, guint prop_id, + const GValue * value, + GParamSpec *pspec ); +static void gst_postproc_get_property ( GObject * object, guint prop_id, + GValue * value, GParamSpec *pspec ); -static GstElementClass *parent_class = NULL; +static GstElementClass *parent_class = NULL; #ifndef GST_DISABLE_GST_DEBUG static void @@ -168,15 +168,15 @@ change_context ( GstPostProc * postproc , gint width, gint height ) - GstCPUFlags flags; - int ppflags; + GstCPUFlags flags; + int ppflags; /* TODO : We need to find out what CPU flags we have in order to set MMX/MMX2/3DNOW optimizations */ GST_DEBUG ("change_context, width:%d, height:%d", - width, height); + width, height); if ((width != postproc->width) && (height != postproc->height)) { if (postproc->context) @@ -195,7 +195,7 @@ postproc->usize = postproc->ustride * ROUND_UP_2 (height) / 2; postproc->vsize = postproc->vstride * ROUND_UP_2 (height) / 2; GST_DEBUG ("new strides are (YUV) : %d %d %d", - postproc->ystride, postproc->ustride, postproc->vstride); + postproc->ystride, postproc->ustride, postproc->vstride); @@ -207,7 +207,7 @@ if (postproc->mode) pp_free_mode (postproc->mode); postproc->mode = pp_get_mode_by_name_and_quality (filterdetails[klass->filterid].shortname, - postproc->quality); + postproc->quality); @@ -216,7 +216,7 @@ GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GstElementClass *element_class = GST_ELEMENT_CLASS (klass); GstElementDetails details; - gint ppidx; + gint ppidx; ppidx = GPOINTER_TO_INT (g_hash_table_lookup (global_plugins, GINT_TO_POINTER (G_OBJECT_CLASS_TYPE (gobject_class)))); @@ -230,9 +230,9 @@ g_free(details.description); gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_postproc_src_template)); + gst_static_pad_template_get (&gst_postproc_src_template)); - gst_static_pad_template_get (&gst_postproc_sink_template)); + gst_static_pad_template_get (&gst_postproc_sink_template)); klass->filterid = ppidx; @@ -240,15 +240,15 @@ gst_postproc_class_init (GstPostProcClass * klass) - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); + GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); parent_class = g_type_class_peek_parent (klass); g_object_class_install_property (gobject_class, ARG_QUALITY, g_param_spec_uint ("quality", "Quality", - "Quality level of filter (6:best)", - 0, 6, 6, G_PARAM_READWRITE)); + "Quality level of filter (6:best)", + 0, 6, 6, G_PARAM_READWRITE)); gobject_class->dispose = gst_postproc_dispose; gobject_class->set_property = gst_postproc_set_property; @@ -262,15 +262,15 @@ GST_FLAG_SET (postproc, GST_ELEMENT_WORK_IN_PLACE); postproc->sinkpad = gst_pad_new_from_template (gst_static_pad_template_get - (&gst_postproc_sink_template), - "sink"); + (&gst_postproc_sink_template), + "sink"); gst_pad_set_link_function (postproc->sinkpad, gst_postproc_link); gst_pad_set_chain_function (postproc->sinkpad, gst_postproc_chain); gst_element_add_pad (GST_ELEMENT (postproc), postproc->sinkpad); postproc->srcpad = gst_pad_new_from_template (gst_static_pad_template_get - (&gst_postproc_src_template), - "src"); + (&gst_postproc_src_template), + "src"); gst_element_add_pad (GST_ELEMENT (postproc), postproc->srcpad); postproc->quality = 6; @@ -302,12 +302,12 @@ static GstPadLinkReturn gst_postproc_link (GstPad * pad, const GstCaps * caps) - GstPostProc *postproc; - GstStructure *structure; - GstPad *otherpad; - gboolean res; - GstPadLinkReturn ret; + GstPostProc *postproc; + GstStructure *structure; + GstPad *otherpad; + gboolean res; + GstPadLinkReturn ret; /* create/replace pp_context here */ postproc = (GstPostProc *) gst_pad_get_parent (pad); @@ -333,10 +333,10 @@ gst_postproc_chain (GstPad * pad, GstData * data) - GstBuffer *in, *out; - int stride[3]; - unsigned char * outplane[3]; + GstBuffer *in, *out; + int stride[3]; + unsigned char * outplane[3]; GST_DEBUG("chaining"); @@ -361,34 +361,34 @@ outplane[2] = outplane[1] + postproc->usize; GST_DEBUG ("calling pp_postprocess, width:%d, height:%d", - postproc->width, postproc->height); + postproc->width, postproc->height); pp_postprocess (outplane, stride, - outplane, stride, - postproc->width, - postproc->height, - "", 0, - postproc->mode, postproc->context, 1); + outplane, stride, + postproc->width, + postproc->height, + "", 0, + postproc->mode, postproc->context, 1); gst_buffer_stamp (out, in); gst_pad_push (postproc->srcpad, GST_DATA (out)); void pp_postprocess(uint8_t * src[3], int srcStride[3], - uint8_t * dst[3], int dstStride[3], - int horizontalSize, int verticalSize, - QP_STORE_T *QP_store, int QP_stride, - pp_mode_t *mode, pp_context_t *ppContext, int pict_type); + uint8_t * dst[3], int dstStride[3], + int horizontalSize, int verticalSize, + QP_STORE_T *QP_store, int QP_stride, + pp_mode_t *mode, pp_context_t *ppContext, int pict_type); - src is the src buffer data - srcStride is ->ystride, ->ustride, ->vstride - dst same as src - dstStride same as srcStride - horizontalSize and VerticalsSize are obvious - QP_store can be null and qp_stride too - mode = mode - context = context - pict_type = 0 + src is the src buffer data + srcStride is ->ystride, ->ustride, ->vstride + dst same as src + dstStride same as srcStride + horizontalSize and VerticalsSize are obvious + QP_store can be null and qp_stride too + mode = mode + context = context + pict_type = 0 @@ -396,7 +396,7 @@ static GstStateChangeReturn gst_postproc_change_state (GstElement * element, GstStateChange transition) - GstPostProc *postproc = (GstPostProc *) element; + GstPostProc *postproc = (GstPostProc *) element; /* don't go to play if we don't have mode and context */ @@ -413,10 +413,10 @@ gst_postproc_set_property ( GObject * object, guint prop_id, - const GValue * value, - GParamSpec *pspec ) + const GValue * value, + GParamSpec *pspec ) - GstPostProc *postproc = (GstPostProc *) object; + GstPostProc *postproc = (GstPostProc *) object; gint quality; switch (prop_id) { @@ -434,9 +434,9 @@ gst_postproc_get_property ( GObject * object, guint prop_id, - GValue * value, GParamSpec *pspec ) + GValue * value, GParamSpec *pspec ) case ARG_QUALITY: @@ -451,7 +451,7 @@ gst_postproc_register(GstPlugin * plugin) - GTypeInfo typeinfo = { + GTypeInfo typeinfo = { sizeof (GstPostProcClass), (GBaseInitFunc) gst_postproc_base_init, NULL, @@ -463,15 +463,15 @@ (GInstanceInitFunc) gst_postproc_init, }; GType type; - int i; + int i; global_plugins = g_hash_table_new (NULL, NULL); for (i = 0; filterdetails[i].shortname; i++) { - gchar *type_name; + gchar *type_name; g_hash_table_insert (global_plugins, - GINT_TO_POINTER (0), - GINT_TO_POINTER (i)); + GINT_TO_POINTER (0), + GINT_TO_POINTER (i)); /* create type_name */ type_name = g_strdup_printf("postproc_%s", filterdetails[i].longname); @@ -484,8 +484,8 @@ type = g_type_register_static (GST_TYPE_ELEMENT, type_name, &typeinfo, 0); - GINT_TO_POINTER (type), + GINT_TO_POINTER (type), /* register element */ if (!gst_element_register (plugin, type_name, GST_RANK_PRIMARY, type)) { |