avcodec/hevc: clear tab_slice_address of ctb on error.

This allows us to detect which areas have failed to decode

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-02-07 04:30:31 +01:00
parent 56985d26d7
commit a18f111582
1 changed files with 7 additions and 2 deletions

View File

@ -1932,8 +1932,11 @@ static int hls_decode_entry(AVCodecContext *avctxt, void *isFilterThread)
s->filter_slice_edges[ctb_addr_rs] = s->sh.slice_loop_filter_across_slices_enabled_flag; s->filter_slice_edges[ctb_addr_rs] = s->sh.slice_loop_filter_across_slices_enabled_flag;
more_data = hls_coding_quadtree(s, x_ctb, y_ctb, s->sps->log2_ctb_size, 0); more_data = hls_coding_quadtree(s, x_ctb, y_ctb, s->sps->log2_ctb_size, 0);
if (more_data < 0) if (more_data < 0) {
s->tab_slice_address[ctb_addr_rs] = -1;
return more_data; return more_data;
}
ctb_addr_ts++; ctb_addr_ts++;
ff_hevc_save_states(s, ctb_addr_ts); ff_hevc_save_states(s, ctb_addr_ts);
@ -1999,8 +2002,10 @@ static int hls_decode_entry_wpp(AVCodecContext *avctxt, void *input_ctb_row, int
hls_sao_param(s, x_ctb >> s->sps->log2_ctb_size, y_ctb >> s->sps->log2_ctb_size); hls_sao_param(s, x_ctb >> s->sps->log2_ctb_size, y_ctb >> s->sps->log2_ctb_size);
more_data = hls_coding_quadtree(s, x_ctb, y_ctb, s->sps->log2_ctb_size, 0); more_data = hls_coding_quadtree(s, x_ctb, y_ctb, s->sps->log2_ctb_size, 0);
if (more_data < 0) if (more_data < 0) {
s->tab_slice_address[ctb_addr_rs] = -1;
return more_data; return more_data;
}
ctb_addr_ts++; ctb_addr_ts++;