[vlc-devel] [PATCH] chroma: support NV12 plane copy to I420 and NV12 planes

Jean-Baptiste Kempf jb at videolan.org
Wed Apr 22 18:10:57 CEST 2015


On 20 Apr, Steve Lhomme wrote :
> @@ -326,11 +326,23 @@ static void SSE_CopyFromNv12(picture_t *dst,
>                    src[0], src_pitch[0],
>                    cache->buffer, cache->size,
>                    width, height, cpu);
> -    SSE_SplitPlanes(dst->p[2].p_pixels, dst->p[2].i_pitch,
> -                    dst->p[1].p_pixels, dst->p[1].i_pitch,
> -                    src[1], src_pitch[1],
> -                    cache->buffer, cache->size,
> -                    (width+1)/2, (height+1)/2, cpu);
> +    if( dst->format.i_chroma == VLC_CODEC_YV12 )
> +        SSE_SplitPlanes(dst->p[2].p_pixels, dst->p[2].i_pitch,
> +                        dst->p[1].p_pixels, dst->p[1].i_pitch,
> +                        src[1], src_pitch[1],
> +                        cache->buffer, cache->size,
> +                        (width+1)/2, (height+1)/2, cpu);
> +    else if( dst->format.i_chroma == VLC_CODEC_I420 )
> +        SSE_SplitPlanes(dst->p[1].p_pixels, dst->p[1].i_pitch,
> +                        dst->p[2].p_pixels, dst->p[2].i_pitch,
> +                        src[1], src_pitch[1],
> +                        cache->buffer, cache->size,
> +                        (width+1)/2, (height+1)/2, cpu);
> +    else if( dst->format.i_chroma == VLC_CODEC_NV12 )
> +        SSE_CopyPlane(dst->p[1].p_pixels, dst->p[1].i_pitch,
> +                      src[1], src_pitch[1],
> +                      cache->buffer, cache->size,
> +                      width, height/2, cpu);

Then, this is incorrect. The name is from "Nv12".

See
https://mailman.videolan.org/pipermail/vlc-devel/2015-February/101221.html

With my kindest regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list