[FFmpeg-devel] [PATCH]lavf/rtpenc_jpeg: Warn if number of present quantization tables is not two

Carl Eugen Hoyos cehoyos at ag.or.at
Fri Jul 17 00:34:28 CEST 2015


Hi!

The RFC requires jpeg-over-rtp to provide exactly two quantization 
tables, one for luma, one for chroma.

Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavformat/rtpenc_jpeg.c b/libavformat/rtpenc_jpeg.c
index e6b3177..a6f2b32 100644
--- a/libavformat/rtpenc_jpeg.c
+++ b/libavformat/rtpenc_jpeg.c
@@ -119,6 +119,10 @@ void ff_rtp_send_jpeg(AVFormatContext *s1, const uint8_t *buf, int size)
             break;
         }
     }
+    if (nb_qtables && nb_qtables != 2)
+        av_log(s1, AV_LOG_WARNING,
+               "RFC 2435 suggests two quantization tables, %d provided\n",
+               nb_qtables);
 
     /* skip JPEG header */
     buf  += i;


More information about the ffmpeg-devel mailing list