From: Guenter B. <gu...@us...> - 2002-04-06 21:08:32
|
Update of /cvsroot/xine/xine-lib/src/libdivx4 In directory usw-pr-cvs1:/tmp/cvs-serv18882 Modified Files: decore-if.h xine_decoder.c Log Message: divx5 codec support, patch contributed by heiko schaefer Index: decore-if.h =================================================================== RCS file: /cvsroot/xine/xine-lib/src/libdivx4/decore-if.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- decore-if.h 27 Oct 2001 04:30:39 -0000 1.2 +++ decore-if.h 6 Apr 2002 21:08:29 -0000 1.3 @@ -1,7 +1,7 @@ /* - * Copyright (C) 2001 the xine project + * Copyright (C) 2001-2002 the xine project * - * This file is part of xine, a unix video player. + * This file is part of xine, a free video player. * * xine is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -57,6 +57,12 @@ #define DEC_OPT_FRAME_311 6 #define DEC_OPT_SETPP2 7 #define DEC_OPT_VERSION 8 +#define DEC_OPT_SETPP_ADV 10 /* advanced (personalized) postprocessing settings */ +#define DEC_OPT_SETDEBUG 11 +#define DEC_OPT_INIT_VOL 12 +#define DEC_OPT_CONVERTYUV 13 +#define DEC_OPT_CONVERTYV12 14 +#define DEC_OPT_GETVOLINFO 15 /* decore() return values. */ #define DEC_OK 0 @@ -70,6 +76,7 @@ #define DEC_UYVY 2 #define DEC_420 3 #define DEC_YV12 13 /* looks like an afterthought, eh? */ +#define DEC_ARGB 14 /* colour formats -- rgb not yet used by xine, but perhaps in the future. @@ -123,6 +130,8 @@ int y_dim; /* frame height */ int output_format; /* refers to colour formats defined above */ int time_incr; /* mystery parameter, use 15 */ + int codec_version; + int build_number; DEC_BUFFERS buffers; /* memcpy 0's in this struct before init */ } DEC_PARAM; @@ -148,6 +157,16 @@ typedef struct { int postproc_level; /* between 0-100, actually used 0-60 */ + + int deblock_hor_luma; + int deblock_ver_luma; + int deblock_hor_chr; + int deblock_ver_chr; + int dering_luma; + int dering_chr; + + int pp_semaphore; + } DEC_SET; /* structure for DEC_USER output format, should be used instead of bmp ptr */ Index: xine_decoder.c =================================================================== RCS file: /cvsroot/xine/xine-lib/src/libdivx4/xine_decoder.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- xine_decoder.c 1 Apr 2002 17:59:40 -0000 1.23 +++ xine_decoder.c 6 Apr 2002 21:08:29 -0000 1.24 @@ -209,6 +209,13 @@ "divx4: Valid range 0-6, reduce if you get frame drop\n", this->postproc); setpp.postproc_level=this->postproc*10; + setpp.deblock_hor_luma = 0; + setpp.deblock_ver_luma = 0; + setpp.deblock_hor_chr = 0; + setpp.deblock_ver_chr = 0; + setpp.dering_luma = 0; + setpp.dering_chr = 0; + setpp.pp_semaphore = 0; ret = this->decore((unsigned long)this, DEC_OPT_SETPP, &setpp, 0); if (ret != DEC_OK) @@ -236,10 +243,17 @@ switch (buf->type & 0xFFFF0000) { case BUF_VIDEO_MSMPEG4_V12: case BUF_VIDEO_MSMPEG4_V3: - this->use_311_compat = 1; + if (this->version >= 20020303) { + param.codec_version=311; + this->use_311_compat = 0; + } else { + this->use_311_compat = 1; + } break; case BUF_VIDEO_MPEG4: this->use_311_compat = 0; + if (this->version >= 20020303) + param.codec_version=500; break; default: printf ("divx4: unknown video format (buftype: 0x%08X)\n", @@ -251,6 +265,7 @@ param.y_dim=this->biHeight; param.time_incr = 15; /* no idea what this does */ param.output_format=DEC_USER; + param.build_number=0; memset(¶m.buffers, 0, sizeof(param.buffers)); ret = this->decore((unsigned long)this, DEC_OPT_INIT, ¶m, &this->bih); |