From 0b36dc013f828fefabbdda856e9d649a87d1d1bc Mon Sep 17 00:00:00 2001 From: atmos4 Date: Thu, 21 Mar 2002 18:59:07 +0000 Subject: Im proved Build Version selection for DivX 5. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5248 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vd_divx4.c | 12 +++++++++++- libmpcodecs/vd_odivx.c | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/libmpcodecs/vd_divx4.c b/libmpcodecs/vd_divx4.c index f5e2b6e933..60dd80b66b 100644 --- a/libmpcodecs/vd_divx4.c +++ b/libmpcodecs/vd_divx4.c @@ -106,7 +106,17 @@ static int init(sh_video_t *sh){ return 0; } #ifdef DECORE_DIVX5 - dec_param.codec_version = (sh->format==mmioFOURCC('D','I','V','3'))?311:500; + switch(sh->format) { + case mmioFOURCC('D','I','V','3'): + dec_param.codec_version = 311; + break; + case mmioFOURCC('D','I','V','X'): + dec_param.codec_version = 400; + break; + case mmioFOURCC('D','X','5','0'): + default: // Fallback to DivX 5 behaviour + dec_param.codec_version = 500; + } dec_param.build_number = 0; #endif dec_param.x_dim = sh->disp_w; diff --git a/libmpcodecs/vd_odivx.c b/libmpcodecs/vd_odivx.c index 1a23f46631..e6fcaba8c8 100644 --- a/libmpcodecs/vd_odivx.c +++ b/libmpcodecs/vd_odivx.c @@ -120,7 +120,17 @@ static int init(sh_video_t *sh){ dec_param.color_depth = 32; #endif #ifdef DECORE_DIVX5 - dec_param.codec_version = (sh->format==mmioFOURCC('D','I','V','3'))?311:500; + switch(sh->format) { + case mmioFOURCC('D','I','V','3'): + dec_param.codec_version = 311; + break; + case mmioFOURCC('D','I','V','X'): + dec_param.codec_version = 400; + break; + case mmioFOURCC('D','X','5','0'): + default: // Fallback to DivX 5 behaviour + dec_param.codec_version = 500; + } dec_param.build_number = 0; #endif dec_param.x_dim = sh->disp_w; -- cgit v1.2.3