1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00
FFmpeg/libavformat
Ico Doornekamp edf54887e2 rtpdec_jpeg: fix low contrast image on low quality setting
The problem is that the argument 'q' is of the type uint8_t.
According to the JPEG standard, if 1 <= q <= 50, the scale factor
'S' should be 5000 / Q. Because the create_default_qtables() reuses
the variable 'q' to store the result of this calculation, for small
values of q < 19, q wil subsequently overflow and give wrong results
in the calculated quantization tables.

Instead, use a new variable 'S' (same name as in RFC2435) with the
proper range to store the result of the division.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-03-26 00:15:24 +02:00
..
2015-11-12 04:39:14 +01:00
2016-02-22 11:30:58 +01:00
2015-06-28 10:16:40 +02:00
2015-09-13 17:34:45 +02:00
2016-03-05 08:45:01 +01:00
2015-06-12 17:02:49 +01:00
2016-02-22 11:30:58 +01:00
2015-07-04 00:51:03 +02:00
2015-05-31 10:10:16 +03:00
2015-06-15 13:39:07 +02:00
2015-11-30 10:58:46 -05:00
2016-01-21 15:33:19 -05:00
2016-03-25 14:53:37 +01:00
2016-03-24 19:17:23 +01:00
2016-02-22 11:30:58 +01:00
2016-03-01 08:56:36 +02:00
2016-02-22 11:30:58 +01:00
2016-02-22 11:30:58 +01:00
2016-02-22 11:30:58 +01:00
2016-03-23 19:31:36 +01:00