|
|
@ -578,7 +578,7 @@ static int decode_slice_thread(AVCodecContext *avctx, void *arg, int jobnr, int |
|
|
|
if (ret < 0) |
|
|
|
if (ret < 0) |
|
|
|
return ret; |
|
|
|
return ret; |
|
|
|
|
|
|
|
|
|
|
|
if (!(avctx->flags & AV_CODEC_FLAG_GRAY)) { |
|
|
|
if (!(avctx->flags & AV_CODEC_FLAG_GRAY) && (u_data_size + v_data_size) > 0) { |
|
|
|
ret = decode_slice_chroma(avctx, slice, (uint16_t*)dest_u, chroma_stride, |
|
|
|
ret = decode_slice_chroma(avctx, slice, (uint16_t*)dest_u, chroma_stride, |
|
|
|
buf + y_data_size, u_data_size, |
|
|
|
buf + y_data_size, u_data_size, |
|
|
|
qmat_chroma_scaled, log2_chroma_blocks_per_mb); |
|
|
|
qmat_chroma_scaled, log2_chroma_blocks_per_mb); |
|
|
@ -591,6 +591,15 @@ static int decode_slice_thread(AVCodecContext *avctx, void *arg, int jobnr, int |
|
|
|
if (ret < 0) |
|
|
|
if (ret < 0) |
|
|
|
return ret; |
|
|
|
return ret; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
else { |
|
|
|
|
|
|
|
size_t mb_max_x = slice->mb_count << (mb_x_shift - 1); |
|
|
|
|
|
|
|
for (size_t i = 0; i < 16; ++i) |
|
|
|
|
|
|
|
for (size_t j = 0; j < mb_max_x; ++j) { |
|
|
|
|
|
|
|
*(uint16_t*)(dest_u + (i * chroma_stride) + (j << 1)) = 511; |
|
|
|
|
|
|
|
*(uint16_t*)(dest_v + (i * chroma_stride) + (j << 1)) = 511; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* decode alpha plane if available */ |
|
|
|
/* decode alpha plane if available */ |
|
|
|
if (ctx->alpha_info && pic->data[3] && a_data_size) |
|
|
|
if (ctx->alpha_info && pic->data[3] && a_data_size) |
|
|
|
decode_slice_alpha(ctx, (uint16_t*)dest_a, luma_stride, |
|
|
|
decode_slice_alpha(ctx, (uint16_t*)dest_a, luma_stride, |
|
|
|