|
@@ -390,7 +390,7 @@ static av_cold int mjpeg_encode_close(AVCodecContext *avctx)
|
|
|
* @param table_id Which Huffman table the code belongs to.
|
|
|
* @param code The encoded exponent of the coefficients and the run-bits.
|
|
|
*/
|
|
|
-static inline void ff_mjpeg_encode_code(MJpegContext *s, uint8_t table_id, int code)
|
|
|
+static inline void mjpeg_encode_code(MJpegContext *s, uint8_t table_id, int code)
|
|
|
{
|
|
|
MJpegHuffmanCode *c = &s->huff_buffer[s->huff_ncode++];
|
|
|
c->table_id = table_id;
|
|
@@ -405,13 +405,13 @@ static inline void ff_mjpeg_encode_code(MJpegContext *s, uint8_t table_id, int c
|
|
|
* @param val The coefficient.
|
|
|
* @param run The run-bits.
|
|
|
*/
|
|
|
-static void ff_mjpeg_encode_coef(MJpegContext *s, uint8_t table_id, int val, int run)
|
|
|
+static void mjpeg_encode_coef(MJpegContext *s, uint8_t table_id, int val, int run)
|
|
|
{
|
|
|
int mant, code;
|
|
|
|
|
|
if (val == 0) {
|
|
|
av_assert0(run == 0);
|
|
|
- ff_mjpeg_encode_code(s, table_id, 0);
|
|
|
+ mjpeg_encode_code(s, table_id, 0);
|
|
|
} else {
|
|
|
mant = val;
|
|
|
if (val < 0) {
|
|
@@ -422,7 +422,7 @@ static void ff_mjpeg_encode_coef(MJpegContext *s, uint8_t table_id, int val, int
|
|
|
code = (run << 4) | (av_log2_16bit(val) + 1);
|
|
|
|
|
|
s->huff_buffer[s->huff_ncode].mant = mant;
|
|
|
- ff_mjpeg_encode_code(s, table_id, code);
|
|
|
+ mjpeg_encode_code(s, table_id, code);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -445,7 +445,7 @@ static void record_block(MpegEncContext *s, int16_t *block, int n)
|
|
|
dc = block[0]; /* overflow is impossible */
|
|
|
val = dc - s->last_dc[component];
|
|
|
|
|
|
- ff_mjpeg_encode_coef(m, table_id, val, 0);
|
|
|
+ mjpeg_encode_coef(m, table_id, val, 0);
|
|
|
|
|
|
s->last_dc[component] = dc;
|
|
|
|
|
@@ -463,17 +463,17 @@ static void record_block(MpegEncContext *s, int16_t *block, int n)
|
|
|
run++;
|
|
|
} else {
|
|
|
while (run >= 16) {
|
|
|
- ff_mjpeg_encode_code(m, table_id, 0xf0);
|
|
|
+ mjpeg_encode_code(m, table_id, 0xf0);
|
|
|
run -= 16;
|
|
|
}
|
|
|
- ff_mjpeg_encode_coef(m, table_id, val, run);
|
|
|
+ mjpeg_encode_coef(m, table_id, val, run);
|
|
|
run = 0;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/* output EOB only if not already 64 values */
|
|
|
if (last_index < 63 || run != 0)
|
|
|
- ff_mjpeg_encode_code(m, table_id, 0);
|
|
|
+ mjpeg_encode_code(m, table_id, 0);
|
|
|
}
|
|
|
|
|
|
static void encode_block(MpegEncContext *s, int16_t *block, int n)
|