我正在尝试使用自己的代码进行复制,而不是使用ffmpeg库来执行ffmpeg将yuv420p转换为rgb的操作。最初,我认为它将位于函数内部:swscale.c中的xyz12Torgb48,但进行了一些跟踪,它似乎位于yuv2rgb.c ff_yuv2rgb_c_init_tables中,我不太清楚。

最佳答案

好吧,因为没有人提出解决方案,所以我只发布我发现使用的
valgrind工具= callgrind ffmpeg_g
这是带有调试对象的ffmpeg版本,向我展示了正在调用的函数,并且在\ libswscale \ x86中有yuv2rgb_template.c,它似乎在汇编中具有您执行的操作yuv2rgb

 * Conversion is performed in usual way:
 * R = Y' * Ycoef + Vred * V'
 * G = Y' * Ycoef + Vgreen * V' + Ugreen * U'
 * B = Y' * Ycoef               + Ublue * U'
 *
 * where X' = X * 8 - Xoffset (multiplication is performed to increase
 * precision a bit).
 * Since it operates in YUV420 colorspace, Y component is additionally
 * split into Y1 and Y2 for even and odd pixels.
 *
 * Input:
 * mm0 - U (4 elems), mm1 - V (4 elems), mm6 - Y (8 elems), mm4 - zero register
 * Output:
 * mm1 - R, mm2 - G, mm0 - B
 */ ```

关于c - FFMPEG用于将yuv420p转换为RGB bmp的所有操作是什么?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/55621559/

10-13 08:58