|
|
|
@@ -97,8 +97,6 @@ typedef struct SVQ3Context { |
|
|
|
int thirdpel_flag; |
|
|
|
int has_watermark; |
|
|
|
uint32_t watermark_key; |
|
|
|
uint8_t *buf; |
|
|
|
int buf_size; |
|
|
|
int adaptive_quant; |
|
|
|
int next_p_frame_damaged; |
|
|
|
int h_edge_pos; |
|
|
|
@@ -1383,7 +1381,6 @@ static int svq3_decode_frame(AVCodecContext *avctx, void *data, |
|
|
|
SVQ3Context *s = avctx->priv_data; |
|
|
|
int buf_size = avpkt->size; |
|
|
|
int left; |
|
|
|
uint8_t *buf; |
|
|
|
int ret, m, i; |
|
|
|
|
|
|
|
/* special case for last picture */ |
|
|
|
@@ -1400,17 +1397,7 @@ static int svq3_decode_frame(AVCodecContext *avctx, void *data, |
|
|
|
|
|
|
|
s->mb_x = s->mb_y = s->mb_xy = 0; |
|
|
|
|
|
|
|
if (s->watermark_key) { |
|
|
|
av_fast_padded_malloc(&s->buf, &s->buf_size, buf_size); |
|
|
|
if (!s->buf) |
|
|
|
return AVERROR(ENOMEM); |
|
|
|
memcpy(s->buf, avpkt->data, buf_size); |
|
|
|
buf = s->buf; |
|
|
|
} else { |
|
|
|
buf = avpkt->data; |
|
|
|
} |
|
|
|
|
|
|
|
ret = init_get_bits(&s->gb, buf, 8 * buf_size); |
|
|
|
ret = init_get_bits8(&s->gb, avpkt->data, avpkt->size); |
|
|
|
if (ret < 0) |
|
|
|
return ret; |
|
|
|
|
|
|
|
@@ -1611,10 +1598,6 @@ static av_cold int svq3_decode_end(AVCodecContext *avctx) |
|
|
|
av_freep(&s->edge_emu_buffer); |
|
|
|
av_freep(&s->mb2br_xy); |
|
|
|
|
|
|
|
|
|
|
|
av_freep(&s->buf); |
|
|
|
s->buf_size = 0; |
|
|
|
|
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
|
|