[FFmpeg-cvslog] rtpdec_jpeg: Add more comments about the fields in the SOF0 section

Martin Storsjö git at videolan.org
Thu Sep 13 15:29:01 CEST 2012


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Tue Sep 11 12:54:06 2012 +0300| [cbaa9eeda3c2ca8532b8bf69c9979f30284414ff] | committer: Martin Storsjö

rtpdec_jpeg: Add more comments about the fields in the SOF0 section

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cbaa9eeda3c2ca8532b8bf69c9979f30284414ff
---

 libavformat/rtpdec_jpeg.c |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/libavformat/rtpdec_jpeg.c b/libavformat/rtpdec_jpeg.c
index 20bb356..b1361cd 100644
--- a/libavformat/rtpdec_jpeg.c
+++ b/libavformat/rtpdec_jpeg.c
@@ -160,20 +160,20 @@ static int jpeg_create_header(uint8_t *buf, int size, uint32_t type, uint32_t w,
 
     /* SOF0 */
     jpeg_put_marker(&pbc, SOF0);
-    bytestream2_put_be16(&pbc, 17);
-    bytestream2_put_byte(&pbc, 8);
+    bytestream2_put_be16(&pbc, 17); /* size */
+    bytestream2_put_byte(&pbc, 8); /* bits per component */
     bytestream2_put_be16(&pbc, h);
     bytestream2_put_be16(&pbc, w);
-    bytestream2_put_byte(&pbc, 3);
-    bytestream2_put_byte(&pbc, 1);
+    bytestream2_put_byte(&pbc, 3); /* number of components */
+    bytestream2_put_byte(&pbc, 1); /* component number */
     bytestream2_put_byte(&pbc, (2 << 4) | (type ? 2 : 1)); /* hsample/vsample */
-    bytestream2_put_byte(&pbc, 0);
-    bytestream2_put_byte(&pbc, 2);
+    bytestream2_put_byte(&pbc, 0); /* matrix number */
+    bytestream2_put_byte(&pbc, 2); /* component number */
     bytestream2_put_byte(&pbc, 1 << 4 | 1); /* hsample/vsample */
-    bytestream2_put_byte(&pbc, nb_qtable == 2 ? 1 : 0);
-    bytestream2_put_byte(&pbc, 3);
+    bytestream2_put_byte(&pbc, nb_qtable == 2 ? 1 : 0); /* matrix number */
+    bytestream2_put_byte(&pbc, 3); /* component number */
     bytestream2_put_byte(&pbc, 1 << 4 | 1); /* hsample/vsample */
-    bytestream2_put_byte(&pbc, nb_qtable == 2 ? 1 : 0);
+    bytestream2_put_byte(&pbc, nb_qtable == 2 ? 1 : 0); /* matrix number */
 
     /* SOS */
     jpeg_put_marker(&pbc, SOS);



More information about the ffmpeg-cvslog mailing list