All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
uncodedframecrcenc.c File Reference
#include "libavutil/adler32.h"
#include "libavutil/avassert.h"
#include "libavutil/bprint.h"
#include "libavutil/imgutils.h"
#include "libavutil/pixdesc.h"
#include "avformat.h"
#include "internal.h"

Go to the source code of this file.


#define DEFINE_CKSUM_LINE(name, type, conv)


static void video_frame_cksum (AVBPrint *bp, AVFrame *frame)
static void audio_frame_cksum (AVBPrint *bp, AVFrame *frame)
static int write_frame (struct AVFormatContext *s, int stream_index, AVFrame **frame, unsigned flags)
static int write_packet (struct AVFormatContext *s, AVPacket *pkt)


AVOutputFormat ff_uncodedframecrc_muxer

Macro Definition Documentation

#define DEFINE_CKSUM_LINE (   name,
static void cksum_line_ ## name(unsigned *cksum, void *data, unsigned size) \
{ \
type *p = data; \
unsigned a = *cksum & 0xFFFF, b = *cksum >> 16; \
for (; size > 0; size--, p++) { \
a = (a + (unsigned)(conv)) % 65521; \
b = (b + a) % 65521; \
} \
*cksum = a | (b << 16); \
ptrdiff_t const GLvoid * data
Definition: opengl_enc.c:101
static int conv(int samples, float **pcm, char *buf, int channels)
Definition: libvorbisdec.c:120
const char * b
Definition: vf_curves.c:109
ptrdiff_t size
Definition: opengl_enc.c:101
GLint GLenum type
Definition: opengl_enc.c:105
for(j=16;j >0;--j)
const char * name
Definition: opengl_enc.c:103

Definition at line 30 of file uncodedframecrcenc.c.

Function Documentation

static void video_frame_cksum ( AVBPrint *  bp,
AVFrame frame 

Definition at line 48 of file uncodedframecrcenc.c.

Referenced by write_frame().

static void audio_frame_cksum ( AVBPrint *  bp,
AVFrame frame 

Definition at line 77 of file uncodedframecrcenc.c.

Referenced by write_frame().

static int write_frame ( struct AVFormatContext s,
int  stream_index,
AVFrame **  frame,
unsigned  flags 

Definition at line 122 of file uncodedframecrcenc.c.

static int write_packet ( struct AVFormatContext s,
AVPacket pkt 

Definition at line 157 of file uncodedframecrcenc.c.

Variable Documentation

AVOutputFormat ff_uncodedframecrc_muxer
Initial value:
= {
.name = "uncodedframecrc",
.long_name = NULL_IF_CONFIG_SMALL("uncoded framecrc testing"),
.audio_codec = AV_CODEC_ID_PCM_S16LE,
.video_codec = AV_CODEC_ID_RAWVIDEO,
.write_header = ff_framehash_write_header,
.write_packet = write_packet,
.write_uncoded_frame = write_frame,
Format does not require strictly increasing timestamps, but they must still be monotonic.
Definition: avformat.h:495
static int write_packet(struct AVFormatContext *s, AVPacket *pkt)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
int ff_framehash_write_header(AVFormatContext *s)
Set the timebase for each stream from the corresponding codec timebase and print it.
Definition: framehash.c:23
static int write_frame(struct AVFormatContext *s, int stream_index, AVFrame **frame, unsigned flags)
Format allows variable fps.
Definition: avformat.h:488
Format allows muxing negative timestamps.
Definition: avformat.h:500

Definition at line 162 of file uncodedframecrcenc.c.