Commit b41574e3 authored by Dmitry Kovalev's avatar Dmitry Kovalev

Removing unnecessary assert(delta != 0) from encode_loopfilter().

Change-Id: I8ae093d0b61d71d3c294b95d98d0178f7f67c8f6
parent 64cf3987
......@@ -777,38 +777,27 @@ static void encode_loopfilter(struct loopfilter *lf,
vp9_wb_write_bit(wb, lf->mode_ref_delta_enabled);
if (lf->mode_ref_delta_enabled) {
// Do the deltas need to be updated
vp9_wb_write_bit(wb, lf->mode_ref_delta_update);
if (lf->mode_ref_delta_update) {
// Send update
for (i = 0; i < MAX_REF_LF_DELTAS; i++) {
const int delta = lf->ref_deltas[i];
// Frame level data
if (delta != lf->last_ref_deltas[i]) {
const int changed = delta != lf->last_ref_deltas[i];
vp9_wb_write_bit(wb, changed);
if (changed) {
lf->last_ref_deltas[i] = delta;
vp9_wb_write_bit(wb, 1);
assert(delta != 0);
vp9_wb_write_literal(wb, abs(delta) & 0x3F, 6);
vp9_wb_write_bit(wb, delta < 0);
} else {
vp9_wb_write_bit(wb, 0);
}
}
// Send update
for (i = 0; i < MAX_MODE_LF_DELTAS; i++) {
const int delta = lf->mode_deltas[i];
if (delta != lf->last_mode_deltas[i]) {
const int changed = delta != lf->last_mode_deltas[i];
vp9_wb_write_bit(wb, changed);
if (changed) {
lf->last_mode_deltas[i] = delta;
vp9_wb_write_bit(wb, 1);
assert(delta != 0);
vp9_wb_write_literal(wb, abs(delta) & 0x3F, 6);
vp9_wb_write_bit(wb, delta < 0);
} else {
vp9_wb_write_bit(wb, 0);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment