summaryrefslogtreecommitdiff
path: root/libavcodec/jpegtables.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-02-10 00:31:46 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-02-23 10:14:25 +0100
commit6eae9c1d3946771c577faeda9e4394a26063dd22 (patch)
tree0b8b5fdc431308c41859fc70ab708ec29b6f79e8 /libavcodec/jpegtables.c
parentd26198ada3279e9d7ef5d3d2cca13b0eff5144f0 (diff)
avcodec/jpegtables: Move ff_mjpeg_build_huffman_codes to mjpegenc_common
Since g2meet.c doesn't use it any more, only encoders use it and the place for their common code is mjpegenc_common.c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/jpegtables.c')
-rw-r--r--libavcodec/jpegtables.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/libavcodec/jpegtables.c b/libavcodec/jpegtables.c
index e44bc7a22a..ef3f8dee20 100644
--- a/libavcodec/jpegtables.c
+++ b/libavcodec/jpegtables.c
@@ -122,24 +122,3 @@ const uint8_t avpriv_mjpeg_val_ac_chrominance[] =
0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
0xf9, 0xfa
};
-
-/* isn't this function nicer than the one in the libjpeg ? */
-void ff_mjpeg_build_huffman_codes(uint8_t *huff_size, uint16_t *huff_code,
- const uint8_t *bits_table,
- const uint8_t *val_table)
-{
- int i, j, k,nb, code, sym;
-
- k = 0;
- code = 0;
- for(i=1;i<=16;i++) {
- nb = bits_table[i];
- for(j=0;j<nb;j++) {
- sym = val_table[k++];
- huff_size[sym] = i;
- huff_code[sym] = code;
- code++;
- }
- code <<= 1;
- }
-}