[XviD-devel] Lambda for plugins
Radek Czyz
radoslaw at syskin.cjb.net
Fri Nov 25 09:11:09 CET 2005
Hey everyone,
I cleaned up Johannes's patch, got rid of some bugs and probably added
some new ones.
The patch is here:
http://syskin.is.dreaming.org/lambda.patch
Most of the code is copy&paste of adaptive quantization code. If plugins
want to, they request a lambda table, which is six floats for each
macroblock big. Initially it's full of 1.0f, but plugins can modify this
table to indicate lower-importance and higher-importance blocks.
Internally, the floats are then converted to ints, with 1<<LAMBDA_EXP
being "neutral" lambda.
This lambda then modifies the real VHQ lambda (the code was originally
meant for 6 independant lambdas, there's hardly any change in ME area)
and in trellis.
What do you think of this? This is originally what I meant to make, but
I somehow didn't.
If there is no objection by tomorrow, I'll commit this (btw can I commit
without disturbing 1_1_branch already?).
Thanks, Johannes!
Radek
PS, new TODO: see if we can use this lambda to SKIP more in
less-important areas
Johannes Reinhardt wrote:
> Hi everybody,
>
> I tried to expose the lambda values for macroblocks to plugins, to be
> able to do some HVS stuff. It seems to compile fine and not bork
> anything here. I am at the moment not able to test it more careful. The
> patch is against the latest CVS.
>
> http://web3.gleitz.org/Kopernikus/lambdaplugin.diff
>
> But for now, I have not tried to code a plugin that uses the lambda
> values. Can someone with a better knowledge of the XviD Code look
> through it, if I have borked some really important things, propose
> improvements or correct me if my style is bad.
>
> I have some questions on the code:
>
> Why is dquant_stride in xvid_plg_data_t in xvid.h needed? Is it possible
> that its different from mb_width?
>
> I assumed that the lambda[6] in SearchData in estimation.h is the lambda
> for the 6 blocks of a macroblock (4 Luminance and 2 Chrominance blocks).
> Is that correct?
>
> In xvid_plg_data_t there is a remark that deprecated data is kept for
> binary compatibility. Does it break binary compatibility if I add the
> pointer to the lambda table to xvid_plg_data? Would it make sense, to
> replace one of the deprecated ints with the pointer to keep compatibility?
>
> Does it make sense, to multiplicate the lambda in dct_quantize_trellis_c
> in mbtransquant.c with the lambda modificator? I am not sure I
> understood trellis completly. Is there any further information about
> trellis quantization?
>
> Why are the dquants available for plugins at PLUGIN_AFTER? Is that
> needed for the lambdas?
>
> And finally, is there a draft of the specs or something similar
> available for download. I would like to have precise Information on some
> things.
>
> Thanks in advance
>
> Johannes Reinhardt
> _______________________________________________
> XviD-devel mailing list
> XviD-devel at xvid.org
> http://list.xvid.org/mailman/listinfo/xvid-devel
>
>
More information about the XviD-devel
mailing list