summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec_jpeg.c
Commit message (Collapse)AuthorAge
* lavf/rtpdec*: Constify all RTPDynamicProtocolHandler.Carl Eugen Hoyos2018-02-14
| | | | Reviewed-by: Muhammad Faiz
* Merge commit '67deba8a416d818f3d95aef0aa916589090396e2'Clément Bœsch2017-03-31
|\ | | | | | | | | | | | | * commit '67deba8a416d818f3d95aef0aa916589090396e2': Use avpriv_report_missing_feature() where appropriate Merged-by: Clément Bœsch <cboesch@gopro.com>
| * Use avpriv_report_missing_feature() where appropriateDiego Biurrun2016-11-08
| |
* | Merge commit '1263b2039eb5aaf1522e9de9f07c787ab30a5f50'Clément Bœsch2017-03-24
|\| | | | | | | | | | | | | * commit '1263b2039eb5aaf1522e9de9f07c787ab30a5f50': Adjust printf conversion specifiers to match variable signedness Merged-by: Clément Bœsch <u@pkh.me>
| * Adjust printf conversion specifiers to match variable signednessDiego Biurrun2016-10-28
| |
| * 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>
* | avformat/rtpdec_jpeg: fix low contrast image on low quality settingIco Doornekamp2016-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original mail and my own followup on ffmpeg-user earlier today: I have a device sending out a MJPEG/RTP stream on a low quality setting. Decoding and displaying the video with libavformat results in a washed out, low contrast, greyish image. Playing the same stream with VLC results in proper color representation. Screenshots for comparison: http://zevv.nl/div/libav/shot-ffplay.jpg http://zevv.nl/div/libav/shot-vlc.jpg A pcap capture of a few seconds of video and SDP file for playing the stream are available at http://zevv.nl/div/libav/mjpeg.pcap http://zevv.nl/div/libav/mjpeg.sdp I believe the problem might be in the calculation of the quantization tables in the function create_default_qtables(), the attached patch solves the issue for me. 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. The patch below uses a new variable 'S' (same name as in RFC2435) with the proper range to store the result of the division. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '5049f6b772891cdf4030a9d572362efc8f7ae97f'Hendrik Leppkes2016-01-02
|\| | | | | | | | | | | | | * commit '5049f6b772891cdf4030a9d572362efc8f7ae97f': rtpdec_jpeg: Coalesce redundant error checks Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * rtpdec_jpeg: Coalesce redundant error checksDiego Biurrun2015-12-26
| |
* | Merge commit '4978850ca2cb1ec6908f5bc79cc592ca454d11e8'Michael Niedermayer2015-03-31
|\| | | | | | | | | | | | | | | | | | | * commit '4978850ca2cb1ec6908f5bc79cc592ca454d11e8': build: Split JPEG-related tables off into a separate component Conflicts: configure Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * build: Split JPEG-related tables off into a separate componentDiego Biurrun2015-03-30
| |
* | Merge commit 'd594dbecce5f3af7f80bbf5bb1b516d740b69ccd'Michael Niedermayer2015-02-25
|\| | | | | | | | | | | | | * commit 'd594dbecce5f3af7f80bbf5bb1b516d740b69ccd': rtpdec: Rename the free method to close Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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>
* | Merge commit '199fb40278146c5bb162990c66ad3cd561abc780'Michael Niedermayer2015-02-25
|\| | | | | | | | | | | | | | | | | | | | | | | * commit '199fb40278146c5bb162990c66ad3cd561abc780': rtpdec: Use ffio_free_dyn_buf Conflicts: libavformat/rtpdec_latm.c libavformat/rtpdec_svq3.c libavformat/rtpdec_xiph.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpdec: Use ffio_free_dyn_bufMartin Storsjö2015-02-24
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'bb4a310bb85f43e62240145a656b1e5285b14239'Michael Niedermayer2015-02-25
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit 'bb4a310bb85f43e62240145a656b1e5285b14239': rtpdec: Don't free the payload context in the .free function Conflicts: libavformat/rtpdec_latm.c libavformat/rtpdec_mpeg4.c libavformat/rtpdec_mpegts.c libavformat/rtpdec_xiph.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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>
* | Merge commit '88434f9725e7c9484dcbcf323566ae88a2904f32'Michael Niedermayer2015-02-24
|\| | | | | | | | | | | | | * commit '88434f9725e7c9484dcbcf323566ae88a2904f32': rtpdec: Remove unnecessary inline attributes Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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>
* | Merge commit '5d8cae45737bed6239bd6b6e0698802dbe1463c8'Michael Niedermayer2015-02-24
|\| | | | | | | | | | | | | * commit '5d8cae45737bed6239bd6b6e0698802dbe1463c8': rtpdec: Get rid of all trivial .alloc/.free functions Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpdec: Get rid of all trivial .alloc/.free functionsMartin Storsjö2015-02-24
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'db158f0dd217cf839be8af195d66cf49a76537a8'Michael Niedermayer2015-02-24
|\| | | | | | | | | | | | | | | | | | | * commit 'db158f0dd217cf839be8af195d66cf49a76537a8': rtpdec: Remove unnecessary _if_needed suffixes on functions Conflicts: libavformat/rtpdec_xiph.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpdec: Remove unnecessary _if_needed suffixes on functionsMartin Storsjö2015-02-24
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Parse dri when receiving jpg via rtp.Carl Eugen Hoyos2014-07-18
| | | | | | | | | | Based on a patch by contact at iridiummobile ru. Fixes ticket #3780.
* | Merge commit '90c784cc13f6bf21a8eb69f3b88b50c7a70f6c59'Michael Niedermayer2012-12-21
|\| | | | | | | | | | | | | | | | | | | | | * commit '90c784cc13f6bf21a8eb69f3b88b50c7a70f6c59': rtpdec: Pass the sequence number to depacketizers configure: Make avconv depend on null, anull and resample filters Conflicts: configure Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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>
* | Merge commit '511cf612ac979f536fd65e14603a87ca5ad435f3'Michael Niedermayer2012-12-21
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '511cf612ac979f536fd65e14603a87ca5ad435f3': miscellaneous typo fixes Conflicts: libavcodec/4xm.c libavcodec/lagarith.c libavcodec/parser.c libavcodec/ratecontrol.c libavcodec/shorten.c libavcodec/vda_h264.c libavformat/dvenc.c libavformat/wtv.c tools/patcheck Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * miscellaneous typo fixesDiego Biurrun2012-12-21
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-11-02
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: dv1394: Swap the min and max values of the 'standard' option rtpdec_vp8: Don't parse fields that aren't used lavc: add some AVPacket doxy. audiointerleave: deobfuscate a function call. rtpdec: factorize identical code used in several handlers a64: remove interleaved mode. doc: Point to the new location of the c99-to-c89 tool decode_audio3: initialize AVFrame ws-snd1: set channel layout wmavoice: set channel layout wmapro: use AVCodecContext.channels instead of keeping a private copy wma: do not keep private copies of some AVCodecContext fields Conflicts: libavcodec/wmadec.c libavcodec/wmaenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpdec: factorize identical code used in several handlersAnton Khirnov2012-11-02
| |
* | Merge commit '07584eaf4a95db3f11d3bc411f9786932829e82b'Michael Niedermayer2012-09-13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '07584eaf4a95db3f11d3bc411f9786932829e82b': mpegts: check substreams before discarding Add a smooth streaming segmenter muxer file: Add an avoption for disabling truncating existing files on open img2dec: always close AVIOContexts rtpdec_jpeg: Error out on other unsupported type values as well rtpdec_jpeg: Disallow using the reserved q values rtpdec_jpeg: Fold the default qtables case into an existing if statement rtpdec_jpeg: Store and reuse old qtables for q values 128-254 rtpdec_jpeg: Simplify the calculation of the number of qtables rtpdec_jpeg: Add more comments about the fields in the SOF0 section rtpdec_jpeg: Clarify where the subsampling magic numbers come from rtpdec_jpeg: Don't use a bitstream writer for the EOI marker rtpdec_jpeg: Don't needlessly use a bitstream writer for the header rtpdec_jpeg: Simplify writing of the jpeg header rtpdec_jpeg: Merge two if statements rtpdec_jpeg: Write the DHT section properly Conflicts: libavformat/Makefile libavformat/allformats.c libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-09-11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: rtpdec_jpeg: Add support for default quantizers x86: dsputil: Move specific optimization settings out of global init function avplay: get rid of ugly casts in the options table avplay: fix prototypes for option callbacks. flvdec: always set AVFMTCTX_NOHEADER. file: Use a normal private context for storing the file descriptor configure: Adjust the xgetbv instrinsic check configure: Add --disable-inline-asm command line option configure: Don't try to enable the log2 function on msvcrt Conflicts: configure ffplay.c libavcodec/x86/dsputil_mmx.c libavformat/file.c libavformat/flvdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-09-10
|/ | | | | | | | | | | | | | | | | | | | | * qatar/master: x86: dsputil: Only compile motion_est code when encoders are enabled mem: fix typo in check for __ICC fate: mp3: drop redundant CMP setting rtp: Depacketization of JPEG (RFC 2435) Rename ff_put_string to avpriv_put_string mjpeg: Rename some symbols to avpriv_* instead of ff_* yadif: cosmetics Conflicts: Changelog libavcodec/mjpegenc.c libavcodec/x86/Makefile libavfilter/vf_yadif.c libavformat/version.h libavutil/mem.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
* rtp: Depacketization of JPEG (RFC 2435)Samuel Pitoiset2012-09-09
Signed-off-by: Martin Storsjö <martin@martin.st>