[Mplayer-cvslog] CVS: main/libmpcodecs vd_svq1.c,NONE,1.1 Makefile,1.47,1.48 vd.c,1.41,1.42

Arpi of Ize arpi at mplayerhq.hu
Sun Jun 23 01:09:43 CEST 2002


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

Modified Files:
	Makefile vd.c 
Added Files:
	vd_svq1.c 
Log Message:
SVQ1 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 = {
	"SVQ1 (Sorenson v1) Video decoder",
	"svq1",
	VFM_SVQ1,
	"A'rpi",
	"XINE team",
	"native codec"
};

LIBVD_EXTERN(svq1)

#include "native/svq1.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){
    if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YVU9)) return 0;

    sh->context=malloc(sizeof(svq1_t));
    memset(sh->context,0,sizeof(svq1_t));
    
    return 1;
}

// uninit driver
static void uninit(sh_video_t *sh){
    svq1_free(sh->context);
    sh->context=NULL;
}

// decode a frame
static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
    mp_image_t* mpi;
    svq1_t* svq1=sh->context;
    int ret;
    
    if(len<=0) return NULL; // skipped frame
    
    ret=svq1_decode_frame(svq1,data);
    
    mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, MP_IMGFLAG_PRESERVE, 
	sh->disp_w, sh->disp_h);
    if(!mpi) return NULL;
    
    mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"SVQ1: ret=%d wh=%dx%d p=%p   \n",ret,svq1->width,svq1->height,svq1->current);
    
    mpi->planes[0]=svq1->base[0];
    mpi->planes[1]=svq1->base[1];
    mpi->planes[2]=svq1->base[2];
    mpi->stride[0]=svq1->luma_width;
    mpi->stride[1]=mpi->stride[2]=svq1->chroma_width;
    
    return mpi;
}


Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/Makefile,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- Makefile	21 Jun 2002 17:39:39 -0000	1.47
+++ Makefile	22 Jun 2002 23:09:40 -0000	1.48
@@ -5,10 +5,10 @@
 LIBNAME2 = libmpencoders.a
 
 AUDIO_SRCS=dec_audio.c ad.c ad_a52.c ad_acm.c ad_alaw.c ad_dk3adpcm.c ad_dk4adpcm.c ad_dshow.c ad_dvdpcm.c ad_ffmpeg.c ad_hwac3.c ad_imaadpcm.c ad_mp3.c ad_msadpcm.c ad_pcm.c ad_roqaudio.c ad_msgsm.c ad_faad.c ad_vorbis.c ad_libmad.c ad_real.c
-VIDEO_SRCS=dec_video.c vd.c vd_null.c vd_real.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_msvidc.c vd_fli.c vd_qtrle.c vd_qtsmc.c vd_roqvideo.c vd_cyuv.c vd_nuv.c vd_libmpeg2.c vd_msrle.c vd_huffyuv.c vd_zlib.c vd_mpegpes.c
+VIDEO_SRCS=dec_video.c vd.c vd_null.c vd_real.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_msvidc.c vd_fli.c vd_qtrle.c vd_qtsmc.c vd_roqvideo.c vd_cyuv.c vd_nuv.c vd_libmpeg2.c vd_msrle.c vd_huffyuv.c vd_zlib.c vd_mpegpes.c vd_svq1.c
 VFILTER_SRCS=vf.c vf_vo.c vf_crop.c vf_expand.c vf_pp.c vf_scale.c vf_format.c vf_yuy2.c vf_flip.c vf_rgb2bgr.c vf_rotate.c vf_mirror.c vf_palette.c vf_lavc.c vf_dvbscale.c vf_cropdetect.c vf_test.c vf_noise.c vf_yvu9.c
 ENCODER_SRCS=ve.c ve_divx4.c ve_lavc.c ve_vfw.c ve_rawrgb.c ve_libdv.c
-NATIVE_SRCS=native/RTjpegN.c native/cinepak.c native/cyuv.c native/fli.c native/minilzo.c native/msvidc.c native/nuppelvideo.c native/qtrle.c native/qtrpza.c native/qtsmc.c native/roqav.c native/xa_gsm.c
+NATIVE_SRCS=native/RTjpegN.c native/cinepak.c native/cyuv.c native/fli.c native/minilzo.c native/msvidc.c native/nuppelvideo.c native/qtrle.c native/qtrpza.c native/qtsmc.c native/roqav.c native/xa_gsm.c native/svq1.c
 
 ifeq ($(FAME),yes)
 VFILTER_SRCS += vf_fame.c

Index: vd.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- vd.c	8 Jun 2002 20:51:50 -0000	1.41
+++ vd.c	22 Jun 2002 23:09:40 -0000	1.42
@@ -51,6 +51,7 @@
 extern vd_functions_t mpcodecs_vd_zlib;
 extern vd_functions_t mpcodecs_vd_mpegpes;
 extern vd_functions_t mpcodecs_vd_real;
+extern vd_functions_t mpcodecs_vd_svq1;
 
 vd_functions_t* mpcodecs_vd_drivers[] = {
         &mpcodecs_vd_null,
@@ -99,6 +100,7 @@
 #ifdef USE_REALCODECS
 	&mpcodecs_vd_real,
 #endif
+	&mpcodecs_vd_svq1,
 	NULL
 };
 




More information about the MPlayer-cvslog mailing list