[Mplayer-cvslog] CVS: main/libmpcodecs vd_cyuv.c,NONE,1.1 vd_nuv.c,NONE,1.1 vd_qtrle.c,NONE,1.1 vd_qtsmc.c,NONE,1.1 vd_roqvideo.c,NONE,1.1 Makefile,1.9,1.10 vd.c,1.12,1.13

Arpi of Ize arpi at mplayer.dev.hu
Fri Mar 8 08:14:46 CET 2002


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mplayer:/var/tmp.root/cvs-serv25895

Modified Files:
	Makefile vd.c 
Added Files:
	vd_cyuv.c vd_nuv.c vd_qtrle.c vd_qtsmc.c vd_roqvideo.c 
Log Message:
cyuv, nuv, qtrle, qtsmc, roq added

--- NEW FILE ---
#include <stdio.h>
#include <stdlib.h>

#include "config.h"
#include "mp_msg.h"

#include "vd_internal.h"

static vd_info_t info = {
	"Creative YUV decoder",
	"cyuv",
	VFM_CYUV,
	"A'rpi",
	"Dr. Tim Ferguson",
	"native codec"
};

LIBVD_EXTERN(cyuv)

// to set/get/query special features/parameters
static int control(sh_video_t *sh,int cmd,void* arg,...){
    return CONTROL_UNKNOWN;
}

// init driver
static int init(sh_video_t *sh){
    mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_UYVY);
    return 1;
}

// uninit driver
static void uninit(sh_video_t *sh){
}

//mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, int w, int h);

void decode_cyuv(
  unsigned char *buf,
  int size,
  unsigned char *frame,
  int width,
  int height,
  int bit_per_pixel);

// decode a frame
static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
    mp_image_t* mpi;
    if(len<=0) return NULL; // skipped frame
    
    mpi=mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, 0, 
	sh->disp_w, sh->disp_h);
    if(!mpi) return NULL;

    decode_cyuv(data, len, mpi->planes[0], sh->disp_w, sh->disp_h, 0);

    return mpi;
}

--- NEW FILE ---
#include <stdio.h>
#include <stdlib.h>

#include "config.h"
#include "mp_msg.h"

#include "vd_internal.h"

static vd_info_t info = {
	"NuppelVideo decoder",
	"nuv",
	VFM_NUV,
	"A'rpi",
	"Alex & Panagiotis Issaris <takis at lumumba.luc.ac.be>",
	"native codecs"
};

LIBVD_EXTERN(nuv)

// to set/get/query special features/parameters
static int control(sh_video_t *sh,int cmd,void* arg,...){
    return CONTROL_UNKNOWN;
}

// init driver
static int init(sh_video_t *sh){
    mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_I420);
    return 1;
}

// uninit driver
static void uninit(sh_video_t *sh){
}

//mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, int w, int h);

void decode_nuv(
  unsigned char *encoded,
  int encoded_size,
  unsigned char *decoded,
  int width,
  int height);

// decode a frame
static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
    mp_image_t* mpi;
    if(len<=0) return NULL; // skipped frame
    
    mpi=mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, 0, 
	sh->disp_w, sh->disp_h);
    if(!mpi) return NULL;

    decode_nuv(data, len, mpi->planes[0], sh->disp_w, sh->disp_h);

    return mpi;
}

--- NEW FILE ---
#include <stdio.h>
#include <stdlib.h>

#include "config.h"
#include "mp_msg.h"

#include "vd_internal.h"

static vd_info_t info = {
	"Quicktime Animation (RLE) decoder",
	"qtrle",
	VFM_QTRLE,
	"A'rpi",
	"Mike Melanson",
	"native codec"
};

LIBVD_EXTERN(qtrle)

// to set/get/query special features/parameters
static int control(sh_video_t *sh,int cmd,void* arg,...){
    return CONTROL_UNKNOWN;
}

// init driver
static int init(sh_video_t *sh){
  if (sh->bih->biBitCount != 24){
    mp_msg(MSGT_DECVIDEO,MSGL_ERR,
    "    *** FYI: This Quicktime file is using %d-bit RLE Animation\n" \
    "    encoding, which is not yet supported by MPlayer. But if you upload\n" \
    "    this Quicktime file to the MPlayer FTP, the team could look at it.\n",
    sh->bih->biBitCount);
    return 0;
  }
    
    mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_BGR24);
    return 1;
}

// uninit driver
static void uninit(sh_video_t *sh){
}

//mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, int w, int h);

void qt_decode_rle(
  unsigned char *encoded,
  int encoded_size,
  unsigned char *decoded,
  int width,
  int height,
  int encoded_bpp,
  int bytes_per_pixel);

// decode a frame
static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
    mp_image_t* mpi;
    if(len<=0) return NULL; // skipped frame
    
    mpi=mpcodecs_get_image(sh, MP_IMGTYPE_STATIC, MP_IMGFLAG_PRESERVE, 
	sh->disp_w, sh->disp_h);
    if(!mpi) return NULL;

    qt_decode_rle(
        data,len, mpi->planes[0],
        sh->disp_w, sh->disp_h,
        sh->bih->biBitCount,
        mpi->bpp/8);
    
    return mpi;
}

--- NEW FILE ---
#include <stdio.h>
#include <stdlib.h>

#include "config.h"
#include "mp_msg.h"

#include "vd_internal.h"

static vd_info_t info = {
	"Apple Graphics (SMC) decoder",
	"qtsmc",
	VFM_QTSMC,
	"A'rpi",
	"Mike Melanson",
	"native codec"
};

LIBVD_EXTERN(qtsmc)

// to set/get/query special features/parameters
static int control(sh_video_t *sh,int cmd,void* arg,...){
    return CONTROL_UNKNOWN;
}

int qt_init_decode_smc(void);

// init driver
static int init(sh_video_t *sh){
    if (qt_init_decode_smc() != 0){
	mp_msg(MSGT_DECVIDEO, MSGL_ERR, "SMC decoder could not allocate enough memory");
	return 0;
    }
    
    mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_BGR24);
    return 1;
}

// uninit driver
static void uninit(sh_video_t *sh){
}

//mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, int w, int h);

void qt_decode_smc(
  unsigned char *encoded,
  int encoded_size,
  unsigned char *decoded,
  int width,
  int height,
  unsigned char *palette_map,
  int bytes_per_pixel);

// decode a frame
static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
    mp_image_t* mpi;
    if(len<=0) return NULL; // skipped frame
    
    mpi=mpcodecs_get_image(sh, MP_IMGTYPE_STATIC, MP_IMGFLAG_PRESERVE, 
	sh->disp_w, sh->disp_h);
    if(!mpi) return NULL;

    qt_decode_smc(
        data,len, mpi->planes[0],
        sh->disp_w, sh->disp_h,
        (unsigned char *)sh->bih+40,
        mpi->bpp/8);
    
    return mpi;
}

--- NEW FILE ---
#include <stdio.h>
#include <stdlib.h>

#include "config.h"
#include "mp_msg.h"

#include "vd_internal.h"

static vd_info_t info = {
	"Id RoQ File Video decoder",
	"roqvideo",
	VFM_ROQVIDEO,
	"A'rpi",
	"Mike Melanson",
	"native codec"
};

LIBVD_EXTERN(roqvideo)

#include "roqav.h"

// to set/get/query special features/parameters
static int control(sh_video_t *sh,int cmd,void* arg,...){
    return CONTROL_UNKNOWN;
}

// init driver
static int init(sh_video_t *sh){
    sh->context = roq_decode_video_init();
    mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YV12);
    return 1;
}

// uninit driver
static void uninit(sh_video_t *sh){
}

//mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, int w, int h);

// decode a frame
static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
    mp_image_t* mpi;
    if(len<=0) return NULL; // skipped frame
    
    mpi=mpcodecs_get_image(sh, MP_IMGTYPE_IP, MP_IMGFLAG_PRESERVE | MP_IMGFLAG_READABLE, 
	sh->disp_w, sh->disp_h);
    if(!mpi) return NULL;

    roq_decode_video(sh->context, data, len, mpi);

    return mpi;
}

Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/Makefile,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Makefile	7 Mar 2002 21:06:59 -0000	1.9
+++ Makefile	8 Mar 2002 07:14:34 -0000	1.10
@@ -3,7 +3,7 @@
 
 LIBNAME = libmpcodecs.a
 
-SRCS=dec_video.c vd.c vd_null.c vd_cinepak.c vd_qtrpza.c vd_ffmpeg.c vd_dshow.c vd_vfw.c vd_odivx.c vd_divx4.c vd_raw.c vd_xanim.c vd_rle.c vd_msvidc.c vd_fli.c
+SRCS=dec_video.c vd.c vd_null.c vd_cinepak.c vd_qtrpza.c vd_ffmpeg.c vd_dshow.c vd_vfw.c vd_odivx.c vd_divx4.c vd_raw.c vd_xanim.c vd_rle.c vd_msvidc.c vd_fli.c vd_qtrle.c vd_qtsmc.c vd_roqvideo.c vd_cyuv.c vd_nuv.c
 
 OBJS=$(SRCS:.c=.o)
 

Index: vd.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- vd.c	7 Mar 2002 21:06:59 -0000	1.12
+++ vd.c	8 Mar 2002 07:14:34 -0000	1.13
@@ -35,6 +35,11 @@
 extern vd_functions_t mpcodecs_vd_rle;
 extern vd_functions_t mpcodecs_vd_msvidc;
 extern vd_functions_t mpcodecs_vd_fli;
+extern vd_functions_t mpcodecs_vd_qtrle;
+extern vd_functions_t mpcodecs_vd_qtsmc;
+extern vd_functions_t mpcodecs_vd_roqvideo;
+extern vd_functions_t mpcodecs_vd_cyuv;
+extern vd_functions_t mpcodecs_vd_nuv;
 
 vd_functions_t* mpcodecs_vd_drivers[] = {
         &mpcodecs_vd_null,
@@ -60,6 +65,11 @@
         &mpcodecs_vd_rle,
         &mpcodecs_vd_msvidc,
         &mpcodecs_vd_fli,
+        &mpcodecs_vd_qtrle,
+        &mpcodecs_vd_qtsmc,
+        &mpcodecs_vd_roqvideo,
+        &mpcodecs_vd_cyuv,
+        &mpcodecs_vd_nuv,
 #ifdef USE_XANIM
         &mpcodecs_vd_xanim,
 #endif




More information about the MPlayer-cvslog mailing list