Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -1289,15 +1289,6 @@ static inline void copy_state(RemapEncoderState *dst, const RemapEncoderState *s · 1288 unmodified lines | ||
| 1289 | 1289 | dst->run1start_last_val = src->run1start_last_val; |
| 1290 | 1290 | } |
| 1291 | 1291 | |
| 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 | − | |
| 1301 | 1292 | static int encode_float32_remap_segment(FFV1SliceContext *sc, |
| 1302 | 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 | 1377 | s.last_val = val; |
| 1387 | 1378 | s.current_mul_index = ((s.last_val + 1) * s.mul_count) >> 32; |
| 1388 | 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 | 1385 | s.compact_index ++; |
| 1391 | 1386 | } |
| 1392 | 1387 | } |