@@ -415,7 +415,7 @@ static int encode_table(AVCodecContext *avctx,
415
415
return 0 ;
416
416
}
417
417
418
- static int encode_plane_slice (const uint8_t * src , uint8_t * dst , int dst_size ,
418
+ static int encode_plane_slice (const uint8_t * src , uint8_t * dst , unsigned dst_size ,
419
419
int width , int height , HuffEntry * he , int prediction )
420
420
{
421
421
PutBitContext pb ;
@@ -453,17 +453,14 @@ static int encode_slice(AVCodecContext *avctx, void *tdata,
453
453
const int slice_height = s -> slice_height ;
454
454
const int last_height = FFMIN (slice_height , avctx -> height - n * slice_height );
455
455
const int height = (n < (s -> nb_slices - 1 )) ? slice_height : last_height ;
456
- PutByteContext pb ;
457
456
458
457
for (int i = 0 ; i < s -> planes ; i ++ ) {
459
458
Slice * sl = & s -> slices [n * s -> planes + i ];
460
459
461
- bytestream2_init_writer (& pb , sl -> bitslice , s -> bitslice_size );
462
-
463
460
sl -> size =
464
461
encode_plane_slice (sl -> slice ,
465
462
sl -> bitslice ,
466
- bytestream2_get_bytes_left_p ( & pb ) ,
463
+ s -> bitslice_size ,
467
464
AV_CEIL_RSHIFT (avctx -> width , s -> hshift [i ]),
468
465
AV_CEIL_RSHIFT (height , s -> vshift [i ]),
469
466
s -> he [i ], s -> frame_pred );
0 commit comments