mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 01:31:03 +00:00
Fixed an MMX IDCT bug.
Original commit message from CVS: Fixed an MMX IDCT bug. Fixed a color conversion bug. Initial work for multiply avi codecs.
This commit is contained in:
parent
3f0b3470a3
commit
fff99983ad
5 changed files with 31 additions and 17 deletions
|
@ -18,6 +18,12 @@
|
|||
*/
|
||||
|
||||
//#define DEBUG_ENABLED
|
||||
//#define STATUS_ENABLED
|
||||
#ifdef STATUS_ENABLED
|
||||
#define STATUS(A) g_print(A)
|
||||
#else
|
||||
#define STATUS(A)
|
||||
#endif
|
||||
|
||||
#include <gstqueue.h>
|
||||
|
||||
|
@ -158,7 +164,7 @@ void gst_queue_chain(GstPad *pad,GstBuffer *buf) {
|
|||
GST_UNLOCK(queue);
|
||||
while (queue->level_buffers >= queue->max_buffers) {
|
||||
g_mutex_lock(queue->fulllock);
|
||||
//g_print("O");
|
||||
STATUS("O");
|
||||
g_cond_wait(queue->fullcond,queue->fulllock);
|
||||
g_mutex_unlock(queue->fulllock);
|
||||
}
|
||||
|
@ -178,7 +184,7 @@ void gst_queue_chain(GstPad *pad,GstBuffer *buf) {
|
|||
// queue->tail = g_list_next(queue->tail);
|
||||
queue->queue = g_list_append(queue->queue,buf);
|
||||
}
|
||||
//g_print("+");
|
||||
STATUS("+");
|
||||
|
||||
/* if we were empty, but aren't any more, signal a condition */
|
||||
tosignal = (queue->level_buffers <= 0);
|
||||
|
@ -210,7 +216,7 @@ void gst_queue_push(GstConnection *connection) {
|
|||
GST_UNLOCK(queue);
|
||||
while (!queue->level_buffers) {
|
||||
g_mutex_lock(queue->emptylock);
|
||||
//g_print("U");
|
||||
STATUS("U");
|
||||
g_cond_wait(queue->emptycond,queue->emptylock);
|
||||
g_mutex_unlock(queue->emptylock);
|
||||
}
|
||||
|
@ -222,7 +228,7 @@ void gst_queue_push(GstConnection *connection) {
|
|||
queue->queue = g_list_remove_link(queue->queue,front);
|
||||
g_list_free(front);
|
||||
queue->level_buffers--;
|
||||
//g_print("-%d", queue->level_buffers);
|
||||
STATUS("-");
|
||||
tosignal = queue->level_buffers < queue->max_buffers;
|
||||
GST_UNLOCK(queue);
|
||||
|
||||
|
|
|
@ -70,9 +70,9 @@ static void gst_colorspace_rgb24_to_bgr24(GstColorSpace *space, unsigned char *s
|
|||
gint size;
|
||||
gchar temp;
|
||||
|
||||
DEBUG("gst_colorspace_rgb24_to_bgr24\n");
|
||||
printf("gst_colorspace_rgb24_to_bgr24 %p %p %d\n", src, dest, space->outsize);
|
||||
|
||||
size = space->outsize;
|
||||
size = space->outsize/3;
|
||||
|
||||
if (src == dest) {
|
||||
while (size--) {
|
||||
|
|
|
@ -18,6 +18,12 @@
|
|||
*/
|
||||
|
||||
//#define DEBUG_ENABLED
|
||||
//#define STATUS_ENABLED
|
||||
#ifdef STATUS_ENABLED
|
||||
#define STATUS(A) g_print(A)
|
||||
#else
|
||||
#define STATUS(A)
|
||||
#endif
|
||||
|
||||
#include <gstqueue.h>
|
||||
|
||||
|
@ -158,7 +164,7 @@ void gst_queue_chain(GstPad *pad,GstBuffer *buf) {
|
|||
GST_UNLOCK(queue);
|
||||
while (queue->level_buffers >= queue->max_buffers) {
|
||||
g_mutex_lock(queue->fulllock);
|
||||
//g_print("O");
|
||||
STATUS("O");
|
||||
g_cond_wait(queue->fullcond,queue->fulllock);
|
||||
g_mutex_unlock(queue->fulllock);
|
||||
}
|
||||
|
@ -178,7 +184,7 @@ void gst_queue_chain(GstPad *pad,GstBuffer *buf) {
|
|||
// queue->tail = g_list_next(queue->tail);
|
||||
queue->queue = g_list_append(queue->queue,buf);
|
||||
}
|
||||
//g_print("+");
|
||||
STATUS("+");
|
||||
|
||||
/* if we were empty, but aren't any more, signal a condition */
|
||||
tosignal = (queue->level_buffers <= 0);
|
||||
|
@ -210,7 +216,7 @@ void gst_queue_push(GstConnection *connection) {
|
|||
GST_UNLOCK(queue);
|
||||
while (!queue->level_buffers) {
|
||||
g_mutex_lock(queue->emptylock);
|
||||
//g_print("U");
|
||||
STATUS("U");
|
||||
g_cond_wait(queue->emptycond,queue->emptylock);
|
||||
g_mutex_unlock(queue->emptylock);
|
||||
}
|
||||
|
@ -222,7 +228,7 @@ void gst_queue_push(GstConnection *connection) {
|
|||
queue->queue = g_list_remove_link(queue->queue,front);
|
||||
g_list_free(front);
|
||||
queue->level_buffers--;
|
||||
//g_print("-%d", queue->level_buffers);
|
||||
STATUS("-");
|
||||
tosignal = queue->level_buffers < queue->max_buffers;
|
||||
GST_UNLOCK(queue);
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) {
|
|||
// construct internal pipeline elements
|
||||
parse_audio = gst_elementfactory_make("ac3parse","parse_audio");
|
||||
g_return_if_fail(parse_audio != NULL);
|
||||
gtk_object_set(GTK_OBJECT(parse_audio),"skip", 20, NULL);
|
||||
gtk_object_set(GTK_OBJECT(parse_audio),"skip", 0, NULL);
|
||||
decode = gst_elementfactory_make("ac3dec","decode_audio");
|
||||
g_return_if_fail(decode != NULL);
|
||||
audio_resample = gst_elementfactory_make("audioscale","audioscale");
|
||||
|
@ -141,7 +141,7 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) {
|
|||
g_return_if_fail(decode_video != NULL);
|
||||
videoscale = gst_elementfactory_make("videoscale","videoscale");
|
||||
g_return_if_fail(videoscale != NULL);
|
||||
gtk_object_set(GTK_OBJECT(videoscale),"width",352, "height", 288,NULL);
|
||||
gtk_object_set(GTK_OBJECT(videoscale),"width",352, "height", 240,NULL);
|
||||
median = gst_elementfactory_make("median","median");
|
||||
g_return_if_fail(median != NULL);
|
||||
gtk_object_set(GTK_OBJECT(median),"filtersize",9,NULL);
|
||||
|
@ -151,7 +151,7 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) {
|
|||
gtk_object_set(GTK_OBJECT(smooth),"tolerance",9,NULL);
|
||||
encode = gst_elementfactory_make("mpeg2enc","encode");
|
||||
g_return_if_fail(encode != NULL);
|
||||
gtk_object_set(GTK_OBJECT(encode),"frames_per_second",25.0,NULL);
|
||||
gtk_object_set(GTK_OBJECT(encode),"frames_per_second",29.97,NULL);
|
||||
//encode = gst_elementfactory_make("mpeg1encoder","encode");
|
||||
//gtk_object_set(GTK_OBJECT(show),"width",640, "height", 480,NULL);
|
||||
|
||||
|
|
|
@ -30,8 +30,9 @@ int main(int argc,char *argv[]) {
|
|||
encoderfactory = gst_elementfactory_find("aviencoder");
|
||||
encoder = gst_elementfactory_create(encoderfactory,"aviencoder");
|
||||
gtk_object_set(GTK_OBJECT(videosrc),"width",384,"height",288,NULL);
|
||||
gtk_object_set(GTK_OBJECT(videosrc),"format",9,NULL);
|
||||
|
||||
gtk_object_set(GTK_OBJECT(encoder),"video","00:MJPG",NULL);
|
||||
gtk_object_set(GTK_OBJECT(encoder),"video","00:I420",NULL);
|
||||
|
||||
fd = open(argv[1],O_CREAT|O_RDWR|O_TRUNC);
|
||||
|
||||
|
@ -48,10 +49,11 @@ int main(int argc,char *argv[]) {
|
|||
gst_bin_add(GST_BIN(video_thread),GST_ELEMENT(encoder));
|
||||
gst_bin_add(GST_BIN(video_thread),GST_ELEMENT(fdsink));
|
||||
|
||||
|
||||
/* connect src to sink */
|
||||
gst_element_add_ghost_pad(GST_ELEMENT(video_thread),
|
||||
gst_element_get_pad(compress,"sink"));
|
||||
gst_pad_connect(gst_element_get_pad(compress,"src"),
|
||||
// gst_element_get_pad(compress,"sink"));
|
||||
//gst_pad_connect(gst_element_get_pad(compress,"src"),
|
||||
gst_element_get_pad(encoder,"video_00"));
|
||||
gst_pad_connect(gst_element_get_pad(encoder,"src"),
|
||||
gst_element_get_pad(fdsink,"sink"));
|
||||
|
@ -65,7 +67,7 @@ int main(int argc,char *argv[]) {
|
|||
gst_pad_connect(gst_element_get_pad(videosrc, "src"),
|
||||
gst_element_get_pad(video_queue,"sink"));
|
||||
gst_pad_connect(gst_element_get_pad(video_queue,"src"),
|
||||
gst_element_get_pad(video_thread,"sink"));
|
||||
gst_element_get_pad(video_thread,"video_00"));
|
||||
|
||||
gtk_object_set(GTK_OBJECT(video_thread),"create_thread",TRUE,NULL);
|
||||
g_print("\neverything's built, setting it up to be runnable\n");
|
||||
|
|
Loading…
Reference in a new issue