uvlinesize, 1, 0, simple, pixel_shift);
if (simple || !CONFIG_GRAY || !(s->flags & CODEC_FLAG_GRAY)) {
- h->hpc.pred8x8[h->chroma_pred_mode](dest_cb, uvlinesize);
- h->hpc.pred8x8[h->chroma_pred_mode](dest_cr, uvlinesize);
+ if (CHROMA) {
+ h->hpc.pred8x8[h->chroma_pred_mode](dest_cb, uvlinesize);
+ h->hpc.pred8x8[h->chroma_pred_mode](dest_cr, uvlinesize);
+ }
}
hl_decode_mb_predict_luma(h, mb_type, is_h264, simple,
#define CABAC h->pps.cabac
#endif
+#define CHROMA (h->sps.chroma_format_idc)
#define CHROMA422 (h->sps.chroma_format_idc == 2)
#define CHROMA444 (h->sps.chroma_format_idc == 3)
int pixel_shift)
{
MpegEncContext * const s = &h->s;
- int chroma = !(CONFIG_GRAY && (s->flags&CODEC_FLAG_GRAY));
+ int chroma = CHROMA && !(CONFIG_GRAY && (s->flags&CODEC_FLAG_GRAY));
int chroma444 = CHROMA444;
int chroma422 = CHROMA422;
const int mvy_limit = IS_INTERLACED(mb_type) ? 2 : 4;
int first_vertical_edge_done = 0;
av_unused int dir;
- int chroma = !(CONFIG_GRAY && (s->flags&CODEC_FLAG_GRAY));
+ int chroma = CHROMA && !(CONFIG_GRAY && (s->flags&CODEC_FLAG_GRAY));
int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8);
int a = h->slice_alpha_c0_offset - qp_bd_offset;
int b = h->slice_beta_offset - qp_bd_offset;
s->flags2 = avctx->flags2;
s->unrestricted_mv = 1;
h->is_complex=1;
+ h->sps.chroma_format_idc = 1;
avctx->pix_fmt = avctx->codec->pix_fmts[0];
if (!s->context_initialized) {