(M)JPEG encoder

Started by Chucho, September 11, 2012, 03:40:07 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

P337

Quote from: g3gg0 on November 03, 2012, 12:56:51 AM
yes, its the LV content JPEG compressed.
1056x704

600D does when USB is connected :(

Nice! how heavy is the Jpeg compression on them?

An uncompressed 1056x704 8bit 4:2:2 image is 1,486,848 bytes (1.5MB) and "Highest Quality" JPEGs are usually a 2.5:1 compression ratio which should be around 600KB per jpeg file.  I read somewhere they were around 300KB each which would be a 5:1 (not bad!) ;D

1%


g3gg0

oh hm continuous JPEG saving code is for nuts on 7D.
just set 0x60D8 to 0x01 and the canon stock code will already dump all frames.
no need to synchronize and add manual code.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

nanomad

Can you upload a sample jpeg vs a frame taken during video mode (fullHD?), i'd like to compare the quality
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

1%

What functions actually do it? Maybe possible to do this to other cameras, just not identified.

I posted a jpeg posts back but not against a video frame.

ilguercio

Quote from: g3gg0 on November 03, 2012, 05:30:30 PM
oh hm continuous JPEG saving code is for nuts on 7D.
just set 0x60D8 to 0x01 and the canon stock code will already dump all frames.
no need to synchronize and add manual code.
Interesting...
So this actually is something Canon has got inside its FW?
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

g3gg0

Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

nanomad

I think the LV buffer is better, even when upscaled to 1920x1280

http://i.imgur.com/ll2P3.jpg

edit: actually, I don't really know :/
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

1%

Looks pretty similar... just one is scaled down and one is scaled up. Same YUV source.

nanomad

Yes, and moire / noise is more visible in the jpg version giving a false "it has more details" impression at first glance
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

1%

You do have the 4:2:2 color in the jpeg though... and if it can be resized its better and less stress on the CPU. Plus you can monitor in HD while doing jpeg as I've found.

Rush

Is MJPEG image data the same as HDMI output image data? (which can recorded to external recorder?)
Canon's output is compressed, so it is MJPEG LV image data, yes?
So implemented MJPEG-video is the way to achieve external recording quality internally. Am I correct?
Greetings from Russia!

1%

Somewhat. Its neither LV nor HDMI. Things that affect HDMI don't affect jpeg, I think its a separate function. But it will achieve 4:2:2 at some size internally.

LV is 720x480, YUV is 1680x9something and jpeg is ~1056x704. Overlays don't show up on it, runs along with 1080P hdmi or live view AND while recording a movie. So compressing YUV to YUV sized jpeg will probably make the best quality. Even as separate frames they can be combined as an image sequence to whatever video. I don't know about dropped or mangled frames, however or how smooth it will be.

g3gg0

the flag at address 0x60D8 allows different settings.

0x01 dump JPEG to A:
0x02 dump JPEG to B:
0x03 dump .422 to A:
0x04 dump .422 to B:
0x05 dump JPEG+.422 to A:
0x06 dump JPEG+.422 to B:

but the .422 dumping will be slower than my card of course (30MB/s)
so it will produce some corrupted .422s and some with "old" content only.
still funny to use ;)
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

P337

Ok so:
LV = 720x480p at ??fps 4:2:2 with no frame compressions
HDMI = 1620x910i at 60fps 4:2:2 with no frame compressions
MJPEG = 1056x704p at ??fps 4:2:2 with JPEG compressions?

I've noticed when checking my "LiveV FPS" I get 60fps.
Is that using the 1056x704 or 720x480 buffer?
If the former, then that means it could get 1056x704 in 4:2:2 at 60fps right?

ilguercio

Quote from: g3gg0 on November 03, 2012, 10:08:16 PM
the flag at address 0x60D8 allows different settings.

0x01 dump JPEG to A:
0x02 dump JPEG to B:
0x03 dump .422 to A:
0x04 dump .422 to B:
0x05 dump JPEG+.422 to A:
0x06 dump JPEG+.422 to B:

but the .422 dumping will be slower than my card of course (30MB/s)
so it will produce some corrupted .422s and some with "old" content only.
still funny to use ;)
Any piece of code for that? I'd love to try right now.
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

g3gg0

you can set address e.g. via ptpcam
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

ilguercio

Quote from: g3gg0 on November 03, 2012, 10:58:35 PM
you can set address e.g. via ptpcam
I don't know if i can do this.
Can you give me a hint?
:D
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

deleted.account

Quote from: 1% on November 03, 2012, 06:34:08 PM
Looks pretty similar... just one is scaled down and one is scaled up. Same YUV source.

Do you see the fine horizontal lines across the LV jpg? especially visible across smoother surfaces? I see these on all LV silentpics (whilst not recording) I've captured.


ilguercio

Also, why aren't silent pictures taken during recording readable? They have twice the size of a standby SP on my 50D.
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

jplxpto

Quote from: 1% on September 19, 2012, 06:39:23 PM

Also found virtual keyboard but can't get it to come up.
319: 22447.067 [GUI] ERROR ***** GetMenuTypeFromVKType illegal type(0)
    320: 22447.176 [GUI] ERROR ***** INPUT_BUF_SIZE = 0

But this OT

I've got to see VirtualKeyboard in 40D.

1%

Gonna try out those commits right now and see what happens. My movie mode silent pics = recording silent pics now because new silent pic taking permanently did some stuff.

jplxpto

Quote from: 1% on September 22, 2012, 06:08:21 AM
http://imgur.com/KYVQg

Not sure how to set the dmac register.

EngDrvOut(0xC0F27000, 4);

I had seen this picture before ...

1%

Quote
Also, why aren't silent pictures taken during recording readable

They're readable, just a different size. Get the gimp extension that opens .422

Get "Failed to wait until LV buffer updates" for both .422 and jpeg.

It does work while tethered... I tried:


int *jpegz = (int *)(0x60D8);
*jpegz=0x2;
msleep(2000);
call("WriteEDmacPackMem");


But still no dice.

High res pics still work...

A suggestion... make the bursts/continuous create a new folder each time.  And also thanks for adding this :)

*Killing silent pic wait loop fixed taking silent pics. But what is FPS of them really? Seems like they speed up/slow down. My card didn't seem to have trouble keeping up even with the 3MB files. Still no fix for Jpeg :(


I know its not exactly mjpeg but I shot a bunch of .422s. 368 over about ~3 minutes. That's like 2fps? 422 to Image doesn't want to convert them :(

I'll try some tethered jpeg and see what kind of fps I get. Hmm... it seems pretty decent... also noticed this:

Tethering is now shrinking my YUV buffer to 1056x704.. in crop mode the utility refuses to work. While recording tethered, the jpegs stop coming until recording stops. PC still updates with LV image and the jpegs are in ram if they are dumped (1056 only). So 2 things:

1. Canon blocks jpegs when YUV is bigger
2. Your function is separate from the EOS utility jpeg which gives hope that if patched it will make bigger sizes.

ilguercio

Quote from: 1% on November 04, 2012, 01:32:31 AM
They're readable, just a different size. Get the gimp extension that opens .422
I didn't know this, thanks.

Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.