int plane, has_high_freq_coeff = 0;
BLOCK_SIZE bsize = xd->mi[0].src_mi->mbmi.sb_type;
- if (bsize >= BLOCK_8X8)
- for (plane = 0; plane < MAX_MB_PLANE; ++plane)
+ if (bsize >= BLOCK_8X8) {
+ int max_plane = is_inter_block(&xd->mi[0].src_mi->mbmi)
+ ? MAX_MB_PLANE : 1;
+ for (plane = 0; plane < max_plane; ++plane) {
+ x->plane[plane].eobs = ctx->eobs_pbuf[plane][1];
+ has_high_freq_coeff |= vp9_has_high_freq_in_plane(x, bsize, plane);
+ }
+
+ for (plane = max_plane; plane < MAX_MB_PLANE; ++plane) {
+ x->plane[plane].eobs = ctx->eobs_pbuf[plane][2];
has_high_freq_coeff |= vp9_has_high_freq_in_plane(x, bsize, plane);
+ }
+ }
// Take a snapshot of the coding context so it can be
// restored if we decide to encode this way