|
MPEG4格式解码源代码
【文件名】:06117@52RD_MPEG4格式解码源代码.zip
【格 式】:zip
【大 小】:144K
【简 介】:
【目 录】:
void initdecoder (DEC_BUFFERS buffers)
{
int i, j, cc;
save_tables(mp4_tables);
mp4_state->clp = mp4_state->clp_data + 384;
for (i = -384; i < 640; i++)
mp4_state->clp = (unsigned char) ( (i < 0) ? 0 : ((i > 255) ? 255 : i) );
/* dc prediction border */
for (i = 0; i < (2*DEC_MBC+1); i++)
mp4_state->coeff_pred.dc_store_lum[0] = 1024;
for (i = 1; i < (2*DEC_MBR+1); i++)
mp4_state->coeff_pred.dc_store_lum[0] = 1024;
for (i = 0; i < (DEC_MBC+1); i++) {
mp4_state->coeff_pred.dc_store_chr[0][0] = 1024;
mp4_state->coeff_pred.dc_store_chr[1][0] = 1024;
}
for (i = 1; i < (DEC_MBR+1); i++) {
mp4_state->coeff_pred.dc_store_chr[0][0] = 1024;
mp4_state->coeff_pred.dc_store_chr[1][0] = 1024;
}
/* ac prediction border */
for (i = 0; i < (2*DEC_MBC+1); i++)
for (j = 0; j < 7; j++) {
mp4_state->coeff_pred.ac_left_lum[0][j] = 0;
mp4_state->coeff_pred.ac_top_lum[0][j] = 0;
}
for (i = 1; i < (2*DEC_MBR+1); i++)
for (j = 0; j < 7; j++) {
mp4_state->coeff_pred.ac_left_lum[0][j] = 0;
mp4_state->coeff_pred.ac_top_lum[0][j] = 0;
}
/*
[Review] too many computation to access to the
correct array value, better use two different
pointer for Cb and Cr components
*/
for (i = 0; i < (DEC_MBC+1); i++)
for (j = 0; j < 7; j++) {
mp4_state->coeff_pred.ac_left_chr[0][0][j] = 0;
mp4_state->coeff_pred.ac_top_chr[0][0][j] = 0;
mp4_state->coeff_pred.ac_left_chr[1][0][j] = 0;
mp4_state->coeff_pred.ac_top_chr[1][0][j] = 0;
}
for (i = 1; i < (DEC_MBR+1); i++)
for (j = 0; j < 7; j++) {
mp4_state->coeff_pred.ac_left_chr[0][0][j] = 0;
mp4_state->coeff_pred.ac_top_chr[0][0][j] = 0;
mp4_state->coeff_pred.ac_left_chr[1][0][j] = 0;
mp4_state->coeff_pred.ac_top_chr[1][0][j] = 0;
} |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册
×
|