[FFmpeg-cvslog] mjpeg: Rename some symbols to avpriv_* instead of ff_*

Samuel Pitoiset git at videolan.org
Mon Sep 10 14:21:06 CEST 2012


ffmpeg | branch: master | Samuel Pitoiset <samuel.pitoiset at gmail.com> | Thu Sep  6 15:50:20 2012 +0200| [a0845bae49a7ac9a7b33c846db457c471a6c8deb] | committer: Martin Storsjö

mjpeg: Rename some symbols to avpriv_* instead of ff_*

These symbols will be used from the RTP/JPEG depacketizer.

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

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

 libavcodec/mjpeg.c          |   14 +++++++-------
 libavcodec/mjpeg.h          |   14 +++++++-------
 libavcodec/mjpeg2jpeg_bsf.c |   12 ++++++------
 libavcodec/mjpegdec.c       |   24 ++++++++++++------------
 libavcodec/mjpegenc.c       |   34 +++++++++++++++++-----------------
 5 files changed, 49 insertions(+), 49 deletions(-)

diff --git a/libavcodec/mjpeg.c b/libavcodec/mjpeg.c
index 9f2d50f..a353851 100644
--- a/libavcodec/mjpeg.c
+++ b/libavcodec/mjpeg.c
@@ -62,17 +62,17 @@ const unsigned char std_chrominance_quant_tbl[64] = {
 
 /* Set up the standard Huffman tables (cf. JPEG standard section K.3) */
 /* IMPORTANT: these are only valid for 8-bit data precision! */
-const uint8_t ff_mjpeg_bits_dc_luminance[17] =
+const uint8_t avpriv_mjpeg_bits_dc_luminance[17] =
 { /* 0-base */ 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 };
-const uint8_t ff_mjpeg_val_dc[12] =
+const uint8_t avpriv_mjpeg_val_dc[12] =
 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
 
-const uint8_t ff_mjpeg_bits_dc_chrominance[17] =
+const uint8_t avpriv_mjpeg_bits_dc_chrominance[17] =
 { /* 0-base */ 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 };
 
-const uint8_t ff_mjpeg_bits_ac_luminance[17] =
+const uint8_t avpriv_mjpeg_bits_ac_luminance[17] =
 { /* 0-base */ 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d };
-const uint8_t ff_mjpeg_val_ac_luminance[] =
+const uint8_t avpriv_mjpeg_val_ac_luminance[] =
 { 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12,
   0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07,
   0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08,
@@ -96,10 +96,10 @@ const uint8_t ff_mjpeg_val_ac_luminance[] =
   0xf9, 0xfa
 };
 
-const uint8_t ff_mjpeg_bits_ac_chrominance[17] =
+const uint8_t avpriv_mjpeg_bits_ac_chrominance[17] =
 { /* 0-base */ 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77 };
 
-const uint8_t ff_mjpeg_val_ac_chrominance[] =
+const uint8_t avpriv_mjpeg_val_ac_chrominance[] =
 { 0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21,
   0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71,
   0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91,
diff --git a/libavcodec/mjpeg.h b/libavcodec/mjpeg.h
index c3fde44..1374ab3 100644
--- a/libavcodec/mjpeg.h
+++ b/libavcodec/mjpeg.h
@@ -137,16 +137,16 @@ static inline void put_marker(PutBitContext *p, int code)
         case 7: ret= (left + top)>>1; break;\
     }
 
-extern const uint8_t ff_mjpeg_bits_dc_luminance[];
-extern const uint8_t ff_mjpeg_val_dc[];
+extern const uint8_t avpriv_mjpeg_bits_dc_luminance[];
+extern const uint8_t avpriv_mjpeg_val_dc[];
 
-extern const uint8_t ff_mjpeg_bits_dc_chrominance[];
+extern const uint8_t avpriv_mjpeg_bits_dc_chrominance[];
 
-extern const uint8_t ff_mjpeg_bits_ac_luminance[];
-extern const uint8_t ff_mjpeg_val_ac_luminance[];
+extern const uint8_t avpriv_mjpeg_bits_ac_luminance[];
+extern const uint8_t avpriv_mjpeg_val_ac_luminance[];
 
-extern const uint8_t ff_mjpeg_bits_ac_chrominance[];
-extern const uint8_t ff_mjpeg_val_ac_chrominance[];
+extern const uint8_t avpriv_mjpeg_bits_ac_chrominance[];
+extern const uint8_t avpriv_mjpeg_val_ac_chrominance[];
 
 void ff_mjpeg_build_huffman_codes(uint8_t *huff_size, uint16_t *huff_code,
                                   const uint8_t *bits_table,
diff --git a/libavcodec/mjpeg2jpeg_bsf.c b/libavcodec/mjpeg2jpeg_bsf.c
index a91152d..ec36589 100644
--- a/libavcodec/mjpeg2jpeg_bsf.c
+++ b/libavcodec/mjpeg2jpeg_bsf.c
@@ -59,15 +59,15 @@ static uint8_t *append(uint8_t *buf, const uint8_t *src, int size)
 static uint8_t *append_dht_segment(uint8_t *buf)
 {
     buf = append(buf, dht_segment_head, sizeof(dht_segment_head));
-    buf = append(buf, ff_mjpeg_bits_dc_luminance + 1, 16);
+    buf = append(buf, avpriv_mjpeg_bits_dc_luminance + 1, 16);
     buf = append(buf, dht_segment_frag, sizeof(dht_segment_frag));
-    buf = append(buf, ff_mjpeg_val_dc, 12);
+    buf = append(buf, avpriv_mjpeg_val_dc, 12);
     *(buf++) = 0x10;
-    buf = append(buf, ff_mjpeg_bits_ac_luminance + 1, 16);
-    buf = append(buf, ff_mjpeg_val_ac_luminance, 162);
+    buf = append(buf, avpriv_mjpeg_bits_ac_luminance + 1, 16);
+    buf = append(buf, avpriv_mjpeg_val_ac_luminance, 162);
     *(buf++) = 0x11;
-    buf = append(buf, ff_mjpeg_bits_ac_chrominance + 1, 16);
-    buf = append(buf, ff_mjpeg_val_ac_chrominance, 162);
+    buf = append(buf, avpriv_mjpeg_bits_ac_chrominance + 1, 16);
+    buf = append(buf, avpriv_mjpeg_val_ac_chrominance, 162);
     return buf;
 }
 
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index f738040..72c9cfa 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -67,18 +67,18 @@ static int build_vlc(VLC *vlc, const uint8_t *bits_table,
 
 static void build_basic_mjpeg_vlc(MJpegDecodeContext *s)
 {
-    build_vlc(&s->vlcs[0][0], ff_mjpeg_bits_dc_luminance,
-              ff_mjpeg_val_dc, 12, 0, 0);
-    build_vlc(&s->vlcs[0][1], ff_mjpeg_bits_dc_chrominance,
-              ff_mjpeg_val_dc, 12, 0, 0);
-    build_vlc(&s->vlcs[1][0], ff_mjpeg_bits_ac_luminance,
-              ff_mjpeg_val_ac_luminance, 251, 0, 1);
-    build_vlc(&s->vlcs[1][1], ff_mjpeg_bits_ac_chrominance,
-              ff_mjpeg_val_ac_chrominance, 251, 0, 1);
-    build_vlc(&s->vlcs[2][0], ff_mjpeg_bits_ac_luminance,
-              ff_mjpeg_val_ac_luminance, 251, 0, 0);
-    build_vlc(&s->vlcs[2][1], ff_mjpeg_bits_ac_chrominance,
-              ff_mjpeg_val_ac_chrominance, 251, 0, 0);
+    build_vlc(&s->vlcs[0][0], avpriv_mjpeg_bits_dc_luminance,
+              avpriv_mjpeg_val_dc, 12, 0, 0);
+    build_vlc(&s->vlcs[0][1], avpriv_mjpeg_bits_dc_chrominance,
+              avpriv_mjpeg_val_dc, 12, 0, 0);
+    build_vlc(&s->vlcs[1][0], avpriv_mjpeg_bits_ac_luminance,
+              avpriv_mjpeg_val_ac_luminance, 251, 0, 1);
+    build_vlc(&s->vlcs[1][1], avpriv_mjpeg_bits_ac_chrominance,
+              avpriv_mjpeg_val_ac_chrominance, 251, 0, 1);
+    build_vlc(&s->vlcs[2][0], avpriv_mjpeg_bits_ac_luminance,
+              avpriv_mjpeg_val_ac_luminance, 251, 0, 0);
+    build_vlc(&s->vlcs[2][1], avpriv_mjpeg_bits_ac_chrominance,
+              avpriv_mjpeg_val_ac_chrominance, 251, 0, 0);
 }
 
 av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx)
diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c
index 41f81af..d369d36 100644
--- a/libavcodec/mjpegenc.c
+++ b/libavcodec/mjpegenc.c
@@ -58,20 +58,20 @@ av_cold int ff_mjpeg_encode_init(MpegEncContext *s)
     /* build all the huffman tables */
     ff_mjpeg_build_huffman_codes(m->huff_size_dc_luminance,
                                  m->huff_code_dc_luminance,
-                                 ff_mjpeg_bits_dc_luminance,
-                                 ff_mjpeg_val_dc);
+                                 avpriv_mjpeg_bits_dc_luminance,
+                                 avpriv_mjpeg_val_dc);
     ff_mjpeg_build_huffman_codes(m->huff_size_dc_chrominance,
                                  m->huff_code_dc_chrominance,
-                                 ff_mjpeg_bits_dc_chrominance,
-                                 ff_mjpeg_val_dc);
+                                 avpriv_mjpeg_bits_dc_chrominance,
+                                 avpriv_mjpeg_val_dc);
     ff_mjpeg_build_huffman_codes(m->huff_size_ac_luminance,
                                  m->huff_code_ac_luminance,
-                                 ff_mjpeg_bits_ac_luminance,
-                                 ff_mjpeg_val_ac_luminance);
+                                 avpriv_mjpeg_bits_ac_luminance,
+                                 avpriv_mjpeg_val_ac_luminance);
     ff_mjpeg_build_huffman_codes(m->huff_size_ac_chrominance,
                                  m->huff_code_ac_chrominance,
-                                 ff_mjpeg_bits_ac_chrominance,
-                                 ff_mjpeg_val_ac_chrominance);
+                                 avpriv_mjpeg_bits_ac_chrominance,
+                                 avpriv_mjpeg_val_ac_chrominance);
 
     s->mjpeg_ctx = m;
     return 0;
