FFmpeg
Data Structures | Enumerations | Functions
mjpegenc.h File Reference
#include <stdint.h>
#include "mjpeg.h"
#include "mpegvideo.h"
#include "put_bits.h"

Go to the source code of this file.

Data Structures

struct  MJpegHuffmanCode
 Buffer of JPEG frame data. More...
 
struct  MJpegContext
 Holds JPEG frame data and Huffman table data. More...
 

Enumerations

enum  HuffmanTableOption { HUFFMAN_TABLE_DEFAULT = 0, HUFFMAN_TABLE_OPTIMAL = 1, NB_HUFFMAN_TABLE_OPTION = 2 }
 Enum for the Huffman encoding strategy. More...
 

Functions

static void put_marker (PutBitContext *p, enum JpegMarker code)
 
int ff_mjpeg_encode_init (MpegEncContext *s)
 
void ff_mjpeg_encode_close (MpegEncContext *s)
 
void ff_mjpeg_encode_mb (MpegEncContext *s, int16_t block[12][64])
 
int ff_mjpeg_encode_stuffing (MpegEncContext *s)
 Writes the complete JPEG frame when optimal huffman tables are enabled, otherwise writes the stuffing. More...
 

Detailed Description

MJPEG encoder.

Definition in file mjpegenc.h.

Enumeration Type Documentation

◆ HuffmanTableOption

Enum for the Huffman encoding strategy.

Enumerator
HUFFMAN_TABLE_DEFAULT 

Use the default Huffman tables.

HUFFMAN_TABLE_OPTIMAL 

Compute and use optimal Huffman tables.

NB_HUFFMAN_TABLE_OPTION 

Definition at line 95 of file mjpegenc.h.

Function Documentation

◆ put_marker()

static void put_marker ( PutBitContext p,
enum JpegMarker  code 
)
inlinestatic

◆ ff_mjpeg_encode_init()

int ff_mjpeg_encode_init ( MpegEncContext s)

Definition at line 258 of file mjpegenc.c.

Referenced by ff_mpv_encode_init().

◆ ff_mjpeg_encode_close()

void ff_mjpeg_encode_close ( MpegEncContext s)

Definition at line 313 of file mjpegenc.c.

Referenced by ff_mpv_encode_end().

◆ ff_mjpeg_encode_mb()

void ff_mjpeg_encode_mb ( MpegEncContext s,
int16_t  block[12][64] 
)

Definition at line 472 of file mjpegenc.c.

Referenced by encode_mb_internal().

◆ ff_mjpeg_encode_stuffing()

int ff_mjpeg_encode_stuffing ( MpegEncContext s)

Writes the complete JPEG frame when optimal huffman tables are enabled, otherwise writes the stuffing.

Header + values + stuffing.

Parameters
sThe MpegEncContext.
Returns
int Error code, 0 if successful.

Definition at line 184 of file mjpegenc.c.

Referenced by write_slice_end().