Fixes "libavcodec/snowenc.c:718:27: runtime error: left shift of 8509032 by 8 places cannot be represented in type 'int'" as seen in fate-vsynth2-snow-hpel under ubsan.
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -715,7 +715,7 @@ static int get_dc(SnowEncContext *enc, int mb_x, int mb_y, int plane_index) · 714 unmodified lines | ||
| 715 | 715 | } |
| 716 | 716 | *b= backup; |
| 717 | 717 | |
| 718 | − return av_clip_uint8( ROUNDED_DIV(ab<<LOG2_OBMC_MAX, aa) ); //FIXME we should not need clipping | |
| 718 | + return av_clip_uint8( ROUNDED_DIV((int64_t)ab<<LOG2_OBMC_MAX, aa) ); //FIXME we should not need clipping | |
| 719 | 719 | } |
| 720 | 720 | |
| 721 | 721 | static inline int get_block_bits(SnowContext *s, int x, int y, int w){ |