History

avcodec/ffv1enc: Eliminate encode_mul()

Michael Niedermayer committed 1 year ago

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

Unified · Split

libavcodec/ffv1enc.c+5−10
@@ -1289,15 +1289,6 @@ static inline void copy_state(RemapEncoderState *dst, const RemapEncoderState *s · 1288 unmodified lines
12891289 dst->run1start_last_val = src->run1start_last_val;
12901290 }
12911291
1292−static 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−
13011292 static int encode_float32_remap_segment(FFV1SliceContext *sc,
13021293 RemapEncoderState *state_arg, int update, int final)
13031294 {
@@ -1386,7 +1377,11 @@ static int encode_float32_remap_segment(FFV1SliceContext *sc, · 82 unmodified lines
13861377 s.last_val = val;
13871378 s.current_mul_index = ((s.last_val + 1) * s.mul_count) >> 32;
13881379 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+ }
13901385 s.compact_index ++;
13911386 }
13921387 }

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