diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2010-01-21 03:34:46 +0000 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2010-01-21 03:34:46 +0000 |
commit | ca6d300b39eb9a8bb31de2e33b03ecf96e2e0b60 (patch) | |
tree | 6e7945d259b295ace8161791769bded15b55997b /src | |
parent | 85bd1c93b079c8b42362111efda3bbfab207d149 (diff) | |
parent | f82784e051769a6674639aa0e5080430b4ceaf21 (diff) | |
download | xine-lib-ca6d300b39eb9a8bb31de2e33b03ecf96e2e0b60.tar.gz xine-lib-ca6d300b39eb9a8bb31de2e33b03ecf96e2e0b60.tar.bz2 |
Merge from 1.1.
Diffstat (limited to 'src')
-rw-r--r-- | src/combined/ffmpeg/ff_video_decoder.c | 16 | ||||
-rw-r--r-- | src/demuxers/demux_ts.c | 17 | ||||
-rw-r--r-- | src/video_out/video_out_opengl.c | 15 |
3 files changed, 18 insertions, 30 deletions
diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c index 08c554aa0..726945acd 100644 --- a/src/combined/ffmpeg/ff_video_decoder.c +++ b/src/combined/ffmpeg/ff_video_decoder.c @@ -50,22 +50,6 @@ # include <libpostproc/postprocess.h> #endif -/* As of 2010-01-17, libavutil trunk doesn't define a few useful macros. - * While we may still be able to #define things to cause them to be used, - * it's safest to assume that they'll go away. - */ -#ifndef PIX_FMT_RGB32 -# ifdef WORDS_BIGENDIAN -# define PIX_FMT_RGB32 PIX_FMT_ARGB -# define PIX_FMT_RGB555 PIX_FMT_RGB555BE -# define PIX_FMT_RGB565 PIX_FMT_RGB565BE -# else -# define PIX_FMT_RGB32 PIX_FMT_BGRA -# define PIX_FMT_RGB555 PIX_FMT_RGB555LE -# define PIX_FMT_RGB565 PIX_FMT_RGB565LE -# endif -#endif - #define VIDEOBUFSIZE (128*1024) #define SLICE_BUFFER_SIZE (1194*1024) diff --git a/src/demuxers/demux_ts.c b/src/demuxers/demux_ts.c index 8c8250cf4..60ff2cbcb 100644 --- a/src/demuxers/demux_ts.c +++ b/src/demuxers/demux_ts.c @@ -973,6 +973,7 @@ static void demux_ts_buffer_pes(demux_ts_t*this, unsigned char *ts, m->buf->decoder_flags |= BUF_FLAG_FRAME_END; } m->buf->pts = m->pts; + m->pts = 0; m->buf->decoder_info[0] = 1; if( this->input->get_length (this->input) ) @@ -981,12 +982,12 @@ static void demux_ts_buffer_pes(demux_ts_t*this, unsigned char *ts, if (this->rate) m->buf->extra_info->input_time = (int)((int64_t)this->input->get_current_pos (this->input) * 1000 / (this->rate * 50)); +#ifdef TS_LOG + printf ("demux_ts: produced buffer, pts=%lld\n", m->buf->pts); +#endif m->fifo->put(m->fifo, m->buf); m->buffered_bytes = 0; m->buf = NULL; /* forget about buf -- not our responsibility anymore */ -#ifdef TS_LOG - printf ("demux_ts: produced buffer, pts=%lld\n", m->pts); -#endif } /* allocate the buffer here, as pes_header needs a valid buf for dvbsubs */ m->buf = m->fifo->buffer_pool_alloc(m->fifo); @@ -1019,6 +1020,7 @@ static void demux_ts_buffer_pes(demux_ts_t*this, unsigned char *ts, m->buf->size = m->buffered_bytes; m->buf->type = m->type; m->buf->pts = m->pts; + m->pts = 0; m->buf->decoder_info[0] = 1; if( this->input->get_length (this->input) ) m->buf->extra_info->input_normpos = (int)( (double) this->input->get_current_pos (this->input) * @@ -1026,15 +1028,12 @@ static void demux_ts_buffer_pes(demux_ts_t*this, unsigned char *ts, if (this->rate) m->buf->extra_info->input_time = (int)((int64_t)this->input->get_current_pos (this->input) * 1000 / (this->rate * 50)); - +#ifdef TS_LOG + printf ("demux_ts: produced buffer, pts=%lld\n", m->buf->pts); +#endif m->fifo->put(m->fifo, m->buf); m->buffered_bytes = 0; m->buf = m->fifo->buffer_pool_alloc(m->fifo); - -#ifdef TS_LOG - printf ("demux_ts: produced buffer, pts=%lld\n", m->pts); -#endif - } memcpy(m->buf->mem + m->buffered_bytes, ts, len); m->buffered_bytes += len; diff --git a/src/video_out/video_out_opengl.c b/src/video_out/video_out_opengl.c index f39a8714c..1840dabf1 100644 --- a/src/video_out/video_out_opengl.c +++ b/src/video_out/video_out_opengl.c @@ -611,7 +611,7 @@ static int render_image_fp_yuv (opengl_driver_t *this, opengl_frame_t *frame) { return 0; } - ret = render_help_image_tex (this, frame->width+3, frame->height + h2 + 3, + ret = render_help_image_tex (this, w2 + frame->vo_frame.pitches[2] + 3, frame->height + h2 + 3, GL_LUMINANCE, GL_LUMINANCE); if (! ret) return 0; @@ -633,16 +633,21 @@ static int render_image_fp_yuv (opengl_driver_t *this, opengl_frame_t *frame) { this->glProgramEnvParameter4fARB (MYGL_FRAGMENT_PROGRAM_ARB, 0, 1.0 /this->tex_width, (float)(frame->height+2)/this->tex_height, - (float)(w2+1) /this->tex_width, + (float)(w2+2) /this->tex_width, 0); } + if (w2 & 7) + for (i = 0; i < h2; i++) { + frame->vo_frame.base[1][i*frame->vo_frame.pitches[1]+w2] = 128; + frame->vo_frame.base[2][i*frame->vo_frame.pitches[2]+w2] = 128; + } /* Load texture */ CHECKERR ("pre-texsubimage"); - glTexSubImage2D (GL_TEXTURE_2D, 0, 1, 0, frame->width, frame->height, + glTexSubImage2D (GL_TEXTURE_2D, 0, 1, 0, frame->vo_frame.pitches[0], frame->height, GL_LUMINANCE, GL_UNSIGNED_BYTE, frame->vo_frame.base[0]); - glTexSubImage2D (GL_TEXTURE_2D, 0, 1, frame->height+2, w2, h2, + glTexSubImage2D (GL_TEXTURE_2D, 0, 1, frame->height+2, frame->vo_frame.pitches[1], h2, GL_LUMINANCE, GL_UNSIGNED_BYTE, frame->vo_frame.base[1]); - glTexSubImage2D (GL_TEXTURE_2D, 0, w2+2, frame->height+2, w2, h2, + glTexSubImage2D (GL_TEXTURE_2D, 0, w2+2, frame->height+2, frame->vo_frame.pitches[2], h2, GL_LUMINANCE, GL_UNSIGNED_BYTE, frame->vo_frame.base[2]); CHECKERR ("texsubimage"); return 1; |