History

avcodec/dvenc: Avoid using PutBitContext fields directly

Also avoid using bitcounts in case one is actually byte-aligned.

Andreas Rheinhardt committed 5 years ago

Commit 73fb1b81 parent f9d15281 file · +1 −4Browse files

Unified · Split

libavcodec/dvenc.c+1−4
@@ -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))

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t