i.MX6DL android JPEG encoding.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX6DL android JPEG encoding.

Jump to solution
1,887 Views
satoshishimoda
Senior Contributor I

Hi community,

I want to confirm about JPEG encoding in i.MX6DL Android BSP.

Actually, a image taken by the camera on MCIMX6DL-SDP is whiter than a preview image.

Our environment is following.

[Board]

MCIMX6DL-SDP

[BSP]

android_jb4.2.2_1.1.0-ga

Then, please see my questions as below.

[Q1]

When JPEG encoding from camera capture on Android, is Android standard encoder used?

Or is Freescale encoder used?

[Q2]

If Freescale encoder is used, is the algorithm of Freescale encoder generic algorithm?

Or Freescale original algorithm?

Best Regards,

Satoshi Shimoda

Labels (3)
Tags (2)
1 Solution
1,299 Views
JayTu
NXP Employee
NXP Employee

Further checking, JpegBuilder finally calls to Android's Jpeg lib. (android_src/external/jpeg)

View solution in original post

13 Replies
1,299 Views
JayTu
NXP Employee
NXP Employee

Hi,

You can refer to hardware/imx/mx6/libcamera2/YuvToJpegEncoder.cpp.

Also, you can store the buffer (dequeued from v4l2) directly to see whether it has any problem or not.

1,299 Views
satoshishimoda
Senior Contributor I

Dear Jay Tu,

Thank you for your reply.

But sorry, I did not understand which JPEG codec is used even though I checked YuvToJpegEncoder.cpp because I'm a not software engineer.

Could you teach me what code decide JPEG codec?

Best Regards,

Satoshi Shimoda

0 Kudos
1,299 Views
JayTu
NXP Employee
NXP Employee

Hi Satoshi,

The code there encodes YUV frame to jpeg. (The real function is JpegBuilder.cpp). If you want to try other jpeg algorithm, you can have the same interface as it and changed your implementation.

1,299 Views
satoshishimoda
Senior Contributor I

Hi Jay Tu,

Thank you for your reply.

I understand JpegBuilder.cpp is jpeg encoder.

Then, JpegBuilder.cpp is made by freescale, so the algorithm is freescale original.

Is this correct?


Best Regards,

Satoshi Shimoda


0 Kudos
1,299 Views
JayTu
NXP Employee
NXP Employee

Hi Satoshi,

I don't know exactly if the algorithm from FSL or we just took it from Open Source, made minor modification for using here.

I think you can use the code to do some verifications if you have any concern on it like:

1. Reading YUV data from file, store it to yuv buffer

2. Using the JpegBuilding to encode yuv buffer and store to file

3. Check the output file

1,299 Views
satoshishimoda
Senior Contributor I

Hi Jay Tu,

> I don't know exactly if the algorithm from FSL or we just took it from Open Source

To make sure, could you confirm which is correct  to your BSP team or codec team?

Best Regards,

Satoshi Shimoda

0 Kudos
1,300 Views
JayTu
NXP Employee
NXP Employee

Further checking, JpegBuilder finally calls to Android's Jpeg lib. (android_src/external/jpeg)

1,299 Views
satoshishimoda
Senior Contributor I

Hi Jay Tu,

> The original owner to the file (in MX5) already left FSL.

I understand what did you mean as following, is this correct?

"The software engineer who made this Jpeg encoder has left from FSL, so you cannot confirm the algorithm."

Best Regards,

Satoshi Shimoda

0 Kudos
1,299 Views
JayTu
NXP Employee
NXP Employee

I had updated the statement, it eventually used Android's JPEG lib.

cheers,

Jay

"Satoshi Shimoda" <admin@community.freescale.com<mailto:admin@community.freescale.com>> ? 2014/2/18 ??12:07 ???

<https://community.freescale.com/>

<https://community.freescale.com/>

i.MX6DL android JPEG encoding.

reply from Satoshi Shimoda<https://community.freescale.com/people/satoshishimoda?et=watches.email.thread> in i.MX Community - View the full discussion<https://community.freescale.com/message/380881?et=watches.email.thread#380881>

1,299 Views
satoshishimoda
Senior Contributor I

Hi Jay Tu,

Oh sorry, I overlooked it.

OK, I understand it uses Android's JPEG lib.

Thank you for your cooperation.

Best Regards,

Satoshi Shimoda

0 Kudos
1,299 Views
satoshishimoda
Senior Contributor I

Could someone reply to me?

0 Kudos
1,299 Views
LeonardoSandova
Specialist I

Satoshi, I am not an android expert but I believe you can get some partial answer looking at the log. So boot the system, enable logcat and then take the picture. There should be many OMX logs, including the OMX components being instantiated in the task.

0 Kudos
1,299 Views
satoshishimoda
Senior Contributor I

Dear Leonardo Standoval Gonzalez,

Thank you for your reply.

Can I get the answer without logcat?

I think Q1 is simple question.

And I cannot the answer of Q2 by logcat, can I?

So could you give me simple answer, Q1 -> android standard or Freescale encoder, Q2 -> generic or Freescale original algorithm?

Best Regards,

Satoshi Shimoda

0 Kudos