Getting QualComm encoders to work via MediaCodec API

前端 未结 2 1677
感动是毒
感动是毒 2020-12-28 23:44

I am trying to do hardware encoding (avc) of NV12 stream using Android MediaCodec API.

When using OMX.qcom.video.encoder.avc, resolutions 1280x720 and 640x480 work

2条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-29 00:35

    Decoder(MediaCodec) has its MediaFormat, it can be received using getOutputFormat. Returned instance can be printed to log. And there you can see some useful information. For example in your case value like "slice-height" could be useful. I suspect that it is equal to height for 1280x720 and 640x480 and differs for other resolutions. Probably you should use this value to get chroma offset.

提交回复
热议问题