#include "internal.h"
#include "cabac.h"
#include "cabac_functions.h"
-#include "dsputil.h"
#include "error_resilience.h"
#include "avcodec.h"
#include "h264.h"
}
#endif /* CONFIG_ERROR_RESILIENCE */
-int ff_h264_field_end(H264Context *h, int in_setup)
+int ff_h264_field_end(H264Context *h, H264SliceContext *sl, int in_setup)
{
AVCodecContext *const avctx = h->avctx;
int err = 0;
"hardware accelerator failed to decode picture\n");
}
+#if CONFIG_ERROR_RESILIENCE
/*
* FIXME: Error handling code does not seem to support interlaced
* when slices span multiple rows
* past end by one (callers fault) and resync_mb_y != 0
* causes problems for the first MB line, too.
*/
- if (CONFIG_ERROR_RESILIENCE && !FIELD_PICTURE(h)) {
- h264_set_erpic(&h->er.cur_pic, h->cur_pic_ptr);
- h264_set_erpic(&h->er.last_pic,
- h->ref_count[0] ? &h->ref_list[0][0] : NULL);
- h264_set_erpic(&h->er.next_pic,
- h->ref_count[1] ? &h->ref_list[1][0] : NULL);
- ff_er_frame_end(&h->er);
+ if (!FIELD_PICTURE(h)) {
+ h264_set_erpic(&sl->er.cur_pic, h->cur_pic_ptr);
+ h264_set_erpic(&sl->er.last_pic,
+ sl->ref_count[0] ? sl->ref_list[0][0].parent : NULL);
+ h264_set_erpic(&sl->er.next_pic,
+ sl->ref_count[1] ? sl->ref_list[1][0].parent : NULL);
+ ff_er_frame_end(&sl->er);
}
+#endif /* CONFIG_ERROR_RESILIENCE */
+
emms_c();
h->current_slice = 0;