| Index: source/libvpx/vp8/decoder/onyxd_if.c
|
| ===================================================================
|
| --- source/libvpx/vp8/decoder/onyxd_if.c (revision 179051)
|
| +++ source/libvpx/vp8/decoder/onyxd_if.c (working copy)
|
| @@ -92,9 +92,6 @@
|
|
|
| pbi->decoded_key_frame = 0;
|
|
|
| - pbi->input_fragments = oxcf->input_fragments;
|
| - pbi->num_fragments = 0;
|
| -
|
| /* Independent partitions is activated when a frame updates the
|
| * token probability table to have equal probabilities over the
|
| * PREV_COEF context.
|
| @@ -282,60 +279,13 @@
|
| return err;
|
| }
|
|
|
| -int vp8dx_receive_compressed_data(VP8D_COMP *pbi, size_t size,
|
| - const uint8_t *source,
|
| - int64_t time_stamp)
|
| +int check_fragments_for_errors(VP8D_COMP *pbi)
|
| {
|
| -#if HAVE_NEON
|
| - int64_t dx_store_reg[8];
|
| -#endif
|
| - VP8_COMMON *cm = &pbi->common;
|
| - int retcode = -1;
|
| -
|
| - pbi->common.error.error_code = VPX_CODEC_OK;
|
| -
|
| - if (pbi->num_fragments == 0)
|
| - {
|
| - /* New frame, reset fragment pointers and sizes */
|
| - vpx_memset((void*)pbi->fragments, 0, sizeof(pbi->fragments));
|
| - vpx_memset(pbi->fragment_sizes, 0, sizeof(pbi->fragment_sizes));
|
| - }
|
| - if (pbi->input_fragments && !(source == NULL && size == 0))
|
| - {
|
| - /* Store a pointer to this fragment and return. We haven't
|
| - * received the complete frame yet, so we will wait with decoding.
|
| - */
|
| - assert(pbi->num_fragments < MAX_PARTITIONS);
|
| - pbi->fragments[pbi->num_fragments] = source;
|
| - pbi->fragment_sizes[pbi->num_fragments] = size;
|
| - pbi->num_fragments++;
|
| - if (pbi->num_fragments > (1 << EIGHT_PARTITION) + 1)
|
| - {
|
| - pbi->common.error.error_code = VPX_CODEC_UNSUP_BITSTREAM;
|
| - pbi->common.error.setjmp = 0;
|
| - pbi->num_fragments = 0;
|
| - return -1;
|
| - }
|
| - return 0;
|
| - }
|
| -
|
| - if (!pbi->input_fragments)
|
| - {
|
| - pbi->fragments[0] = source;
|
| - pbi->fragment_sizes[0] = size;
|
| - pbi->num_fragments = 1;
|
| - }
|
| - assert(pbi->common.multi_token_partition <= EIGHT_PARTITION);
|
| - if (pbi->num_fragments == 0)
|
| - {
|
| - pbi->num_fragments = 1;
|
| - pbi->fragments[0] = NULL;
|
| - pbi->fragment_sizes[0] = 0;
|
| - }
|
| -
|
| if (!pbi->ec_active &&
|
| pbi->num_fragments <= 1 && pbi->fragment_sizes[0] == 0)
|
| {
|
| + VP8_COMMON *cm = &pbi->common;
|
| +
|
| /* If error concealment is disabled we won't signal missing frames
|
| * to the decoder.
|
| */
|
| @@ -361,13 +311,30 @@
|
| /* Signal that we have no frame to show. */
|
| cm->show_frame = 0;
|
|
|
| - pbi->num_fragments = 0;
|
| -
|
| /* Nothing more to do. */
|
| return 0;
|
| }
|
|
|
| + return 1;
|
| +}
|
| +
|
| +int vp8dx_receive_compressed_data(VP8D_COMP *pbi, size_t size,
|
| + const uint8_t *source,
|
| + int64_t time_stamp)
|
| +{
|
| #if HAVE_NEON
|
| + int64_t dx_store_reg[8];
|
| +#endif
|
| + VP8_COMMON *cm = &pbi->common;
|
| + int retcode = -1;
|
| +
|
| + pbi->common.error.error_code = VPX_CODEC_OK;
|
| +
|
| + retcode = check_fragments_for_errors(pbi);
|
| + if(retcode <= 0)
|
| + return retcode;
|
| +
|
| +#if HAVE_NEON
|
| #if CONFIG_RUNTIME_CPU_DETECT
|
| if (cm->cpu_caps & HAS_NEON)
|
| #endif
|
| @@ -419,7 +386,13 @@
|
|
|
| vp8_clear_system_state();
|
|
|
| -#if CONFIG_ERROR_CONCEALMENT
|
| + if (cm->show_frame)
|
| + {
|
| + cm->current_video_frame++;
|
| + cm->show_frame_mi = cm->mi;
|
| + }
|
| +
|
| + #if CONFIG_ERROR_CONCEALMENT
|
| /* swap the mode infos to storage for future error concealment */
|
| if (pbi->ec_enabled && pbi->common.prev_mi)
|
| {
|
| @@ -441,9 +414,6 @@
|
| }
|
| #endif
|
|
|
| - if (cm->show_frame)
|
| - cm->current_video_frame++;
|
| -
|
| pbi->ready_for_new_data = 0;
|
| pbi->last_time_stamp = time_stamp;
|
|
|
| @@ -458,7 +428,6 @@
|
| #endif
|
|
|
| pbi->common.error.setjmp = 0;
|
| - pbi->num_fragments = 0;
|
| return retcode;
|
| }
|
| int vp8dx_get_raw_frame(VP8D_COMP *pbi, YV12_BUFFER_CONFIG *sd, int64_t *time_stamp, int64_t *time_end_stamp, vp8_ppflags_t *flags)
|
|
|