获得高通EN codeRS通过媒体codeC API工作 [英] Getting QualComm encoders to work via MediaCodec API

查看:188
本文介绍了获得高通EN codeRS通过媒体codeC API工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图做硬件编码(AVC)采用Android媒体codeC API NV12流。

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

在使用OMX.qcom.video.en coder.avc,分辨率1280×720和640×480做工精细,而其他人(即640×360,320×240,800×480)产生输出,其中色度分量似乎移动(请参阅快照)。

When using OMX.qcom.video.encoder.avc, resolutions 1280x720 and 640x480 work fine, while the others (i.e. 640x360, 320x240, 800x480) produce output where chroma component seems shifted (please see snapshot).

我已经反复检查输入图像是通过将其保存为JPEG文件正确。 此问题仅出现在高通的设备(如三星Galaxy S4)。

I have double-checked that the input image is correct by saving it to a jpeg file. This problem only occurs on QualComm devices (i.e. Samsung Galaxy S4).

任何人有这个工作是否正常?任何额外的设置/怪癖必要?

Anyone has this working properly? Any additional setup / quirks necessary?

推荐答案

德codeR(媒体codeC)有其MediaFormat,可以使用接收的 getOutputFormat 。返回的实例可以打印记录。在那里你可以看到一些有用的信息。比如像片高度你的案值可能是有用的。我怀疑这是等于高度1280×720和640×480,并因别人的决议。也许你应该使用这个值来获得色度偏移。

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 others resolutions. Probably you should use this value to get chroma offset.

这篇关于获得高通EN codeRS通过媒体codeC API工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