Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raw NV12 video output offset problem. #54

Open
ugurlu opened this issue Feb 13, 2017 · 0 comments
Open

raw NV12 video output offset problem. #54

ugurlu opened this issue Feb 13, 2017 · 0 comments

Comments

@ugurlu
Copy link

ugurlu commented Feb 13, 2017

There seems to be a problem with offset of the raw NV12 output. Following gstreamer script works with nvidia vdpau driver. However with sunxi driver there seems to a shift of 8 bytes. Following dirty patch fixed problem for me. Now the output of raw video is same as the output of software decoder and nvidia vdpau decoder. Video is big_buck_bunny_720p_1mb.mp4. Board is BananaPI with A20 cpu.

On the other hand with or without patch there's no issue with autovideosink. Video plays fine.

Can anyone recommend a better approach?

$ gst-launch-1.0 filesrc location=b1.mp4  ! qtdemux ! queue ! vaapih264dec ! queue !  filesink location=/tmp/hw-full.raw
@@ -207,12 +211,17 @@ VdpStatus vdp_video_surface_get_bits_y_cb_cr(VdpVideoSurface surface,
 #ifndef __aarch64__
        else if (vs->source_format == INTERNAL_YCBCR_FORMAT && destination_ycbcr_format == VDP_YCBCR_FORMAT_NV12)
        {
-               tiled_to_planar(cedrus_mem_get_pointer(vs->yuv->data), destination_data[0], destination_pitches[0], vs->width, vs->height);
-               tiled_to_planar(cedrus_mem_get_pointer(vs->yuv->data) + vs->luma_size, destination_data[1], destination_pitches[1], vs->width, vs->height / 2);
+               tiled_to_planar(cedrus_mem_get_pointer(vs->yuv->data), destination_data[0]-8 , destination_pitches[0], vs->width, vs->height);
+               tiled_to_planar(cedrus_mem_get_pointer(vs->yuv->data) + vs->luma_size, destination_data[1]-8, destination_pitches[1], vs->width, vs->height / 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant