Hi,
I am using ezsdk_5_03_01_15.
Does V4L2 capture driver support internal chroma conversion ?
(ie. YUV422 is the input to capture driver and I want YUV420 as o/p of capture driver's dequeue call)
Thanks,
Sweta
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I am using ezsdk_5_03_01_15.
Does V4L2 capture driver support internal chroma conversion ?
(ie. YUV422 is the input to capture driver and I want YUV420 as o/p of capture driver's dequeue call)
Thanks,
Sweta
Hi Hardik,
Can you please confirm following
1) If I set pixel format as V4L2_PIX_FMT_NV12 from application, then the video o/p will be YUV420Semiplanar (UV interleaved).
2) If dequeued buffer is sent to h/w encoder for encoding, it should work fine. Is it correct ? Or is there any other processing needed before sending the YUV data to encoder ?
Is there any step missing in 1) ? When I dumped this raw file, I could see Y data correct but chroma is not correct.
Thanks,
Sweta
Hi,
You are correct, if you set format as V4L2_PIX_FMT_NV12, capture driver should give you a YUV420 data. This is verified in TI India with encoder and it seems to work fine. Can you try to convert YUV420 to YUV422 using VFPC and see whether its correct. This is because we dont have any good YUV420 SP viewer. How you confirmed that YUV420, output from capture is not proper or encoder is not encoding it properly.
Regards,
Hardik Shah
Hi Hardik,
Thanks for your inputs. When I set V4L2_PIX_FMT_NV12 as pixel format and send the dequeued buffer to encoder, encoded video is not proper. I get proper shape (means Y is proper) and color part corrupted (means some issue with chroma conversion part).
I have my capture-encode application running fine in Android with V4L2 based capture and OMx encoder.
If I configure V4L2 for YUV422 and use software routine to convert from YUV422 to YUV420SP, give this YUV420SP data to encoder, encoded video is perfect.
If I configure V4L2 for NV12 and straight away pass this buffer to encoder, I get chroma part corrupted.
How did you verify that YUV420 capture and encoder is working fine ? I couldn't find any such application from anywhere.
Would it be possible for you to share this application to quickly fix my issue ?
Thanks,
Sweta
Hi,
Few points before we conclude capture or encoder is having problem.
1. In V4L2 capture driver, chroma immediately follow luma. So does encoder is also expecting data in same way.
2. Can you please convert the data you captured in YUV422 format using some VFPC and confirm that data is not proper or proper.
Regards,
Hardik Shah
Hi Hardik,
I have configured encoder for OMX_COLOR_FormatYUV420SemiPlanar and capture for NV_12. Please let me know whether this is correct or not.
If chroma comes before luma, is there any parameter to specify this sequence ? If yes, please let me know the parameter name and value.
I will check for point 2 and get back to you. Meanwhile, can you please share the source code or piece of code with configuration details to fasten the root cause?
Thanks,
Sweta
Hi,
answers inline,
sweta bhatt said:I have configured encoder for OMX_COLOR_FormatYUV420SemiPlanar and capture for NV_12. Please let me know whether this is correct or not.
It should be same. But i cant confirm since I am not expert for OMX.
sweta bhatt said:If chroma comes before luma, is there any parameter to specify this sequence ? If yes, please let me know the parameter name and value.
No, V4L2 doesn't support this.
sweta bhatt said:I will check for point 2 and get back to you. Meanwhile, can you please share the source code or piece of code with configuration details to fasten the root cause?
What configuration you want from here.
Just for your information, we have successfully tried here V4L2 capture with YUV420, encode and store it on a file. We have played back that file using external player and its working.
Regards,
Hardik Shah
Hi Hardik,
I am doing the same thing here. I am capturing using YUV420 V4L2 capture driver, encoding it using Openmax and storing it in a file.
My file doesn't play good with external player (ie. VLC or Elecard).
So I want to verify all the capture and encoder parameters with which you made it work.
If you can share your application, that will be great. If you can't share app, then please share the configuration of capture driver (if anything special) and encoder parameters.
Thanks,
Sweta
Hi,
I dont have application since I am not the correct person for gstreamer. I tried to gather as much information from gstreamer team here. Can you post this query under gstreamer forum and try to get reply. I will forward you query to gstreamer team but better to raise one more thread.
Regards,
Hardik Shah