Getting RAW Video

All things embedded.
*NO FEATURE REQUESTS*

Re: Getting RAW Video

Postby leegong » Thu May 07, 2015 4:38 am

I consult a professional engineer who is good at TI and Ambarella ISP programming/developing , hard cores in TI and Ambarella ISP
have flexible output modes :
1) : write video stream into DDR RAM .
2) : output video stream to other hard core in ISP .
3) : 1) + 2)
mode1) is exactly what i hacked in current LV RAW patch ,
mode2) is exactly same as normal setting of Nikon Liveview .
mode3) is what i want to find out , which is an ideal solution for LV RAW patch .

Base on his descriptions , i believe there should be a similar mode in Milbeaut .
Great !
leegong
Core Developer
 
Posts: 2143
Joined: Mon Mar 19, 2012 12:21 am
Location: Hangzhou , China
Been thanked: 553 times

Help decode 14bit LV RAW

Postby astronomer » Sun May 10, 2015 2:17 pm

Leegong send this image to me with new 14bit recording from Liveview. But it appears to me something changes the image dimension.
Since I do not have any FFT tools available for frequency extraction, so anyone could help.

Format is 16bit per pixel with 14 LSBs valid in big endian.
Attachments
14bit.zip
(1.79 MiB) Downloaded 297 times
User avatar
astronomer
Developer
 
Posts: 722
Joined: Fri Apr 06, 2012 10:06 am
Location: US
Been thanked: 292 times

Re: Help decode 14bit LV RAW

Postby lain » Mon May 11, 2015 8:06 am

astronomer wrote:Leegong send this image to me with new 14bit recording from Liveview. But it appears to me something changes the image dimension.
Since I do not have any FFT tools available for frequency extraction, so anyone could help.

Format is 16bit per pixel with 14 LSBs valid in big endian.

Sorry if this makes no sense, I have no idea what I'm doing... I played around with the file using the `convert' utility from ImageMagick, and found it to be four images interlaced together, one after the other, two lines at a time. The two lines seem to be Bayer RG/GB, so I would guess this is actual sensor raw? :handgestures-thumbupleft:

Each image is 1248x368, which I guess could be for recording at 1280x720, maybe Nikon is only reading half the vertical resolution?
Stretching the images 2x vertically, they look correct...

But why are there 4 images in this file? :think: :think:

EDIT: For those playing along at home, I used a 010 Editor script to "deinterlace" these images, it just did a loop skipping some bytes then deleting some bytes, and you'd be left with one image, then I'd add an offset and repeat 4 times.
After you have the individual RAW images, this will get you a grayscale representation of the raw image:
Code: Select all
  1. convert -endian msb -size 1248x368 -depth 16 gray:LV__0006-1.RAW -evaluate multiply 4 LV__0006-1.png


The "multiply 4" is effectively a left shift by 2, to bring the 14 least significant bits up so the output image has correct brightness.
Attachments
LV__0006-4.png
LV__0006-3.png
LV__0006-2.png
LV__0006-1.png
User avatar
lain
Developer
 
Posts: 189
Joined: Fri Mar 29, 2013 3:42 pm
Been thanked: 111 times

Re: Getting RAW Video

Postby astronomer » Tue May 12, 2015 12:40 pm

I remembered the sensor reads 1/3 of lines based on VMAX test. So I really don't understand why now it's 2 lines interval.
And also based on the final 1664x1100 images and a lot of chroma alias testing, the sensor should be 1/3 vertical subsampling.

Maybe there's still a lot in the processing pipeline need to be hacked.
User avatar
astronomer
Developer
 
Posts: 722
Joined: Fri Apr 06, 2012 10:06 am
Location: US
Been thanked: 292 times

Re: Getting RAW Video

Postby leegong » Mon May 25, 2015 5:12 pm

Struggle to understand struc_90.field0x0 - field0x7 and struc_79.fied0x50 , field0x60 , field0x64 ,
which are important setting related to LV raw .
leegong
Core Developer
 
Posts: 2143
Joined: Mon Mar 19, 2012 12:21 am
Location: Hangzhou , China
Been thanked: 553 times

Re: Getting RAW Video

Postby leegong » Tue May 26, 2015 8:23 am

Interesting code repeats currrent video frame for H264 if no new frame in source video stream is available temporarily .
Note : dlist_x15 = source video stream , dlistx_16 is current video frame for H264 encoder , r8 is video frame in dlistx_16 .
Attachments
VideoFrame_repeating.png
leegong
Core Developer
 
Posts: 2143
Joined: Mon Mar 19, 2012 12:21 am
Location: Hangzhou , China
Been thanked: 553 times

Re: Getting RAW Video

Postby leegong » Tue May 26, 2015 9:16 am

In specific setting , current source video frame may be discarded if DEST video stream for H264
isn't empty (maybe due to H264 is busy encoding previous frame).
Attachments
discard_video_frame.png
leegong
Core Developer
 
Posts: 2143
Joined: Mon Mar 19, 2012 12:21 am
Location: Hangzhou , China
Been thanked: 553 times

Re: Getting RAW Video

Postby astronomer » Tue May 26, 2015 2:44 pm

Maybe this is the exact reason I talked about the 2 asynchronized process for variable frame rate?

Good job leegong!
User avatar
astronomer
Developer
 
Posts: 722
Joined: Fri Apr 06, 2012 10:06 am
Location: US
Been thanked: 292 times

Re: Getting RAW Video

Postby Brian Wake » Mon Jun 01, 2015 7:26 am

So is possibbly the raw video in a nikon D5100 ?
Already exist ?
Brian Wake
 
Posts: 3
Joined: Sat May 30, 2015 7:11 am
Been thanked: 0 time

Re: Getting RAW Video

Postby leegong » Mon Jun 01, 2015 6:22 pm

Brian Wake wrote:So is possibbly the raw video in a nikon D5100 ?
Already exist ?

Working hard for it , but no progress in recent weeks , i'm struggling to guess and verify what bit in chip4000 registers control what .
leegong
Core Developer
 
Posts: 2143
Joined: Mon Mar 19, 2012 12:21 am
Location: Hangzhou , China
Been thanked: 553 times

PreviousNext

Return to Firmware

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron