Commit 98131fb4 authored by Thomas Guillem's avatar Thomas Guillem

chroma: copy: add CopyPacked()

In order to use Uswc when copying packer pictures (RGB/YUYV).

(cherry picked from commit 10de9cab)
Signed-off-by: Thomas Guillem's avatarThomas Guillem <thomas@gllm.fr>
parent fd0599ec
......@@ -637,6 +637,21 @@ static void CopyPlane(uint8_t *dst, size_t dst_pitch,
}
}
void CopyPacked(picture_t *dst, const uint8_t *src, const size_t src_pitch,
unsigned height, const copy_cache_t *cache)
{
assert(dst);
assert(src); assert(src_pitch);
assert(height);
if (vlc_CPU_SSE4_1())
SSE_CopyPlane(dst->p[0].p_pixels, dst->p[0].i_pitch, src, src_pitch,
cache->buffer, cache->size, height, 0);
else
CopyPlane(dst->p[0].p_pixels, dst->p[0].i_pitch, src, src_pitch,
height, 0);
}
void Copy420_SP_to_SP(picture_t *dst, const uint8_t *src[static 2],
const size_t src_pitch[static 2], unsigned height,
const copy_cache_t *cache)
......
......@@ -36,6 +36,11 @@ typedef struct {
int CopyInitCache(copy_cache_t *cache, unsigned width);
void CopyCleanCache(copy_cache_t *cache);
/* YUVY/RGB copies */
void CopyPacked(picture_t *dst, const uint8_t *src,
const size_t src_pitch, unsigned height,
const copy_cache_t *cache);
/* Copy planes from NV12/NV21 to NV12/NV21 */
void Copy420_SP_to_SP(picture_t *dst, const uint8_t *src[static 2],
const size_t src_pitch[static 2], unsigned height,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment