[FFmpeg-devel] a64 encoder 7th round
Bitbreaker/METALVOTZE
bitbreaker
Fri Jan 30 20:08:30 CET 2009
> I always try to hmm convince patch authors to contribute as much usefull
> code as possible :)
> swscale still does ordered dither, i know other variants look much
> better as single images (i tried it) but i had some problems with videos
> on TFTs, also my code was not clean and just doing grayscale, no color, not
> considering gamma ...
>
Pfew. I am not sure if i am the right man for that. Useful code will be
submitted, more modes, a64 container, isn't that enough? ;-)
> gamma is very important when dithering with few colors no matter if ordered
> or others, the reason is
> a 50/50 mix of black and white pixels just doesnt produce a shade similar
> to 50% gray but dither code generally assumes it does
>
i mix black with dark gray, dark grey with middle gray and so on at
least. Better than black/white, isn't it?
>> However digonally might work out, producing lines horizontally is no
>> option as well.
>>
>
> you can even decide pixel values in some random order
>
> or look at dither as an optimization problem, that is to choose
> pixels(x,y) so that a lowpassed pixels image is most similar to
> the input picture.
> with this you can just pick 2x2 pixel cells and bruteforce try to set
> them to all values and pick the best and keep doing that until no
> change in any cell leads to an improvment.
>
Hmm, i should dig out my old code again, maybe it does already better
results. Coz the good speed will then be gone anyway :-) I'll put some
of those things on a list named: Try somewhen when the important stuff
is done.
> first, thank you for this explanation, could you put this on the multimedia
> wiki? we collect information about all codecs there ...
>
I'll do so, but need an account first. No idea if i can just register
one, am a bit in a hurry.Will also add information about the other
formats that might help as well.
> now a few questions, i hope iam not too annoying
> the low nibble is either 15 or 8 if i did RTFS correctly
> do you have 64 byte left for a LUT?
> if so you can do some code equivalent to
>
> x= read_net();
> dst[0]=lut[x ];
> dst[1]=lut[x+1];
> dst[2]=lut[x+2];
> dst[3]=lut[x+3];
> x= read_net();
> dst[4]=lut[x ];
> dst[5]=lut[x+1];
> dst[6]=lut[x+2];
> dst[7]=lut[x+3];
> ...
>
>
Gotta see tomorrow if that works...
> this of course can also be done as loop and using that y register, in that
> respect do you maybe have a link to docs listing the number of cycles per
> instruction?
>
For example here: http://www.metalvotze.de/content/c64_internal4.php
Kindest regards,
Toby
More information about the ffmpeg-devel
mailing list