[XviD-devel] Fairly stupid xvid API newbie question
Christoph Lampert
chl at math.uni-bonn.de
Sun Jul 11 11:06:43 CEST 2004
Hi,
nice test application. If you decide to release the source as GPL, we
might include it into the examples-dir.
>From the m4v output (e.g. with mplayer test.m4v -lavdopts debug=1
you could see that it was a ratecontrol problem (quantized kept jumping
from 1 to 31) which was caused by wrong entries in one of the xvid
structs.
For xvid, you have to set all unused values in all structures to 0, or the
result can be unexpected. Best is to simply initialize everything to 0
before writing the values, like
xvid_enc_frame_t frame;
xvid_enc_stats_t stats;
memset(&frame,0x00,sizeof(frame));
memset(&stats,0x00,sizeof(stats));
stats.version = XVID_VERSION;
frame.version = XVID_VERSION;
...
and the same in the constructor etc.
memset(&_xvid_1pass,0x00,sizeof(_xvid_1pass));
memset(&_xvid_enc,0x00,sizeof(_xvid_enc));
memset(&_xvid_plugins,0x00,sizeof(_xvid_plugins));
Then it worked for me.
chl
On Sun, 11 Jul 2004, Bernhard Rosenkraenzer wrote:
> Sorry for the newbie (in xvid API, not usage) question:
> I'm trying to write a simple mpeg4 generator (generates m4v stuff from
> commands).
> The small sample I've attached works, but produces a horrible quality, even
> though I'm allowing bitrates of 1 MBit/s.
>
> I'm sure I'm doing something really stupid wrong there, but can't find it -
> can anyone take a look?
>
> Thanks,
> bero
>
More information about the XviD-devel
mailing list