summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Melanson <mike@multimedia.cx>2002-10-04 04:55:43 +0000
committerMike Melanson <mike@multimedia.cx>2002-10-04 04:55:43 +0000
commit6190ad7c794c2e64039651b76c0ee024a1914e24 (patch)
tree3f298fdc49531c6a26f994001c43e27c1fd415c2 /src
parentb11ce1489f6292ebda9e1e4c309694a465c83f90 (diff)
downloadxine-lib-6190ad7c794c2e64039651b76c0ee024a1914e24.tar.gz
xine-lib-6190ad7c794c2e64039651b76c0ee024a1914e24.tar.bz2
added support for raw YV12 data
CVS patchset: 2780 CVS date: 2002/10/04 04:55:43
Diffstat (limited to 'src')
-rw-r--r--src/libxinevdec/yuv.c19
-rw-r--r--src/xine-engine/buffer.h3
2 files changed, 19 insertions, 3 deletions
diff --git a/src/libxinevdec/yuv.c b/src/libxinevdec/yuv.c
index a6e2d3d71..f93c8a610 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.7 2002/09/13 03:03:42 tmmm Exp $
+ * $Id: yuv.c,v 1.8 2002/10/04 04:55:44 tmmm Exp $
*/
#include <stdio.h>
@@ -135,7 +135,21 @@ static void yuv_decode_data (video_decoder_t *this_gen,
if (buf->decoder_flags & BUF_FLAG_FRAME_END) {
- if (buf->type == BUF_VIDEO_YVU9) {
+ if (buf->type == BUF_VIDEO_YV12) {
+
+ img = this->video_out->get_frame (this->video_out,
+ this->width, this->height,
+ 42, XINE_IMGFMT_YV12, VO_BOTH_FIELDS);
+
+ xine_fast_memcpy(img->base[0], this->buf, this->width * this->height);
+ xine_fast_memcpy(img->base[1], this->buf + this->width * this->height,
+ (this->width * this->height) / 4);
+ xine_fast_memcpy(img->base[2],
+ this->buf + (this->width * this->height) +
+ ((this->width * this->height) / 4),
+ (this->width * this->height) / 4);
+
+ } else if (buf->type == BUF_VIDEO_YVU9) {
img = this->video_out->get_frame (this->video_out,
this->width, this->height,
@@ -303,6 +317,7 @@ static void *init_video_decoder_plugin (xine_t *xine, void *data) {
*/
static uint32_t video_types[] = {
+ BUF_VIDEO_YV12,
BUF_VIDEO_YVU9,
BUF_VIDEO_GREY,
0
diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h
index 3ecbfc7c9..e1683c122 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.69 2002/09/13 18:25:23 guenter Exp $
+ * $Id: buffer.h,v 1.70 2002/10/04 04:55:43 tmmm Exp $
*
*
* contents:
@@ -128,6 +128,7 @@ extern "C" {
#define BUF_VIDEO_GREY 0x022E0000
#define BUF_VIDEO_XXAN 0x022F0000
#define BUF_VIDEO_WC3 0x02300000
+#define BUF_VIDEO_YV12 0x02310000
/* audio buffer types: (please keep in sync with buffer_types.c) */