diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libxinevdec/yuv.c | 15 | ||||
-rw-r--r-- | src/xine-engine/buffer.h | 3 | ||||
-rw-r--r-- | src/xine-engine/buffer_types.c | 10 |
3 files changed, 24 insertions, 4 deletions
diff --git a/src/libxinevdec/yuv.c b/src/libxinevdec/yuv.c index 05eba1207..9ee9ad678 100644 --- a/src/libxinevdec/yuv.c +++ b/src/libxinevdec/yuv.c @@ -21,7 +21,7 @@ * Actually, this decoder just reorganizes chunks of raw YUV data in such * a way that xine can display them. * - * $Id: yuv.c,v 1.2 2002/07/15 21:42:34 esnel Exp $ + * $Id: yuv.c,v 1.3 2002/08/28 14:03:30 miguelfreitas Exp $ */ #include <stdio.h> @@ -62,7 +62,8 @@ typedef struct yuv_decoder_s { static int yuv_can_handle (video_decoder_t *this_gen, int buf_type) { - return (buf_type == BUF_VIDEO_YVU9); + return (buf_type == BUF_VIDEO_YVU9 || + buf_type == BUF_VIDEO_GREY); } /* @@ -183,6 +184,16 @@ static void yuv_decode_data (video_decoder_t *this_gen, c_plane_y_ptr += c_plane_stride * 2; } } + } else if (buf->type == BUF_VIDEO_GREY) { + + img = this->video_out->get_frame (this->video_out, + this->width, this->height, + 42, IMGFMT_YV12, VO_BOTH_FIELDS); + + xine_fast_memcpy(img->base[0], this->buf, this->width * this->height); + memset( img->base[1], 0x80, this->width * this->height / 4 ); + memset( img->base[2], 0x80, this->width * this->height / 4 ); + } else { /* just allocate something to avoid compiler warnings */ diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h index 8431e5d46..3383724df 100644 --- a/src/xine-engine/buffer.h +++ b/src/xine-engine/buffer.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: buffer.h,v 1.63 2002/08/12 00:11:54 tmmm Exp $ + * $Id: buffer.h,v 1.64 2002/08/28 14:03:29 miguelfreitas Exp $ * * * contents: @@ -124,6 +124,7 @@ extern "C" { #define BUF_VIDEO_TSCC 0x022B0000 #define BUF_VIDEO_YVU9 0x022C0000 #define BUF_VIDEO_VQA 0x022D0000 +#define BUF_VIDEO_GREY 0x022E0000 /* audio buffer types: (please keep in sync with buffer_types.c) */ diff --git a/src/xine-engine/buffer_types.c b/src/xine-engine/buffer_types.c index 43edba95a..900ba8200 100644 --- a/src/xine-engine/buffer_types.c +++ b/src/xine-engine/buffer_types.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: buffer_types.c,v 1.37 2002/08/09 00:24:58 tmmm Exp $ + * $Id: buffer_types.c,v 1.38 2002/08/28 14:03:30 miguelfreitas Exp $ * * * contents: @@ -447,6 +447,14 @@ static video_db_t video_db[] = { BUF_VIDEO_YVU9, "Raw YVU9 Planar Data" }, +{ + { + meFOURCC('G', 'R', 'E', 'Y'), + 0 + }, + BUF_VIDEO_GREY, + "Raw greyscale" +}, { { 0 }, 0, "last entry" } }; |