FFmpeg
Functions | Variables
mjpeg2jpeg.c File Reference
#include <string.h>
#include "libavutil/error.h"
#include "libavutil/intreadwrite.h"
#include "bsf.h"
#include "bsf_internal.h"
#include "jpegtables.h"
#include "mjpeg.h"

Go to the source code of this file.

Functions

static uint8_t * append (uint8_t *buf, const uint8_t *src, int size)
 
static uint8_t * append_dht_segment (uint8_t *buf)
 
static int mjpeg2jpeg_filter (AVBSFContext *ctx, AVPacket *out)
 

Variables

static const uint8_t jpeg_header []
 
static const int dht_segment_size = 420
 
static const uint8_t dht_segment_head [] = { 0xFF, 0xC4, 0x01, 0xA2, 0x00 }
 
static const uint8_t dht_segment_frag []
 
static enum AVCodecID codec_ids []
 
const FFBitStreamFilter ff_mjpeg2jpeg_bsf
 

Function Documentation

◆ append()

static uint8_t* append ( uint8_t *  buf,
const uint8_t *  src,
int  size 
)
static

◆ append_dht_segment()

static uint8_t* append_dht_segment ( uint8_t *  buf)
static

Definition at line 65 of file mjpeg2jpeg.c.

Referenced by mjpeg2jpeg_filter().

◆ mjpeg2jpeg_filter()

static int mjpeg2jpeg_filter ( AVBSFContext ctx,
AVPacket out 
)
static

Definition at line 80 of file mjpeg2jpeg.c.

Variable Documentation

◆ jpeg_header

const uint8_t jpeg_header[]
static
Initial value:
= {
0xff, 0xd8,
0xff, 0xe0,
0x00, 0x10,
0x4a, 0x46, 0x49, 0x46, 0x00,
0x01, 0x01,
0x00,
0x00, 0x00,
0x00, 0x00,
0x00,
0x00,
}

Definition at line 37 of file mjpeg2jpeg.c.

Referenced by mjpeg2jpeg_filter().

◆ dht_segment_size

const int dht_segment_size = 420
static

Definition at line 51 of file mjpeg2jpeg.c.

Referenced by mjpeg2jpeg_filter().

◆ dht_segment_head

const uint8_t dht_segment_head[] = { 0xFF, 0xC4, 0x01, 0xA2, 0x00 }
static

Definition at line 52 of file mjpeg2jpeg.c.

Referenced by append_dht_segment().

◆ dht_segment_frag

const uint8_t dht_segment_frag[]
static
Initial value:
= {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
0x0a, 0x0b, 0x01, 0x00, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
}

Definition at line 53 of file mjpeg2jpeg.c.

Referenced by append_dht_segment().

◆ codec_ids

enum AVCodecID codec_ids[]
static
Initial value:

Definition at line 134 of file mjpeg2jpeg.c.

◆ ff_mjpeg2jpeg_bsf

const FFBitStreamFilter ff_mjpeg2jpeg_bsf
Initial value:
= {
.p.name = "mjpeg2jpeg",
.p.codec_ids = codec_ids,
.filter = mjpeg2jpeg_filter,
}

Definition at line 138 of file mjpeg2jpeg.c.

mjpeg2jpeg_filter
static int mjpeg2jpeg_filter(AVBSFContext *ctx, AVPacket *out)
Definition: mjpeg2jpeg.c:80
codec_ids
static enum AVCodecID codec_ids[]
Definition: mjpeg2jpeg.c:134
AV_CODEC_ID_MJPEG
@ AV_CODEC_ID_MJPEG
Definition: codec_id.h:59
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:50