Skip to content

Commit bfb6de1

Browse files
committed
fix for monochrome MC (fixes #381)
1 parent 48eb7da commit bfb6de1

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

libde265/motion.cc

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -543,12 +543,14 @@ void generate_inter_prediction_samples(base_context* ctx,
543543
int16_t* in10 = predSamplesC[1][0];
544544
int16_t* in11 = predSamplesC[1][1];
545545

546-
ctx->acceleration.put_weighted_pred_avg(pixels[1], stride[1],
547-
in00,in01, nCS,
548-
nPbW/SubWidthC, nPbH/SubHeightC, bit_depth_C);
549-
ctx->acceleration.put_weighted_pred_avg(pixels[2], stride[2],
550-
in10,in11, nCS,
551-
nPbW/SubWidthC, nPbH/SubHeightC, bit_depth_C);
546+
if (img->get_chroma_format() != de265_chroma_mono) {
547+
ctx->acceleration.put_weighted_pred_avg(pixels[1], stride[1],
548+
in00, in01, nCS,
549+
nPbW / SubWidthC, nPbH / SubHeightC, bit_depth_C);
550+
ctx->acceleration.put_weighted_pred_avg(pixels[2], stride[2],
551+
in10, in11, nCS,
552+
nPbW / SubWidthC, nPbH / SubHeightC, bit_depth_C);
553+
}
552554
}
553555
else {
554556
// weighted prediction

0 commit comments

Comments
 (0)