Skip to content

Commit f4628d0

Browse files
committed
Fix #497: YUV->YUV conversion chroma issues (code path is not live yet, but it's prepared)
1 parent de6ab09 commit f4628d0

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

avs_core/convert/intel/convert_planar_avx2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,8 +647,8 @@ static void convert_yuv_to_planarrgb_avx2_internal(BYTE* (&dstp)[3], int(&dstPit
647647
// FIXME: untested, no AviSynth caller yet. Suspect m.y_b/m.y_r should be
648648
// m.u_b/m.v_r (chroma diagonal), and offset should be chroma_offset_out_for_patch.
649649
v_patch_G = _mm256_set1_epi32(luma_or_rgbin_pivot * m.y_g + offset_out_for_patch);
650-
v_patch_B = _mm256_set1_epi32(chroma_pivot * m.y_b + offset_out_for_patch);
651-
v_patch_R = _mm256_set1_epi32(chroma_pivot * m.y_r + offset_out_for_patch);
650+
v_patch_B = _mm256_set1_epi32(luma_or_rgbin_pivot * m.y_b + chroma_offset_out_for_patch);
651+
v_patch_R = _mm256_set1_epi32(luma_or_rgbin_pivot * m.y_r + chroma_offset_out_for_patch);
652652
}
653653
}
654654
}

avs_core/convert/intel/convert_planar_sse.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,8 @@ static void convert_yuv_to_planarrgb_sse2_internal(BYTE* (&dstp)[3], int(&dstPit
317317
// FIXME: untested, no AviSynth caller yet. Suspect m.y_b/m.y_r should be
318318
// m.u_b/m.v_r (chroma diagonal), and offset should be chroma_offset_out_for_patch.
319319
v_patch_G = _mm_set1_epi32(luma_or_rgbin_pivot * m.y_g + offset_out_for_patch);
320-
v_patch_B = _mm_set1_epi32(chroma_pivot * m.y_b + offset_out_for_patch);
321-
v_patch_R = _mm_set1_epi32(chroma_pivot * m.y_r + offset_out_for_patch);
320+
v_patch_B = _mm_set1_epi32(luma_or_rgbin_pivot * m.y_b + chroma_offset_out_for_patch);
321+
v_patch_R = _mm_set1_epi32(luma_or_rgbin_pivot * m.y_r + chroma_offset_out_for_patch);
322322
}
323323
}
324324
}

0 commit comments

Comments
 (0)