int Get_macroblock_type() { int macroblock_type = 0; if (ld->scalable_mode==SC_SNR) macroblock_type = Get_SNR_macroblock_type(); else { switch (picture_coding_type) { case I_TYPE: macroblock_type = ld->pict_scal ? Get_I_Spatial_macroblock_type() : Get_I_macroblock_type(); break; case P_TYPE: macroblock_type = ld->pict_scal ? Get_P_Spatial_macroblock_type() : Get_P_macroblock_type(); break; case B_TYPE: macroblock_type = ld->pict_scal ? Get_B_Spatial_macroblock_type() : Get_B_macroblock_type(); break; case D_TYPE: macroblock_type = Get_D_macroblock_type(); break; default: printf("Get_macroblock_type(): unrecognized picture coding type\n"); break; } } return macroblock_type; }
int MPEG2_Get_macroblock_type(MPEG2_Decoder *dec) { int macroblock_type = 0; switch (dec->picture_coding_type) { case I_TYPE: macroblock_type = Get_I_macroblock_type(dec); break; case P_TYPE: macroblock_type = Get_P_macroblock_type(dec); break; case B_TYPE: macroblock_type = Get_B_macroblock_type(dec); break; case D_TYPE: macroblock_type = Get_D_macroblock_type(dec); break; default: printf("MPEG2_Get_macroblock_type(): unrecognized picture coding type\n"); break; } return macroblock_type; }