avcodec/h264_slice: Fix integer overflow in implicit_weight_table()