简体   繁体   English

LIBHEIF和DAV1D解码器的AVIF图像解码问题

[英]AVIF image decoding problem with LIBHEIF and DAV1D decoder

Hoping to get help from someone familiar with AVIF image format and the DAV1D codec.希望能从熟悉 AVIF 图像格式和 DAV1D 编解码器的人那里得到帮助。

I am a Windows/C/C++ programmer trying to integrate HEIF and AVIF image functionality into an application I am developing (just decoding for now).我是一名 Windows/C/C++ 程序员,试图将 HEIF 和 AVIF 图像功能集成到我正在开发的应用程序中(现在只是解码)。 So I used the LIBHEIF library with the libde265 and dav1d codecs.所以我使用了带有 libde265 和 dav1d 编解码器的 LIBHEIF 库。

I built and linked everything fine.我建立并链接一切都很好。 HEIF images work but AVIFs do not. HEIF 图像有效,但 AVIF 无效。 I am getting the “unspecified error”, even with the example.avif included with LIBHEIF.即使使用 LIBHEIF 中包含的 example.avif,我也会收到“未指定的错误”。

I debugged everything step by step.我一步一步调试了一切。 The image has 4 OBUs: two OBU_SEQ_HDR, one OBU_FRAME_HDR, and one OBU_TILE_GRP.该图像有 4 个 OBU:两个 OBU_SEQ_HDR、一个 OBU_FRAME_HDR 和一个 OBU_TILE_GRP。 Does this sound right to you?这听起来对你吗? The parser does not seem to find any information that it can actually decode, like a frame.解析器似乎没有找到任何可以实际解码的信息,例如帧。 The function output_picture_ready() always returns false.函数 output_picture_ready() 总是返回 false。 So at the end, the parser just returns the error EAGAIN.所以最后,解析器只返回错误 EAGAIN。

You may refer to Build libdav1d using Microsoft Visual C++?您可以参考Build libdav1d using Microsoft Visual C++? to build the native windows dll.构建本机 Windows dll。

libheif v1.12.0 => dav1d version 0.9.2 libheif v1.12.0 => dav1d 版本 0.9.2
libheif master => dav1d version 1.0.0 libheif master => dav1d 版本 1.0.0

To build x86_64 dll, use native x64 console https://docs.microsoft.com/en-us/cpp/build/how-to-enable-a-64-bit-visual-cpp-toolset-on-the-command-line?view=msvc-170要构建 x86_64 dll,请使用本机 x64 控制台https://docs.microsoft.com/en-us/cpp/build/how-to-enable-a-64-bit-visual-cpp-toolset-on-the-command -line?view=msvc-170

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM