Opened 5 years ago

Last modified 5 years ago

#2368 new defect

Hardcoded quality value specified in ve_vfw.c

Reported by: Sofia Marino Owned by: beastd
Priority: normal Component: mencoder
Version: HEAD Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

Summary of the bug:

The VfW codec uses an incorrect hardcoded value of 10000 when calling vfw_encode_frame() from put_image() on line 310 of ve_vfw.c, which results in an incorrect quality value being passed to ICCompress(). Per API documentation this value should be set to a user-defined quality value if VIDCF_QUALITY in the ICINFO structure returned by ICGetInfo() is set or 0 otherwise.

This limits the functionality of the cinepak codec (iccvid.dll) by causing it to use an excessively high quality setting, (a sample encode of 320x180@30fps video produced a bitrate greater than 2500kbps, completely unplayable on most devices targeted by an old codec such as cinepak) and likely impairs the utility of other VfW codecs which rely on the VfW API and do not implement their own configuration dialog.

Change History (1)

comment:1 by Sofia Marino, 5 years ago

A good reference for a (GPLed) working implementation of the VfW API along with workarounds for bugs in many popular VfW encoders would be VirtualDub. While it wouldn't be a drop-in replacement it would provide a much better starting point than the current implementation.

The relevant code is in the file VideoSequenceCompressor.cpp

Note: See TracTickets for help on using tickets.