History

avcodec/ffv1enc: Eliminate encode_mul()

Michael Niedermayer committed 1 year ago

Commit ffd537b1 parent 8804ae11 file · +5 −10Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/ffv1enc.c+5−10
@@ -1289,15 +1289,6 @@ static inline void copy_state(RemapEncoderState *dst, const RemapEncoderState *s · 1288 unmodified lines
1289 dst->run1start_last_val = src->run1start_last_val;1289 dst->run1start_last_val = src->run1start_last_val;
1290}1290}
1291 1291
1292static inline void encode_mul(RemapEncoderState *s, int mul_index)
1293{
1294 av_assert2(s->mul[ mul_index ]);
1295 if (s->mul[ mul_index ] < 0) {
1296 s->mul[ mul_index ] *= -1;
1297 put_symbol_inline(&s->rc, s->state[0][2], s->mul[ mul_index ], 0, NULL, NULL);
1298 }
1299}
1300
1301static int encode_float32_remap_segment(FFV1SliceContext *sc,1292static int encode_float32_remap_segment(FFV1SliceContext *sc,
1302 RemapEncoderState *state_arg, int update, int final)1293 RemapEncoderState *state_arg, int update, int final)
1303{1294{
@@ -1386,7 +1377,11 @@ static int encode_float32_remap_segment(FFV1SliceContext *sc, · 82 unmodified lines
1386 s.last_val = val;1377 s.last_val = val;
1387 s.current_mul_index = ((s.last_val + 1) * s.mul_count) >> 32;1378 s.current_mul_index = ((s.last_val + 1) * s.mul_count) >> 32;
1388 if (!s.run || s.run1final) {1379 if (!s.run || s.run1final) {
1389 encode_mul(&s, s.current_mul_index);1380 av_assert2(s.mul[ s.current_mul_index ]);
1381 if (s.mul[ s.current_mul_index ] < 0) {
1382 s.mul[ s.current_mul_index ] *= -1;
1383 put_symbol_inline(&s.rc, s.state[0][2], s.mul[ s.current_mul_index ], 0, NULL, NULL);
1384 }
1390 s.compact_index ++;1385 s.compact_index ++;
1391 }1386 }
1392 }1387 }

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