Skip to content

Conditional statements for NV21 and NV12 #1

@kzkysdjpn

Description

@kzkysdjpn

Thank you for publishing the source code.
I am using it as a reference when coding.
I have a question about the conversion source code of YUV images.

https://github.com/ohwada/Android_Samples/tree/master/ImageFormatConverter/library/src/main/cpp/native-yuv-to-buffer-lib.cpp
L101-102
if (uPixelStride == 2 && vPixelStride == 2 &&
uRowStride == vRowStride && bbuf_vIn == bbuf_uIn + 1) {
isNV21=true;

L109-110
} else if (vPixelStride == 2 && uPixelStride == 2 &&
uRowStride == vRowStride && bbuf_vIn == bbuf_uIn + 1) {
isNV21=false;

It looks like the same judgment conditions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions