250 |
if (pEnc->current->mbs == NULL || pEnc->reference->mbs == NULL) |
if (pEnc->current->mbs == NULL || pEnc->reference->mbs == NULL) |
251 |
goto xvid_err_memory2; |
goto xvid_err_memory2; |
252 |
|
|
253 |
|
/* allocate quant matrix memory */ |
254 |
|
|
255 |
|
pEnc->mbParam.mpeg_quant_matrices = |
256 |
|
xvid_malloc(sizeof(uint16_t) * 64 * 8, CACHE_LINE); |
257 |
|
|
258 |
|
if (pEnc->mbParam.mpeg_quant_matrices == NULL) |
259 |
|
goto xvid_err_memory2a; |
260 |
|
|
261 |
/* allocate interpolation image memory */ |
/* allocate interpolation image memory */ |
262 |
|
|
263 |
if ((pEnc->mbParam.plugin_flags & XVID_REQORIGINAL)) { |
if ((pEnc->mbParam.plugin_flags & XVID_REQORIGINAL)) { |
411 |
create->handle = (void *) pEnc; |
create->handle = (void *) pEnc; |
412 |
|
|
413 |
init_timer(); |
init_timer(); |
414 |
|
init_mpeg_matrix(pEnc->mbParam.mpeg_quant_matrices); |
415 |
|
|
416 |
return 0; /* ok */ |
return 0; /* ok */ |
417 |
|
|
478 |
image_destroy(&pEnc->vGMC, pEnc->mbParam.edged_width, |
image_destroy(&pEnc->vGMC, pEnc->mbParam.edged_width, |
479 |
pEnc->mbParam.edged_height); |
pEnc->mbParam.edged_height); |
480 |
|
|
481 |
|
xvid_err_memory2a: |
482 |
|
xvid_free(pEnc->mbParam.mpeg_quant_matrices); |
483 |
|
|
484 |
xvid_err_memory2: |
xvid_err_memory2: |
485 |
xvid_free(pEnc->current->mbs); |
xvid_free(pEnc->current->mbs); |
608 |
xvid_free(pEnc->plugins); |
xvid_free(pEnc->plugins); |
609 |
} |
} |
610 |
|
|
611 |
|
xvid_free(pEnc->mbParam.mpeg_quant_matrices); |
612 |
|
|
613 |
if (pEnc->num_plugins>0) |
if (pEnc->num_plugins>0) |
614 |
xvid_free(pEnc->zones); |
xvid_free(pEnc->zones); |
615 |
|
|
1240 |
|
|
1241 |
if ((pEnc->mbParam.vol_flags & XVID_VOL_MPEGQUANT)) { |
if ((pEnc->mbParam.vol_flags & XVID_VOL_MPEGQUANT)) { |
1242 |
if (frame->quant_intra_matrix != NULL) |
if (frame->quant_intra_matrix != NULL) |
1243 |
set_intra_matrix(frame->quant_intra_matrix); |
set_intra_matrix(pEnc->mbParam.mpeg_quant_matrices, frame->quant_intra_matrix); |
1244 |
if (frame->quant_inter_matrix != NULL) |
if (frame->quant_inter_matrix != NULL) |
1245 |
set_inter_matrix(frame->quant_inter_matrix); |
set_inter_matrix(pEnc->mbParam.mpeg_quant_matrices, frame->quant_inter_matrix); |
1246 |
} |
} |
1247 |
|
|
1248 |
/* prevent vol/vop misuse */ |
/* prevent vol/vop misuse */ |