Move frame allocations out of vp8_decode_frame()

in order to make it easier to implement the frame-base multithreading.

Change-Id: Iea2fd05be34fa704848fdc7669bf167f2ed229c5
This commit is contained in:
Scott LaVarnway
2012-09-24 12:44:45 -07:00
parent e278673c8e
commit f4316f39a1
5 changed files with 186 additions and 143 deletions

View File

@@ -289,14 +289,6 @@ int vp8dx_receive_compressed_data(VP8D_COMP *pbi, unsigned long size, const unsi
VP8_COMMON *cm = &pbi->common;
int retcode = 0;
/*if(pbi->ready_for_new_data == 0)
return -1;*/
if (pbi == 0)
{
return -1;
}
pbi->common.error.error_code = VPX_CODEC_OK;
if (pbi->num_fragments == 0)
@@ -383,6 +375,12 @@ int vp8dx_receive_compressed_data(VP8D_COMP *pbi, unsigned long size, const unsi
cm->new_fb_idx = get_free_fb (cm);
/* setup reference frames for vp8_decode_frame */
pbi->dec_fb_ref[INTRA_FRAME] = &cm->yv12_fb[cm->new_fb_idx];
pbi->dec_fb_ref[LAST_FRAME] = &cm->yv12_fb[cm->lst_fb_idx];
pbi->dec_fb_ref[GOLDEN_FRAME] = &cm->yv12_fb[cm->gld_fb_idx];
pbi->dec_fb_ref[ALTREF_FRAME] = &cm->yv12_fb[cm->alt_fb_idx];
if (setjmp(pbi->common.error.jmp))
{
#if HAVE_NEON