You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/mjpegenc: Use forward decl for MpegEncContext, MJpegHuffmanCode
Avoids an indirect inclusion of mpegvideo.h in mjpegenc_common.c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@ -45,6 +45,20 @@
|
|||||||
#include "mpegvideoenc.h"
|
#include "mpegvideoenc.h"
|
||||||
#include "profiles.h"
|
#include "profiles.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Buffer of JPEG frame data.
|
||||||
|
*
|
||||||
|
* Optimal Huffman table generation requires the frame data to be loaded into
|
||||||
|
* a buffer so that the tables can be computed.
|
||||||
|
* There are at most mb_width*mb_height*12*64 of these per frame.
|
||||||
|
*/
|
||||||
|
typedef struct MJpegHuffmanCode {
|
||||||
|
// 0=DC lum, 1=DC chrom, 2=AC lum, 3=AC chrom
|
||||||
|
uint8_t table_id; ///< The Huffman table id associated with the data.
|
||||||
|
uint8_t code; ///< The exponent.
|
||||||
|
uint16_t mant; ///< The mantissa.
|
||||||
|
} MJpegHuffmanCode;
|
||||||
|
|
||||||
/* The following is the private context of MJPEG/AMV decoder.
|
/* The following is the private context of MJPEG/AMV decoder.
|
||||||
* Note that when using slice threading only the main thread's
|
* Note that when using slice threading only the main thread's
|
||||||
* MpegEncContext is followed by a MjpegContext; the other threads
|
* MpegEncContext is followed by a MjpegContext; the other threads
|
||||||
|
@ -36,23 +36,8 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "mjpeg.h"
|
#include "mjpeg.h"
|
||||||
#include "mpegvideo.h"
|
|
||||||
#include "put_bits.h"
|
#include "put_bits.h"
|
||||||
|
|
||||||
/**
|
|
||||||
* Buffer of JPEG frame data.
|
|
||||||
*
|
|
||||||
* Optimal Huffman table generation requires the frame data to be loaded into
|
|
||||||
* a buffer so that the tables can be computed.
|
|
||||||
* There are at most mb_width*mb_height*12*64 of these per frame.
|
|
||||||
*/
|
|
||||||
typedef struct MJpegHuffmanCode {
|
|
||||||
// 0=DC lum, 1=DC chrom, 2=AC lum, 3=AC chrom
|
|
||||||
uint8_t table_id; ///< The Huffman table id associated with the data.
|
|
||||||
uint8_t code; ///< The exponent.
|
|
||||||
uint16_t mant; ///< The mantissa.
|
|
||||||
} MJpegHuffmanCode;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds JPEG frame data and Huffman table data.
|
* Holds JPEG frame data and Huffman table data.
|
||||||
*/
|
*/
|
||||||
@ -89,7 +74,7 @@ typedef struct MJpegContext {
|
|||||||
uint8_t val_ac_chrominance[256]; ///< AC chrominance Huffman values.
|
uint8_t val_ac_chrominance[256]; ///< AC chrominance Huffman values.
|
||||||
|
|
||||||
size_t huff_ncode; ///< Number of current entries in the buffer.
|
size_t huff_ncode; ///< Number of current entries in the buffer.
|
||||||
MJpegHuffmanCode *huff_buffer; ///< Buffer for Huffman code values.
|
struct MJpegHuffmanCode *huff_buffer; ///< Buffer for Huffman code values.
|
||||||
} MJpegContext;
|
} MJpegContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -107,6 +92,8 @@ static inline void put_marker(PutBitContext *p, enum JpegMarker code)
|
|||||||
put_bits(p, 8, code);
|
put_bits(p, 8, code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef struct MpegEncContext MpegEncContext;
|
||||||
|
|
||||||
int ff_mjpeg_encode_init(MpegEncContext *s);
|
int ff_mjpeg_encode_init(MpegEncContext *s);
|
||||||
void ff_mjpeg_amv_encode_picture_header(MpegEncContext *s);
|
void ff_mjpeg_amv_encode_picture_header(MpegEncContext *s);
|
||||||
void ff_mjpeg_encode_mb(MpegEncContext *s, int16_t block[12][64]);
|
void ff_mjpeg_encode_mb(MpegEncContext *s, int16_t block[12][64]);
|
||||||
|
Reference in New Issue
Block a user