You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/mjpegenc: Don't use ff_ prefix for static functions
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -390,7 +390,7 @@ static av_cold int mjpeg_encode_close(AVCodecContext *avctx)
|
|||||||
* @param table_id Which Huffman table the code belongs to.
|
* @param table_id Which Huffman table the code belongs to.
|
||||||
* @param code The encoded exponent of the coefficients and the run-bits.
|
* @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++];
|
MJpegHuffmanCode *c = &s->huff_buffer[s->huff_ncode++];
|
||||||
c->table_id = table_id;
|
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 val The coefficient.
|
||||||
* @param run The run-bits.
|
* @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;
|
int mant, code;
|
||||||
|
|
||||||
if (val == 0) {
|
if (val == 0) {
|
||||||
av_assert0(run == 0);
|
av_assert0(run == 0);
|
||||||
ff_mjpeg_encode_code(s, table_id, 0);
|
mjpeg_encode_code(s, table_id, 0);
|
||||||
} else {
|
} else {
|
||||||
mant = val;
|
mant = val;
|
||||||
if (val < 0) {
|
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);
|
code = (run << 4) | (av_log2_16bit(val) + 1);
|
||||||
|
|
||||||
s->huff_buffer[s->huff_ncode].mant = mant;
|
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 */
|
dc = block[0]; /* overflow is impossible */
|
||||||
val = dc - s->last_dc[component];
|
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;
|
s->last_dc[component] = dc;
|
||||||
|
|
||||||
@@ -463,17 +463,17 @@ static void record_block(MpegEncContext *s, int16_t *block, int n)
|
|||||||
run++;
|
run++;
|
||||||
} else {
|
} else {
|
||||||
while (run >= 16) {
|
while (run >= 16) {
|
||||||
ff_mjpeg_encode_code(m, table_id, 0xf0);
|
mjpeg_encode_code(m, table_id, 0xf0);
|
||||||
run -= 16;
|
run -= 16;
|
||||||
}
|
}
|
||||||
ff_mjpeg_encode_coef(m, table_id, val, run);
|
mjpeg_encode_coef(m, table_id, val, run);
|
||||||
run = 0;
|
run = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* output EOB only if not already 64 values */
|
/* output EOB only if not already 64 values */
|
||||||
if (last_index < 63 || run != 0)
|
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)
|
static void encode_block(MpegEncContext *s, int16_t *block, int n)
|
||||||
|
Reference in New Issue
Block a user