|
|
|
@ -1096,7 +1096,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, |
|
|
|
|
FFV1Context *f = avctx->priv_data; |
|
|
|
|
RangeCoder *const c = &f->slice_context[0]->c; |
|
|
|
|
AVFrame *const p = f->picture.f; |
|
|
|
|
int used_count = 0; |
|
|
|
|
uint8_t keystate = 128; |
|
|
|
|
uint8_t *buf_p; |
|
|
|
|
int i, ret; |
|
|
|
@ -1185,11 +1184,17 @@ FF_ENABLE_DEPRECATION_WARNINGS |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for (i = 1; i < f->slice_count; i++) { |
|
|
|
|
for (i = 0; i < f->slice_count; i++) { |
|
|
|
|
FFV1Context *fs = f->slice_context[i]; |
|
|
|
|
uint8_t *start = pkt->data + (pkt->size - used_count) * (int64_t)i / f->slice_count; |
|
|
|
|
uint8_t *start = pkt->data + pkt->size * (int64_t)i / f->slice_count; |
|
|
|
|
int len = pkt->size / f->slice_count; |
|
|
|
|
ff_init_range_encoder(&fs->c, start, len); |
|
|
|
|
if (i) { |
|
|
|
|
ff_init_range_encoder(&fs->c, start, len); |
|
|
|
|
} else { |
|
|
|
|
av_assert0(fs->c.bytestream_end >= fs->c.bytestream_start + len); |
|
|
|
|
av_assert0(fs->c.bytestream < fs->c.bytestream_start + len); |
|
|
|
|
fs->c.bytestream_end = fs->c.bytestream_start + len; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
avctx->execute(avctx, encode_slice, &f->slice_context[0], NULL, |
|
|
|
|
f->slice_count, sizeof(void *)); |
|
|
|
|