mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-01-04 13:20:01 +01:00
error_resilience: use the ER_ namespace
Add the namespace to {AC_,DC_,MV_}{END,ERROR} macros
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
@@ -3556,7 +3556,7 @@ static void decode_finish_row(H264Context *h){
|
||||
static int decode_slice(struct AVCodecContext *avctx, void *arg){
|
||||
H264Context *h = *(void**)arg;
|
||||
MpegEncContext * const s = &h->s;
|
||||
const int part_mask= s->partitioned_frame ? (AC_END|AC_ERROR) : 0x7F;
|
||||
const int part_mask= s->partitioned_frame ? (ER_AC_END|ER_AC_ERROR) : 0x7F;
|
||||
int lf_x_start = s->mb_x;
|
||||
|
||||
s->mb_skip_run= -1;
|
||||
@@ -3595,13 +3595,13 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg){
|
||||
eos = get_cabac_terminate( &h->cabac );
|
||||
|
||||
if((s->workaround_bugs & FF_BUG_TRUNCATED) && h->cabac.bytestream > h->cabac.bytestream_end + 2){
|
||||
ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, (AC_END|DC_END|MV_END)&part_mask);
|
||||
ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, (ER_AC_END|ER_DC_END|ER_MV_END)&part_mask);
|
||||
if (s->mb_x >= lf_x_start) loop_filter(h, lf_x_start, s->mb_x + 1);
|
||||
return 0;
|
||||
}
|
||||
if( ret < 0 || h->cabac.bytestream > h->cabac.bytestream_end + 2) {
|
||||
av_log(h->s.avctx, AV_LOG_ERROR, "error while decoding MB %d %d, bytestream (%td)\n", s->mb_x, s->mb_y, h->cabac.bytestream_end - h->cabac.bytestream);
|
||||
ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, (AC_ERROR|DC_ERROR|MV_ERROR)&part_mask);
|
||||
ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, (ER_AC_ERROR|ER_DC_ERROR|ER_MV_ERROR)&part_mask);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -3619,7 +3619,7 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg){
|
||||
|
||||
if( eos || s->mb_y >= s->mb_height ) {
|
||||
tprintf(s->avctx, "slice end %d %d\n", get_bits_count(&s->gb), s->gb.size_in_bits);
|
||||
ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, (AC_END|DC_END|MV_END)&part_mask);
|
||||
ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, (ER_AC_END|ER_DC_END|ER_MV_END)&part_mask);
|
||||
if (s->mb_x > lf_x_start) loop_filter(h, lf_x_start, s->mb_x);
|
||||
return 0;
|
||||
}
|
||||
@@ -3641,7 +3641,7 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg){
|
||||
|
||||
if(ret<0){
|
||||
av_log(h->s.avctx, AV_LOG_ERROR, "error while decoding MB %d %d\n", s->mb_x, s->mb_y);
|
||||
ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, (AC_ERROR|DC_ERROR|MV_ERROR)&part_mask);
|
||||
ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, (ER_AC_ERROR|ER_DC_ERROR|ER_MV_ERROR)&part_mask);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -3659,11 +3659,11 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg){
|
||||
tprintf(s->avctx, "slice end %d %d\n", get_bits_count(&s->gb), s->gb.size_in_bits);
|
||||
|
||||
if(get_bits_count(&s->gb) == s->gb.size_in_bits ) {
|
||||
ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, (AC_END|DC_END|MV_END)&part_mask);
|
||||
ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, (ER_AC_END|ER_DC_END|ER_MV_END)&part_mask);
|
||||
|
||||
return 0;
|
||||
}else{
|
||||
ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, (AC_END|DC_END|MV_END)&part_mask);
|
||||
ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, (ER_AC_END|ER_DC_END|ER_MV_END)&part_mask);
|
||||
|
||||
return -1;
|
||||
}
|
||||
@@ -3673,12 +3673,12 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg){
|
||||
if(get_bits_count(&s->gb) >= s->gb.size_in_bits && s->mb_skip_run<=0){
|
||||
tprintf(s->avctx, "slice end %d %d\n", get_bits_count(&s->gb), s->gb.size_in_bits);
|
||||
if(get_bits_count(&s->gb) == s->gb.size_in_bits ){
|
||||
ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, (AC_END|DC_END|MV_END)&part_mask);
|
||||
ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, (ER_AC_END|ER_DC_END|ER_MV_END)&part_mask);
|
||||
if (s->mb_x > lf_x_start) loop_filter(h, lf_x_start, s->mb_x);
|
||||
|
||||
return 0;
|
||||
}else{
|
||||
ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, (AC_ERROR|DC_ERROR|MV_ERROR)&part_mask);
|
||||
ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, (ER_AC_ERROR|ER_DC_ERROR|ER_MV_ERROR)&part_mask);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user