Log in

View Full Version : Help Needed with HiDef HuffYuv


morsa
17th November 2004, 09:11
There is a new breed of low cost High Definition (1920x1080 and 1280x720) cameras being born.
They are one Bayer Chip cameras with really good quality.
What everyone of us lack is a good open source lossless codec.
So I'm looking for experienced assembler/MMX coders here to see if this is possible.
These cameras will output 10 or 12 bit depth images Linear/Log in Bayer mosaic.
So the basic idea we all had was to modify Huffyuv to accept this Bayer mosaic pattern as input.
We had no luck.Nobody seems to be interested about it. :(
It could also be a good editing codec for normal HD, although a little lossy.Think of it, turning normal RGB images to Bayer will reduce data to 1/3 without decreasing quality to one third (combined with a good De-Bayer algorithm).Add to this lossless 2:1 ratios and you'll have a 6:1 ratio of compression.
HD reduced to the bandwidth of uncompressed SD !!!
I'd bet even my Athlon XP 2000+ could be able to process that realtime....
If anybody here is interested and could help, please post your comments here.
Thank you
:)

P.S: It could also be adapted to not be a VFW codec but just a compression library. I've been told too many times you cannot go higher than 8 bit per color channel under VFW interface.

Mug Funky
18th November 2004, 02:12
doesn't canon's raw format do something similar for stills? i know they come out anything from a little larger than full-size jpegs, to twice the size of them.

as for processing them in realtime... you'll need some killer optimization to do that. the de-bayer stuff seems quite intensive when i do it to my digital still camera's images (unless it's just crappy code).

looks interesting though.

morsa
18th November 2004, 02:59
the debayer is not meant for realtime at least not on top quality just preview...

Backwoods
28th November 2004, 01:29
I believe a German company has done this with a custom built HD camera.

morsa
28th November 2004, 02:51
Really? what part?
Could you post a link?

trbarry
28th November 2004, 03:37
Assuming 8 bit for the moment ...

I wonder how good Huffy would do if you just lied and said it was YUY2, rearranging the pixels on even lines.

For instance a Bayer pattern

g b g b
r g r g
g b g b
r g r g

rearranged to a file format

g b g b
g r g r
g b g b
g r g r

and then lie and tell Huffy it's the following in YUY2 (maybe or not interlaced)

yuyv
yuyv
yuyv
yuyv

Huffy should properly and losslessly compress it though I don't know how well. But it would be an easy Avisynth filter to make or unmake (same filter does both). And you could probably also fiddle with 8 bit log values if that would help somehow (dunno).

- Tom

morsa
29th November 2004, 06:22
Ohh, good idea!
Testing it thru an Avisynth filter should be good and easier...
Anyway I'm sure this would be better to be built-in.
This Open source community doesn't seem very fond of HDTV.
May be after three years of standard use of HDTV, some genius will come up and say : Hey we need and HDTV lossless codec!!!
BTW, may be by that time computer will be so fast and HDD so big it will be just enough to use the normal Huffy....:(

Seems till that moment arrives we are forced to pay 1,200 US dollars and up for strange closed source codecs....

Mug Funky
29th November 2004, 14:24
hehe... from where i'm sitting the opensource community can't afford to be fond of HDTV :)

i know i've got a long list of things to buy (tyres, for instance) that come before getting HDTV :)

morsa
29th November 2004, 15:23
hahahahahahahah :)

jkwarras
30th November 2004, 13:45
Link to dvinfo forums: alternative imaging methods.
http://www.dvinfo.net/conf/forumdisplay.php?forumid=70

It's absolutely icnredible what these people are doing building their own HDCams with so low cost. I'm just amazed. What I've read down there is that hardware is +- easy to find, but what really lacks is a good software that can handle the input right in the cam (losless codec for HD stuff is a non-stop subject on this discussions). Althought I don't understand a damn word about their geek stuff ;) it's really impressive, you should really check out.

As an indie filmmaker I'm waiting to see more results and I would certainly build my own HDcam if it's really around 5000€.

Some people are working in coding software, but I don't know about a lossless codec, their discussions it's sometime a little confusing :confused:

Anyway I strongly recommend you to read this project "4:4:4 10bit single CMOS HD project":
http://www.dvinfo.net/conf/showthread.php?threadid=25808

Note: It's 150 pages! :D

morsa
30th November 2004, 19:16
well, I've been there from the beginning ;)

jkwarras
30th November 2004, 19:41
Originally posted by morsa
well, I've been there from the beginning ;)
I was almost sure that you were aware of these forums (as you were talking about home made HDCams) ;)

The links was more to inform others and point them to interesting information :)

vsv
29th August 2007, 15:00
There is a new breed of low cost High Definition (1920x1080 and 1280x720) cameras being born.
They are one Bayer Chip cameras with really good quality.
What everyone of us lack is a good open source lossless codec.
So I'm looking for experienced assembler/MMX coders here to see if this is possible.
These cameras will output 10 or 12 bit depth images Linear/Log in Bayer mosaic.
So the basic idea we all had was to modify Huffyuv to accept this Bayer mosaic pattern as input.
We had no luck.Nobody seems to be interested about it. :(
It could also be a good editing codec for normal HD, although a little lossy.Think of it, turning normal RGB images to Bayer will reduce data to 1/3 without decreasing quality to one third (combined with a good De-Bayer algorithm).Add to this lossless 2:1 ratios and you'll have a 6:1 ratio of compression.
HD reduced to the bandwidth of uncompressed SD !!!
I'd bet even my Athlon XP 2000+ could be able to process that realtime....
If anybody here is interested and could help, please post your comments here.
Thank you
:)

P.S: It could also be adapted to not be a VFW codec but just a compression library. I've been told too many times you cannot go higher than 8 bit per color channel under VFW interface.

...three years after...
morsa, You have found solution? ;)