Skip to content

something wrong with saved data #2

@hailsham

Description

@hailsham

Thanks for your amazing work.
I meet some problem when I use the softwaresync app dump the data. the color of saved pictures(including jpg and .nv21 file) seems strange. It looks like there is a shift between U, V channel and luma channel.
sync
Screenshot from 2020-08-17 17:11:54
Screenshot from 2020-08-17 17:11:47

Converting the nv21 file to jpg/png using script/yuv2rgb.py will get totally wrong image, while converting the nv21 file to jpg using my own nv21_to_jpg tool with stride=4032 and scanline=3000 will get the same result with the saved JEPG version image. the nv21_metadata.txt is as below:

width: 4000
height: 3000
pixel_format: NV21 (tightly packed)
luma_buffer_bytes: 12095968
interleaved_chroma_buffers_bytes: 6047968

As I know, the chroma buffer size should be 0.5x of luma buffer size with respect to nv21 format, but the saved data dissatisfy that.... 2 * chroma_buffers_bytes - luma_buffer_bytes = -32. It seems that there is something wrong in data saving process rather than the decoding of nv21. I don't know how to fix it, any help would be appreciated, thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions