YUV 4:2:2 via MJPEG Encoding

Started by Photato, September 01, 2015, 04:25:41 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Photato

One of the things that really separates Amateur from Professional Video equipment has always been Chroma Sub-sampling.
Lately the workaround has been to shoot at 4K with Amateur gear or Raw but 1080P when encoded at 4:2:2 looks really good.
I wonder if Magic can be done here and finally have MJPEG wrapped in MOV, since that format supports it.

Pretty much all Cameras generate YUV 4:2:2 JPEGs already so the hardware is there and in fact, older Canon still cameras record video using M-JPEG wrapped in AVI.
Obviously being an older CODEC, it is not as efficient as H.264 but storage these days is not really an issue, it offers better quality, is much easier to edit since it is already all Intraframes and is less computational intensive.

Any chance of this happening?
Thanks

Frank7D

Raw is already 4:4:4 so what's the point?

Photato

Nope, Bayer sensors are inherently 4:2:2 so 4:4:4 is inefficient and pointless.
Besides MJPEG is more manageable in size and compatibility.
Just download and start editing. :)

Frank7D

I'm no technical expert, but I have a feeling that when one weighs in, they're going to say that processing is more efficiently done on your computer than on your camera. In other words, not feasible.

Photato

Like I said, there are older Canon cameras doing mjpeg so the newer Digics should be capable. Unless the CODEC ASIC in them now is exclusively H.264. I don't know.
MJPEG was within the things they mentioned to be doable so I was wondering what happened to that?

Frank7D

BTW, if "4:4:4 is inefficient and pointless," then why does Canon do raw stills? Magic Lantern raw video format is essentially just a sequence of lower-rez stills.

Photato

Raw files from Bayer sensors are not 4:4:4.
A Raw file from a Foveon sensor though is 4:4:4.
If anything, Raw files from Bayer sensors resemble more closely 4:2:2 since they have double the Luma (G) data than Chroma (R)(B).

If you examine the JPEG files from even the best of Canon DSLR you would find out that it is encoded in YUV 4:2:2.
Why? because it would be a waste otherwise, unless it is a downsized JPEG.

MLV Raw are limited to 4:2:2 and in some cases 4:2:0 if  the vertical resolution is half of what it should.

Kharak

Isn't RAW beyond 4:4:4 sub-sampling?

Magic Lantern Video is 14 bit (RAW). That is around 85 millions colours, 16k Shades of gray, no pun intended. How do you fit the 4:2:0 in there ?

And I am pretty sure jpeg is 8 bit
once you go raw you never go back

Audionut

There is no chroma subsampling in raw files, because there is no luma or chroma information.  Converting from raw to JPG is an entirely different matter, since JPG does have luma and chroma information, and it is well known that most eyes have no problems with 4:2:2 chroma subsampling, which thus delivers significant bandwidth savings for little to no perceptual quality loss.

G is not luma, and RB is not chroma.  G is green pixels, R is red pixels and B is blue pixels.  RGB vs YUV.

https://en.wikipedia.org/wiki/YUV
https://en.wikipedia.org/wiki/RGB_color_model#RGB_and_cameras

Note: there is a distinct difference between luma, and luminance.

4:2:2 denotes half resolution chroma information, which differs from reducing the resolution of raw data by half.

As for MJPEG compression in camera, I suggest you make yourself acquainted with the search function.