1

I followed the steps mentioned in below link to get gralloc buffer. But how to get size of buffer? How to dump YUV from OMXCodec decoding output

for testing i took length as, width x height x 1.5 as OMXCodec decoder output format was OMX_QCOM_420Planer32m.

But when i write YUV frame to file, my yuv viewer is not able to render it. then i tried length from range_length(). for this also same issue.

Also i converted the file to JPEG, it is not proper as YUV it self is wrong.

please help me. how to dump yuv buffer to file. i'm testing in Kitkat (moto g) and in ICS (Samsung tablet)

thank you, Raghu

Community
  • 1
  • 1
  • How do you know format is really `OMX_QCOM_420Planer32m`? – Alex Cohn Jul 23 '14 at 22:30
  • Hi Alex, if i use GraphicBuffer ptr with format, returns me 0x7FA30C04. in Omx_IV_ICommon.h it is defined OMX_QCOM_COLOR_FormatYUV420PackedSemiPlanar32m = 0x7FA30C04 – user3865065 Jul 23 '14 at 22:43
  • Why can't you ask OMX to give you some standard YUV format? – Alex Cohn Jul 24 '14 at 06:20
  • 1
    I tried with OMX_COLOR_FormatYUV420SemiPlanar, OMX_COLOR_FormatYUV420PackedSemiPlanar, OMX_COLOR_FormatYUV422PackedSemiPlanar, OMX_COLOR_FormatYUV420PackedPlanar to set colorformat for OMX Decoder. OMXCodec::Create function doesn't return if i set colorformat in meta data. If i didnt set color format it works well. – user3865065 Jul 24 '14 at 12:34
  • Hi Alex, I'm configuring decoder with Baseline profile and level 3.2 as i need to support HD decoding. will it cause any issue? – user3865065 Jul 24 '14 at 12:46

1 Answers1

2

As noted in links from the article you linked to, the buffer is not in a simple planar YUV format, but rather in a Qualcomm-proprietary format.

You need code that knows how to decode it. This accepted answer to this question seems to have it, though I don't know how stable the format definitions are, and there are some comments that suggest the code as posted isn't quite right.

Community
  • 1
  • 1
fadden
  • 51,356
  • 5
  • 116
  • 166