need_scratch_change = (pOutStr->DisplayStatus
>> MFC_REG_DISP_STATUS_NEED_SCRATCH_CHANGE_SHIFT)
& MFC_REG_DISP_STATUS_NEED_SCRATCH_CHANGE_MASK;
- is_interlaced = (pOutStr->DisplayStatus
- >> MFC_REG_DISP_STATUS_INTERLACE_SHIFT)
- & MFC_REG_DISP_STATUS_INTERLACE_MASK;
+ is_interlaced = (pOutStr->DecodedStatus
+ >> MFC_REG_DEC_STATUS_INTERLACE_SHIFT)
+ & MFC_REG_DEC_STATUS_INTERLACE_MASK;
sei_avail_status = pOutStr->SeiAvail;
err = pOutStr->ErrorCode;
mfc_change_state(ctx, MFCINST_ERROR);
goto leave_handle_frame;
}
- if (is_interlaced) {
+ /*
+ * H264/VC1/MPEG2/MPEG4 can have interlace type
+ * Only MPEG4 can continue to use NALQ
+ * because MPEG4 doesn't handle field unit.
+ */
+ if (is_interlaced && !IS_MPEG4_DEC(ctx)) {
mfc_debug(2, "[NALQ][INTERLACE] Progressive -> Interlaced\n");
dec->is_interlaced = is_interlaced;
dev->nal_q_handle->nal_q_exception = 1;
#define MFC_REG_DEC_STATUS_DECODING_EMPTY 3
#define MFC_REG_DEC_STATUS_NUM_OF_TILE_MASK 0xF
#define MFC_REG_DEC_STATUS_NUM_OF_TILE_SHIFT 15
+#define MFC_REG_DEC_STATUS_INTERLACE_MASK 0x1
+#define MFC_REG_DEC_STATUS_INTERLACE_SHIFT 3
/* 0xF654: MFC_REG_D_DECODED_FRAME_TYPE */