Author Topic: (M)JPEG encoder  (Read 77095 times)

P337

  • Freshman
  • **
  • Posts: 74
Re: (M)JPEG encoder
« Reply #125 on: November 03, 2012, 10:33:32 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%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: (M)JPEG encoder
« Reply #126 on: November 03, 2012, 03:44:34 PM »
They are 320KB.

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3183
Re: (M)JPEG encoder
« Reply #127 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.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!

nanomad

  • Administrator
  • Hero Member
  • *****
  • Posts: 2918
  • All your websites are belong to us
Re: (M)JPEG encoder
« Reply #128 on: November 03, 2012, 05:32:11 PM »
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%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: (M)JPEG encoder
« Reply #129 on: November 03, 2012, 05:59:16 PM »
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

  • Hero Member
  • *****
  • Posts: 845
Re: (M)JPEG encoder
« Reply #130 on: November 03, 2012, 06:19:43 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

  • Developer
  • Hero Member
  • *****
  • Posts: 3183
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!

nanomad

  • Administrator
  • Hero Member
  • *****
  • Posts: 2918
  • All your websites are belong to us
Re: (M)JPEG encoder
« Reply #132 on: November 03, 2012, 06:32:54 PM »
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%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: (M)JPEG encoder
« Reply #133 on: November 03, 2012, 06:34:08 PM »
Looks pretty similar... just one is scaled down and one is scaled up. Same YUV source.

nanomad

  • Administrator
  • Hero Member
  • *****
  • Posts: 2918
  • All your websites are belong to us
Re: (M)JPEG encoder
« Reply #134 on: November 03, 2012, 06:36:13 PM »
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%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: (M)JPEG encoder
« Reply #135 on: November 03, 2012, 07:34:16 PM »
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

  • Member
  • ***
  • Posts: 159
  • 5D3, EOS M
Re: (M)JPEG encoder
« Reply #136 on: November 03, 2012, 08:13:10 PM »
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%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: (M)JPEG encoder
« Reply #137 on: November 03, 2012, 08:26:09 PM »
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

  • Developer
  • Hero Member
  • *****
  • Posts: 3183
Re: (M)JPEG encoder
« Reply #138 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 ;)
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!

P337

  • Freshman
  • **
  • Posts: 74
Re: (M)JPEG encoder
« Reply #139 on: November 03, 2012, 10:22:19 PM »
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

  • Hero Member
  • *****
  • Posts: 845
Re: (M)JPEG encoder
« Reply #140 on: November 03, 2012, 10:26:48 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

  • Developer
  • Hero Member
  • *****
  • Posts: 3183
Re: (M)JPEG encoder
« Reply #141 on: November 03, 2012, 10:58:35 PM »
you can set address e.g. via ptpcam
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: paypal@g3gg0.de
ONLY donate for things we have done, not for things you expect!

ilguercio

  • Hero Member
  • *****
  • Posts: 845
Re: (M)JPEG encoder
« Reply #142 on: November 03, 2012, 11:53:53 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

  • Member
  • ***
  • Posts: 154
Re: (M)JPEG encoder
« Reply #143 on: November 03, 2012, 11:56:38 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

  • Hero Member
  • *****
  • Posts: 845
Re: (M)JPEG encoder
« Reply #144 on: November 04, 2012, 12:21:25 AM »
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

  • Developer
  • Hero Member
  • *****
  • Posts: 506
Re: (M)JPEG encoder
« Reply #145 on: November 04, 2012, 12:34:21 AM »

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%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: (M)JPEG encoder
« Reply #146 on: November 04, 2012, 01:02:47 AM »
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

  • Developer
  • Hero Member
  • *****
  • Posts: 506
Re: (M)JPEG encoder
« Reply #147 on: November 04, 2012, 01:06:07 AM »
http://imgur.com/KYVQg

Not sure how to set the dmac register.

EngDrvOut(0xC0F27000, 4);

I had seen this picture before ...

1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: (M)JPEG encoder
« Reply #148 on: November 04, 2012, 01:32:31 AM »
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:

Code: [Select]
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

  • Hero Member
  • *****
  • Posts: 845
Re: (M)JPEG encoder
« Reply #149 on: November 04, 2012, 01:34:51 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.