Wie konvertiert man einen kCVPixelFormatType_420YpCbCr8BiPlanarFullRange-Puffer in YUV420 mithilfe der libyuv-Bibliothek in ios?
Ich habe Videos mit AVFoundation aufgenommen. Ich habe das Format (Videoeinstellung) festgelegt und komme in den Ausgabebeispielpuffer kCVPixelFormatType_420YpCbCr8BiPlanarFullRange. Aber ich brauche YUV420-Format für die weitere Verarbeitung.
Dafür benutze ich libyuv framework.
LIBYUV_API
int NV12ToI420(const uint8* src_y, int src_stride_y,
const uint8* src_uv, int src_stride_uv,
uint8* dst_y, int dst_stride_y,
uint8* dst_u, int dst_stride_u,
uint8* dst_v, int dst_stride_v,
int width, int height);
libyuv::NV12ToI420(src_yplane, inWidth ,
src_uvplane, inWidth,
dst_yplane, inWidth,
dst_vplane, inWidth / 2,
dst_uplane, inWidth / 2,
inWidth, inHeight);
Aber ich bekomme Ausgabepuffer ist volle grüne Farbe? Ich habe einen Fehler für diesen Prozess gemacht. Bitte helfen Sie mir.