summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec_jpeg.c
Commit message (Collapse)AuthorAge
* rtpdec_jpeg: fix low contrast image on low quality settingIco Doornekamp2016-03-26
| | | | | | | | | | | | | | 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>
* rtpdec_jpeg: Coalesce redundant error checksDiego Biurrun2015-12-26
|
* build: Split JPEG-related tables off into a separate componentDiego Biurrun2015-03-30
|
* rtpdec: Rename the free method to closeMartin Storsjö2015-02-24
| | | | | | | | | Many of these functions were named foo_free_context, and since the functions no longer should free the context itself, only allocated elements within it, the previous naming was slightly misleading. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Use ffio_free_dyn_bufMartin Storsjö2015-02-24
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Don't free the payload context in the .free functionMartin Storsjö2015-02-24
| | | | | | | | | | | | | | This makes it more consistent with depacketizers that don't have any .free function at all, where the payload context is freed by the surrounding framework. Always free the context in the surrounding framework, having the individual depacketizers only free any data they've specifically allocated themselves. This is similar to how this works for demuxer/muxers/codecs - a component shouldn't free the priv_data that the framework has allocated for it. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Remove unnecessary inline attributesMartin Storsjö2015-02-24
| | | | | | | These functions are far from performance critical, so there's no point in marking them as inline. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Get rid of all trivial .alloc/.free functionsMartin Storsjö2015-02-24
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Remove unnecessary _if_needed suffixes on functionsMartin Storsjö2015-02-24
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec: Pass the sequence number to depacketizersMartin Storsjö2012-12-21
| | | | | | This allows depacketizers to figure out if packets have been lost. Signed-off-by: Martin Storsjö <martin@martin.st>
* miscellaneous typo fixesDiego Biurrun2012-12-21
|
* rtpdec: factorize identical code used in several handlersAnton Khirnov2012-11-02
|
* rtpdec_jpeg: Error out on other unsupported type values as wellMartin Storsjö2012-09-12
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_jpeg: Disallow using the reserved q valuesMartin Storsjö2012-09-12
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_jpeg: Fold the default qtables case into an existing if statementMartin Storsjö2012-09-12
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_jpeg: Store and reuse old qtables for q values 128-254Martin Storsjö2012-09-12
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_jpeg: Simplify the calculation of the number of qtablesMartin Storsjö2012-09-12
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_jpeg: Add more comments about the fields in the SOF0 sectionMartin Storsjö2012-09-12
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_jpeg: Clarify where the subsampling magic numbers come fromMartin Storsjö2012-09-12
| | | | | | | Write out the numbers the way they are constructed, not just the final values. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_jpeg: Don't use a bitstream writer for the EOI markerMartin Storsjö2012-09-12
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_jpeg: Don't needlessly use a bitstream writer for the headerMartin Storsjö2012-09-12
| | | | | | | | Everything written with this bitstream writer is 8/16 bit units (except for a pair of 4 bit values), so using a bitstream writer isn't necessary. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_jpeg: Simplify writing of the jpeg headerMartin Storsjö2012-09-12
| | | | | | | Generalize writing of any number of qtables. Don't manually write 16 bit values in two separate calls. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_jpeg: Merge two if statementsMartin Storsjö2012-09-12
| | | | | | This makes the code more readable and robust. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_jpeg: Write the DHT section properlyMartin Storsjö2012-09-12
| | | | | | | | | Currently the size header of the generated DHT section is incorrect, making the mjpeg decoder just skip it. Since the written huffman tables are the default ones, this failure had gone undetected. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtpdec_jpeg: Add support for default quantizersSamuel Pitoiset2012-09-11
| | | | | | | Generate quantization tables when they are not present in the first chunk. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtp: Depacketization of JPEG (RFC 2435)Samuel Pitoiset2012-09-09
Signed-off-by: Martin Storsjö <martin@martin.st>