[MPlayer-users] ZLIB codec compression levels

Roberto Togni r_togni at tiscali.it
Sat Nov 22 03:35:25 CET 2003


On 2003.11.21 14:02, Mario Valle wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports. 
> html]
> 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);
>
Can you please upload the file to MPlayer ftp  
(ftp://ftp.mplayerhq.hu/MPlayer/incoming)?
Did you compressed the file yourself? if yes, which version of the  
avizlib.dll did you used?

I did a check only for those three compression level because they was  
what i've been able to generate with the dll I have (version 2.2.3).
So the file was generated with a newer version of the library or with  
some other codec that creates ZLIB compatible files.

Does the file work with the fix you propose? you can try to comment out  
the switch, it's not needed for decoding (zlib gets the compresion  
level from the bit stream, the swith is only used to show the  
compression level stored in avi extradata).

> Should I submit a bug report?
Not needed.
> Ciao!
> 			mario
Ciao,
 Roberto



More information about the MPlayer-users mailing list