Samsung has rested its case in its patent trial with Apple, asking for up to $421.8m (£268m) in royalties from the iPhone and iPad maker.

Judge Lucy Koh
Judge Lucy Koh who questioned whether the lawyers from Apple and Samsung were "smoking crack" when presented with a 75-page order.

As the trial heads towards its final stages in a San Jose courtroom, tensions are showing on all sides, including Judge Lucy Koh, who at one stage during proceedings on Thursday, lashed out at both sides when presented with a 75-page order.

"I mean come on. 75 pages. 75 pages. You want me to do an order of 75 pages. Unless you're smoking crack , you know these witnesses aren't going to be called when you have less than four hours," the Judge said.

Finishing giving evidence, Samsung said Apple owes it the $421.8m for the use of three utility patents covering email, photo browsing and music playback functionality, as well as two standards-essential patents.

The majority of that sum - between $290m and $399m - is claimed by Samsung to be for Apple's failure to pay royalties on the two standards-essential patents that Samsung holds.

These patents relate to how devices like the iPhone and iPad connect to the mobile internet, and being standards-essential means they are a requirement for the device to function, so Apple can't build the products without them.

Samsung claims the remaining compensation - a mere $22.8m - relates to the three functionality patents for email, photo browsing and music playback. This figures has been calculated as an estimate of what the two companies would have negotiated between themselves and works out at just a few cents per device sold.

Before resting its case, Samsung picked apart Apple's estimates on compensation, and how the iPhone maker came up with estimated damages of up to $2.75bn.

Overstating

Michael Wagner, a former partner at the investing firm PriceWaterhouse, testified that the figure is closer to $518m if Samsung is found to have infringed on Apple patents.

Wagner accused Apple's damages expert, Terry Musika, of leaving out important data in his multi-billion-dollar estimate, such as expenses for sales, marketing, and research and development.

The Samsung witness went on to claim Apple has miscalculated its lost profits and brought up a point made earlier in the week that Apple had failed to account for its own lack of supply in meeting iPhone 4 demand.

In return, Apple made Wagner admit that he had trouble collecting complete financial records from Samsung, due to how the company saves them, but he maintained that the information was present and accurate, unlike Apple's estimations.

"Unless you're smoking crack, these witnesses won't be called"

US District Judge Lucy Koh, who is overseeing the Apple vs Samsung trial, is beginning to show her distain for how both sides are treating their court time, but her frustration reached boiling point on Thursday.

Following her outburst and questioning of whether the lawyers involved were "smoking crack", Apple attorney Bill Lee assured her that he was not smoking crack.

He added that following the request to book more than 20 witnesses in the few hours Apple has left to speak, Koh's frustration can be understood.

Apple has 6.5 hours left, while Samsung has just 90 minutes and Koh wants to give both sides a further two hours to give their closing arguments, which she wants to hear early next week, when the trial continues.