[FFmpeg-devel] [PATCH] RoQ video encoder (take 4)
Michael Niedermayer
michaelni
Thu Jun 14 11:26:41 CEST 2007
Hi
On Wed, Jun 13, 2007 at 11:31:28PM -0400, Eric Lasota wrote:
[...]
> > i also think that it would be better to drop more than just the unused cbs
> > but rather calculate the precisse rate distortion (bits*lambda+sse)
> > difference which would result from droping a specific cb and drop it if
> > the rate distortion decreases
> > though this is just an idea for a future patch ...
> >
>
> Dropping a 2x2 codebook entry would also require rebuilding any affected
> 4x4 entries, which would probably result in a large amount of the image
> needing to be re-indexed. Indexing is about 2/3 of the encode time, and
> you'd need to do some portion of that for every codebook entry you want
> to evaluate. I don't think it's viable without huge increases to
> encoding time.
IIRC theres a used count and if its 0 we drop a codebook
so if we just consider codebooks with a small used value (like 1)
for droping then there shouldnt be much reindexing needed
also we could keep a heap (as in heap sort) structure for each macroblock
to keep a sorted list of possibilities, with that removial of the best
encoding possibility would not need reindexing
all just some ideas for future patches
>
> Best way to do it would be to just figure out a way to estimate ideal
> codebook size, which will probably be difficult because smaller
> codebooks result in more codebook entries just being unused because
> they're not accurate enough.
codebook size estimation probably would have to be done after decidng
the macroblock types ...
which might lead to a iterative loop of codebook generation and macroblock
type decission)
>
>
> Also, chroma bias looks better at 4 in my opinion. Take it or leave it.
>
> By the way, another fun caveat:
> Any chunk with more than 65536 bytes of data, not including the header,
> will cause Quake 3 to stop playback completely.
> (cl_cin.c line 1276)
this can be worked around easily with a
if(too big){
lambda of this frame *= some constant >1
goto retry encoding
}
not fast but i suspect these cases are rare
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070614/307ecb07/attachment.pgp>
More information about the ffmpeg-devel
mailing list