From fa93411f157698b05055c7ff8a2c17fe7f55c7c3 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Mon, 26 Aug 2024 15:54:22 +0200 Subject: [PATCH] vdec/cmpto_j2k: convert to R12L in parallel refers to GH-406 --- src/video_decompress/cmpto_j2k.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/video_decompress/cmpto_j2k.cpp b/src/video_decompress/cmpto_j2k.cpp index 203b88e97..a9a8624d1 100644 --- a/src/video_decompress/cmpto_j2k.cpp +++ b/src/video_decompress/cmpto_j2k.cpp @@ -75,6 +75,7 @@ #include "types.h" // for video_desc, pixfmt_desc, R12L, RGBA #include "utils/macros.h" #include "utils/misc.h" +#include "utils/parallel_conv.h" #include "video_codec.h" // for vc_get_linesize, codec_is_a_rgb, get_b... #include "video_decompress.h" @@ -135,11 +136,9 @@ static void rg48_to_r12l(unsigned char *dst_buffer, int dst_len = vc_get_linesize(width, R12L); decoder_t vc_copylineRG48toR12L = get_decoder_from_to(RG48, R12L); - for(unsigned i = 0; i < height; i++){ - vc_copylineRG48toR12L(dst_buffer, src_buffer, dst_len, 0, 0, 0); - src_buffer += src_pitch; - dst_buffer += dst_len; - } + parallel_pix_conv((int) height, (char *) dst_buffer, dst_len, + (const char *) src_buffer, src_pitch, + vc_copylineRG48toR12L, 0); } static void print_dropped(unsigned long long int dropped) {