Also avoid using bitcounts in case one is actually byte-aligned.
Unified · Split
| @@ -976,11 +976,8 @@ static int dv_encode_video_segment(AVCodecContext *avctx, void *arg) · 975 unmodified lines | |||
| 976 | } | 976 | } |
| 977 | 977 | ||
| 978 | for (j = 0; j < 5 * s->sys->bpm; j++) { | 978 | for (j = 0; j < 5 * s->sys->bpm; j++) { |
| 979 | int pos; | ||
| 980 | int size = pbs[j].size_in_bits >> 3; | ||
| 981 | flush_put_bits(&pbs[j]); | 979 | flush_put_bits(&pbs[j]); |
| 982 | pos = put_bits_count(&pbs[j]) >> 3; | 980 | memset(put_bits_ptr(&pbs[j]), 0xff, put_bytes_left(&pbs[j], 0)); |
| 983 | memset(pbs[j].buf + pos, 0xff, size - pos); | ||
| 984 | } | 981 | } |
| 985 | 982 | ||
| 986 | if (DV_PROFILE_IS_HD(s->sys)) | 983 | if (DV_PROFILE_IS_HD(s->sys)) |