使用我自己的运动数据手动输入 x264?

发布于 2024-11-08 05:11:18 字数 297 浏览 5 评论 0原文

我正在尝试使用 x264 对流进行编码(通过提供单个图像),但不寻常的是我已经有了一些帧的运动信息。我确切地知道每个帧中哪些区域已被修改,并且我知道帧中发生运动的位置。

有没有办法向 x264 提供我自己的运动信息?我想给它帧中给定区域的运动向量,并以某种方式告诉它帧中的某些区域保证没有任何运动。

我认为这可能会显着提高编码的性能(因为我允许编解码器完全跳过运动估计阶段),并且在编码器的运动估计算法可能错过实际发生的运动的情况下也应该在一定程度上提高质量。

我是否需要修改编码器才能执行此操作,或者现有 API 是否支持此操作?

I am trying to encode a stream using x264 (by feeding individual images), but what's unusual is that I already have some motion information for my frames. I know exactly which areas have been modified in each frame, and I know where motion has occurred in the frame.

Is there a way to feed x264 my own motion information? I'd like to give it motion vectors for given areas in the frame, and somehow tell it that certain areas in the frame are guaranteed to not have had any motion in them.

I think this might significantly improve the performance of the encoding (because I'm allowing the codec to completely skip the motion estimation phase), and should also somewhat increase quality in cases where the encoder's motion estimation algos might have missed the motion that actually occurred.

Do I need to modify the encoder in order to do this, or is this supported in the existing API?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

江挽川 2024-11-15 05:11:18

简短回答:不,您无法将运动估计数据输入 x264。

长答案:IIRC,x264 通过输入原始帧来工作,没有额外的数据。为了适应您拥有的运动估计数据,您必须修改 x264 源代码才能完成此操作。

您也许可以在 common\mvpred.cencoder\me.c 中找到您需要的内容。我不确定有多少 x264 开发人员实际上访问了 Stack Overflow(我知道他们的一位首席开发人员在这里有一个帐户),但您可以尝试通过他们的 IRC 频道或 doom9 论坛上的常用渠道与他们交谈。

我希望能为您提供更多信息,但不幸的是我并不是特别熟悉代码库。不过,开发人员总是愿意并且能够帮助任何希望在 x264 上工作的人。

Short answer: No you can't feed in your motion estimation data to x264.

Long Answer: IIRC, x264 does it's work by being fed in the raw frame, with no extra data. To accommodate the motion estimation data you have, you'd have to modify the x264 source code to accomplish this.

You may be able to find what you need within common\mvpred.c or encoder\me.c. I'm not sure how many of the x264 developers actually visit Stack overflow (I know one of their lead developers has an account here) but you can try talking to them through their usual channels on their IRC channel or on the doom9 forums.

I wish I could give you more information, but unfortunately I'm not particularly well versed in the code base. The developers are always willing and able to help anyone wishing to work on x264 though.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文