intrax8: Move error resilience out of intrax8

The intrax8 decoding process does not imply any kind of error
resilience, and the only call present is more related to how mpegvideo
works rather than anything else.

Therefore have the parent decoders carry out er when actually needed.
This commit is contained in:
Vittorio Giovara 2016-02-19 20:51:44 -05:00
parent 709c0f79d8
commit 0c6a70873f
4 changed files with 11 additions and 10 deletions

3
configure vendored
View File

@ -1860,7 +1860,6 @@ error_resilience_select="me_cmp"
faandct_deps="faan fdctdsp" faandct_deps="faan fdctdsp"
faanidct_deps="faan idctdsp" faanidct_deps="faan idctdsp"
h264dsp_select="startcode" h264dsp_select="startcode"
intrax8_select="error_resilience"
mdct_select="fft" mdct_select="fft"
rdft_select="fft" rdft_select="fft"
me_cmp_select="fdctdsp idctdsp pixblockdsp" me_cmp_select="fdctdsp idctdsp pixblockdsp"
@ -2083,7 +2082,7 @@ wmav2_encoder_select="mdct sinewin wma_freqs"
wmavoice_decoder_select="lsp rdft dct mdct sinewin" wmavoice_decoder_select="lsp rdft dct mdct sinewin"
wmv1_decoder_select="h263_decoder" wmv1_decoder_select="h263_decoder"
wmv1_encoder_select="h263_encoder" wmv1_encoder_select="h263_encoder"
wmv2_decoder_select="blockdsp h263_decoder idctdsp intrax8 videodsp wmv2dsp" wmv2_decoder_select="blockdsp error_resilience h263_decoder idctdsp intrax8 videodsp wmv2dsp"
wmv2_encoder_select="h263_encoder wmv2dsp" wmv2_encoder_select="h263_encoder wmv2dsp"
wmv3_decoder_select="vc1_decoder" wmv3_decoder_select="vc1_decoder"
wmv3image_decoder_select="wmv3_decoder" wmv3image_decoder_select="wmv3_decoder"

View File

@ -22,7 +22,6 @@
*/ */
#include "avcodec.h" #include "avcodec.h"
#include "error_resilience.h"
#include "get_bits.h" #include "get_bits.h"
#include "idctdsp.h" #include "idctdsp.h"
#include "mpegvideo.h" #include "mpegvideo.h"
@ -718,8 +717,8 @@ av_cold void ff_intrax8_common_end(IntraX8Context * w)
/** /**
* Decode single IntraX8 frame. * Decode single IntraX8 frame.
* The parent codec must fill s->loopfilter and s->gb (bitstream). * The parent codec must fill s->loopfilter and s->gb (bitstream).
* The parent codec must call ff_mpv_frame_start(), ff_er_frame_start() before calling this function. * The parent codec must call ff_mpv_frame_start() before calling this function.
* The parent codec must call ff_er_frame_end(), ff_mpv_frame_end() after calling this function. * The parent codec must call ff_mpv_frame_end() after calling this function.
* This function does not use ff_mpv_decode_mb(). * This function does not use ff_mpv_decode_mb().
* @param w pointer to IntraX8Context * @param w pointer to IntraX8Context
* @param dquant doubled quantizer, it would be odd in case of VC-1 halfpq==1. * @param dquant doubled quantizer, it would be odd in case of VC-1 halfpq==1.
@ -745,8 +744,6 @@ int ff_intrax8_decode_picture(IntraX8Context * const w, int dquant, int quant_of
} }
x8_reset_vlc_tables(w); x8_reset_vlc_tables(w);
s->resync_mb_x=0;
s->resync_mb_y=0;
for(s->mb_y=0; s->mb_y < s->mb_height*2; s->mb_y++){ for(s->mb_y=0; s->mb_y < s->mb_height*2; s->mb_y++){
x8_init_block_index(s); x8_init_block_index(s);
@ -785,8 +782,5 @@ int ff_intrax8_decode_picture(IntraX8Context * const w, int dquant, int quant_of
} }
error: error:
ff_er_add_slice(&s->er, s->resync_mb_x, s->resync_mb_y,
(s->mb_x>>1)-1, (s->mb_y>>1)-1,
ER_MB_END );
return 0; return 0;
} }

View File

@ -3023,6 +3023,10 @@ void ff_vc1_decode_blocks(VC1Context *v)
v->s.esc3_level_length = 0; v->s.esc3_level_length = 0;
if (v->x8_type) { if (v->x8_type) {
ff_intrax8_decode_picture(&v->x8, 2*v->pq + v->halfpq, v->pq * !v->pquantizer); ff_intrax8_decode_picture(&v->x8, 2*v->pq + v->halfpq, v->pq * !v->pquantizer);
ff_er_add_slice(&v->s.er, 0, 0,
(v->s.mb_x >> 1) - 1, (v->s.mb_y >> 1) - 1,
ER_MB_END);
} else { } else {
v->cur_blk_idx = 0; v->cur_blk_idx = 0;
v->left_blk_idx = -1; v->left_blk_idx = -1;

View File

@ -229,6 +229,10 @@ int ff_wmv2_decode_secondary_picture_header(MpegEncContext *s)
if (w->j_type) { if (w->j_type) {
ff_intrax8_decode_picture(&w->x8, 2 * s->qscale, (s->qscale - 1) | 1); ff_intrax8_decode_picture(&w->x8, 2 * s->qscale, (s->qscale - 1) | 1);
ff_er_add_slice(&w->s.er, 0, 0,
(w->s.mb_x >> 1) - 1, (w->s.mb_y >> 1) - 1,
ER_MB_END);
return 1; return 1;
} }