[FFmpeg-devel] [Ffmpeg-devel] [PATCH] CYUV encoder resurrected
Baptiste Coudurier
baptiste.coudurier
Thu Sep 11 01:15:31 CEST 2008
Hi guys,
Michael Niedermayer wrote:
> Hi
>
> On Sat, Mar 03, 2007 at 11:23:22PM -0700, Loren Merritt wrote:
>> On Sat, 3 Mar 2007, Michael Niedermayer wrote:
>>> On Fri, Mar 02, 2007 at 08:10:12PM -0700, Loren Merritt wrote:
>>>
>>>> Better yet, don't compute abs at all. The whole codec (without trellis) is
>>>> 13% faster this way.
>>> hmm, if this code matters so much speedwise then i think it could be
>>> changed
>>> to
>>> int p = *pred;
>>> int bi = itable[(sample - p) & 0xff];
>>> *pred = p + table[bi];
>>> if(*pred & ~0xff){
>>> bi = itable2[(sample - p) & 0xff];
>>> *pred = p + table[bi];
>>> }
>>>
>>> where itable2 rounds in the oposite direction than itable
>> Old code was wrong. It only triggered the correction when the quantized
>> delta overflows and the input doesn't, but it should also trigger when the
>> input delta overflows and the quantized one doesn't.
>> After fixing that I don't see how to implement the correction as a table,
>> but I can avoid the search.
>
> new code seems wrong too, ive attached some test code, with your new code,
> my 2 table variant and bruteforce quantization
>
> [...]
How hard is it to resurrect this and commit ?
For the sake of completeness :>
--
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
Smartjog USA Inc. http://www.smartjog.com
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
More information about the ffmpeg-devel
mailing list