[MPlayer-users] ZLIB codec compression levels

Mario Valle mvalle at cscs.ch
Fri Nov 21 14:02:33 CET 2003


Correcting my own posting.
The compression definitions are correct! And those are the same definitions found in the zlib.h header file.
#define COMP_ZLIB_HISPEED 1
#define COMP_ZLIB_HICOMP 9
#define COMP_ZLIB_NORMAL -1

The bug instead is in the test for the compression level.
Those tests must be changed from (for example):
switch (hc->compression) {
   case COMP_ZLIB_HISPEED:
           mp_msg(MSGT_DECVIDEO, MSGL_INFO, "[LCL] High speed compression.\n");
           break;
   case COMP_ZLIB_HICOMP:
           mp_msg(MSGT_DECVIDEO, MSGL_INFO, "[LCL] High compression.\n");
           break;
   case COMP_ZLIB_NORMAL:
           mp_msg(MSGT_DECVIDEO, MSGL_INFO, "[LCL] Normal compression.\n");
           break;
   default:
           mp_msg(MSGT_DECVIDEO, MSGL_ERR, "[LCL] Unsupported compression format for ZLIB (%d).\n", hc->compression);
           return 0;
};

to:
if(hc->compression != COMP_ZLIB_NORMAL && (hc->compression < COMP_ZLIB_HISPEED || hc->compression > COMP_ZLIB_HICOMP))
{
    mp_msg(MSGT_DECVIDEO, MSGL_ERR, "[LCL] Unsupported compression format for ZLIB (%d).\n", hc->compression);
    return 0;
}
else
    mp_msg(MSGT_DECVIDEO, MSGL_INFO, "[LCL] compression level %d.\n", hc->compression);

Should I submit a bug report?
Ciao!
			mario

-- 
Ing. Mario Valle
Data Mining and Visualization Group         | http://www.cscs.ch/~mvalle
CSCS, Swiss Center for Scientific Computing | Tel:  +41 (91) 610.82.60
Via Cantonale, 6928 Manno, Switzerland      | Fax:  +41 (91) 610.82.82



More information about the MPlayer-users mailing list