@@ -138,15 +138,15 @@ static void jpeg_table_header(MpegEncContext *s)
     ptr = put_bits_ptr(p);
     put_bits(p, 16, 0); /* patched later */
     size = 2;
-    size += put_huffman_table(s, 0, 0, ff_mjpeg_bits_dc_luminance,
-                              ff_mjpeg_val_dc);
-    size += put_huffman_table(s, 0, 1, ff_mjpeg_bits_dc_chrominance,
-                              ff_mjpeg_val_dc);
-
-    size += put_huffman_table(s, 1, 0, ff_mjpeg_bits_ac_luminance,
-                              ff_mjpeg_val_ac_luminance);
-    size += put_huffman_table(s, 1, 1, ff_mjpeg_bits_ac_chrominance,
-                              ff_mjpeg_val_ac_chrominance);
+    size += put_huffman_table(s, 0, 0, avpriv_mjpeg_bits_dc_luminance,
+                              avpriv_mjpeg_val_dc);
+    size += put_huffman_table(s, 0, 1, avpriv_mjpeg_bits_dc_chrominance,
+                              avpriv_mjpeg_val_dc);
+
+    size += put_huffman_table(s, 1, 0, avpriv_mjpeg_bits_ac_luminance,
+                              avpriv_mjpeg_val_ac_luminance);
+    size += put_huffman_table(s, 1, 1, avpriv_mjpeg_bits_ac_chrominance,
+                              avpriv_mjpeg_val_ac_chrominance);
     AV_WB16(ptr, size);
 }
 



More information about the ffmpeg-cvslog mailing list