|
|
@ -2044,7 +2044,7 @@ static void write_slice_end(MpegEncContext *s){ |
|
|
|
ff_mjpeg_encode_stuffing(&s->pb); |
|
|
|
ff_mjpeg_encode_stuffing(&s->pb); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
align_put_bits(&s->pb); |
|
|
|
avpriv_align_put_bits(&s->pb); |
|
|
|
flush_put_bits(&s->pb); |
|
|
|
flush_put_bits(&s->pb); |
|
|
|
|
|
|
|
|
|
|
|
if((s->flags&CODEC_FLAG_PASS1) && !s->partitioned_frame) |
|
|
|
if((s->flags&CODEC_FLAG_PASS1) && !s->partitioned_frame) |
|
|
@ -2480,18 +2480,18 @@ static int encode_thread(AVCodecContext *c, void *arg){ |
|
|
|
|
|
|
|
|
|
|
|
pb_bits_count= put_bits_count(&s->pb); |
|
|
|
pb_bits_count= put_bits_count(&s->pb); |
|
|
|
flush_put_bits(&s->pb); |
|
|
|
flush_put_bits(&s->pb); |
|
|
|
ff_copy_bits(&backup_s.pb, bit_buf[next_block^1], pb_bits_count); |
|
|
|
avpriv_copy_bits(&backup_s.pb, bit_buf[next_block^1], pb_bits_count); |
|
|
|
s->pb= backup_s.pb; |
|
|
|
s->pb= backup_s.pb; |
|
|
|
|
|
|
|
|
|
|
|
if(s->data_partitioning){ |
|
|
|
if(s->data_partitioning){ |
|
|
|
pb2_bits_count= put_bits_count(&s->pb2); |
|
|
|
pb2_bits_count= put_bits_count(&s->pb2); |
|
|
|
flush_put_bits(&s->pb2); |
|
|
|
flush_put_bits(&s->pb2); |
|
|
|
ff_copy_bits(&backup_s.pb2, bit_buf2[next_block^1], pb2_bits_count); |
|
|
|
avpriv_copy_bits(&backup_s.pb2, bit_buf2[next_block^1], pb2_bits_count); |
|
|
|
s->pb2= backup_s.pb2; |
|
|
|
s->pb2= backup_s.pb2; |
|
|
|
|
|
|
|
|
|
|
|
tex_pb_bits_count= put_bits_count(&s->tex_pb); |
|
|
|
tex_pb_bits_count= put_bits_count(&s->tex_pb); |
|
|
|
flush_put_bits(&s->tex_pb); |
|
|
|
flush_put_bits(&s->tex_pb); |
|
|
|
ff_copy_bits(&backup_s.tex_pb, bit_buf_tex[next_block^1], tex_pb_bits_count); |
|
|
|
avpriv_copy_bits(&backup_s.tex_pb, bit_buf_tex[next_block^1], tex_pb_bits_count); |
|
|
|
s->tex_pb= backup_s.tex_pb; |
|
|
|
s->tex_pb= backup_s.tex_pb; |
|
|
|
} |
|
|
|
} |
|
|
|
s->last_bits= put_bits_count(&s->pb); |
|
|
|
s->last_bits= put_bits_count(&s->pb); |
|
|
@ -2714,7 +2714,7 @@ static void merge_context_after_encode(MpegEncContext *dst, MpegEncContext *src) |
|
|
|
|
|
|
|
|
|
|
|
assert(put_bits_count(&src->pb) % 8 ==0); |
|
|
|
assert(put_bits_count(&src->pb) % 8 ==0); |
|
|
|
assert(put_bits_count(&dst->pb) % 8 ==0); |
|
|
|
assert(put_bits_count(&dst->pb) % 8 ==0); |
|
|
|
ff_copy_bits(&dst->pb, src->pb.buf, put_bits_count(&src->pb)); |
|
|
|
avpriv_copy_bits(&dst->pb, src->pb.buf, put_bits_count(&src->pb)); |
|
|
|
flush_put_bits(&dst->pb); |
|
|
|
flush_put_bits(&dst->pb); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|