intrax8: Use the generic horizband function

This is assuming that intrax8 has no support for interlacing
Carry over lowdelay value in ff_intrax8_decode_picture.
This commit is contained in:
Vittorio Giovara 2016-02-20 01:25:03 -05:00
parent b1268e0f03
commit c2084ffcbf
4 changed files with 10 additions and 5 deletions

View File

@ -29,6 +29,7 @@
#include "intrax8huf.h" #include "intrax8huf.h"
#include "intrax8.h" #include "intrax8.h"
#include "intrax8dsp.h" #include "intrax8dsp.h"
#include "mpegutils.h"
#define MAX_TABLE_DEPTH(table_bits, max_bits) \ #define MAX_TABLE_DEPTH(table_bits, max_bits) \
((max_bits + table_bits - 1) / table_bits) ((max_bits + table_bits - 1) / table_bits)
@ -772,7 +773,8 @@ av_cold void ff_intrax8_common_end(IntraX8Context *w)
int ff_intrax8_decode_picture(IntraX8Context *const w, Picture *pict, int ff_intrax8_decode_picture(IntraX8Context *const w, Picture *pict,
GetBitContext *gb, int *mb_x, int *mb_y, GetBitContext *gb, int *mb_x, int *mb_y,
int dquant, int quant_offset, int loopfilter) int dquant, int quant_offset,
int loopfilter, int lowdelay)
{ {
MpegEncContext *const s = w->s; MpegEncContext *const s = w->s;
int mb_xy; int mb_xy;
@ -834,7 +836,9 @@ int ff_intrax8_decode_picture(IntraX8Context *const w, Picture *pict,
w->dest[0] += 8; w->dest[0] += 8;
} }
if (w->mb_y & 1) if (w->mb_y & 1)
ff_mpeg_draw_horiz_band(s, (w->mb_y - 1) * 8, 16); ff_draw_horiz_band(w->avctx, w->frame, w->frame,
(w->mb_y - 1) * 8, 16,
PICT_FRAME, 0, lowdelay);
} }
error: error:

View File

@ -109,6 +109,7 @@ void ff_intrax8_common_end(IntraX8Context *w);
*/ */
int ff_intrax8_decode_picture(IntraX8Context *w, Picture *pict, int ff_intrax8_decode_picture(IntraX8Context *w, Picture *pict,
GetBitContext *gb, int *mb_x, int *mb_y, GetBitContext *gb, int *mb_x, int *mb_y,
int quant, int halfpq, int loopfilter); int quant, int halfpq,
int loopfilter, int lowdelay);
#endif /* AVCODEC_INTRAX8_H */ #endif /* AVCODEC_INTRAX8_H */

View File

@ -3025,7 +3025,7 @@ void ff_vc1_decode_blocks(VC1Context *v)
ff_intrax8_decode_picture(&v->x8, &v->s.current_picture, ff_intrax8_decode_picture(&v->x8, &v->s.current_picture,
&v->s.gb, &v->s.mb_x, &v->s.mb_y, &v->s.gb, &v->s.mb_x, &v->s.mb_y,
2 * v->pq + v->halfpq, v->pq * !v->pquantizer, 2 * v->pq + v->halfpq, v->pq * !v->pquantizer,
v->s.loop_filter); v->s.loop_filter, v->s.low_delay);
ff_er_add_slice(&v->s.er, 0, 0, ff_er_add_slice(&v->s.er, 0, 0,
(v->s.mb_x >> 1) - 1, (v->s.mb_y >> 1) - 1, (v->s.mb_x >> 1) - 1, (v->s.mb_y >> 1) - 1,

View File

@ -231,7 +231,7 @@ int ff_wmv2_decode_secondary_picture_header(MpegEncContext *s)
ff_intrax8_decode_picture(&w->x8, &s->current_picture, ff_intrax8_decode_picture(&w->x8, &s->current_picture,
&s->gb, &s->mb_x, &s->mb_y, &s->gb, &s->mb_x, &s->mb_y,
2 * s->qscale, (s->qscale - 1) | 1, 2 * s->qscale, (s->qscale - 1) | 1,
s->loop_filter); s->loop_filter, s->low_delay);
ff_er_add_slice(&w->s.er, 0, 0, ff_er_add_slice(&w->s.er, 0, 0,
(w->s.mb_x >> 1) - 1, (w->s.mb_y >> 1) - 1, (w->s.mb_x >> 1) - 1, (w->s.mb_y >> 1) - 1,