libavcodec/proresdec_lgpl.c File Reference

This is a decoder for Apple ProRes 422 SD/HQ/LT/Proxy and ProRes 4444. More...

#include <stdint.h>
#include "libavutil/intmath.h"
#include "avcodec.h"
#include "proresdata.h"
#include "proresdsp.h"
#include "get_bits.h"

Go to the source code of this file.

Data Structures

struct  ProresThreadData
struct  ProresContext

Defines

#define LONG_BITSTREAM_READER
#define LSB2SIGN(x)   (-((x) & 1))
#define TOSIGNED(x)   (((x) >> 1) ^ LSB2SIGN(x))
#define MOVE_DATA_PTR(nbytes)   buf += (nbytes); buf_size -= (nbytes)

Functions

static av_cold int decode_init (AVCodecContext *avctx)
static int decode_frame_header (ProresContext *ctx, const uint8_t *buf, const int data_size, AVCodecContext *avctx)
static int decode_picture_header (ProresContext *ctx, const uint8_t *buf, const int data_size, AVCodecContext *avctx)
static int decode_vlc_codeword (GetBitContext *gb, unsigned codebook)
 Read an unsigned rice/exp golomb codeword.
static void decode_dc_coeffs (GetBitContext *gb, DCTELEM *out, int nblocks)
 Decode DC coefficients for all blocks in a slice.
static void decode_ac_coeffs (GetBitContext *gb, DCTELEM *out, int blocks_per_slice, int plane_size_factor, const uint8_t *scan)
 Decode AC coefficients for all blocks in a slice.
static void decode_slice_plane (ProresContext *ctx, ProresThreadData *td, const uint8_t *buf, int data_size, uint16_t *out_ptr, int linesize, int mbs_per_slice, int blocks_per_mb, int plane_size_factor, const int16_t *qmat, int is_chroma)
 Decode a slice plane (luma or chroma).
static int decode_slice (AVCodecContext *avctx, void *tdata)
static int decode_picture (ProresContext *ctx, int pic_num, AVCodecContext *avctx)
static int decode_frame (AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
static av_cold int decode_close (AVCodecContext *avctx)

Variables

AVCodec ff_prores_lgpl_decoder


Detailed Description

This is a decoder for Apple ProRes 422 SD/HQ/LT/Proxy and ProRes 4444.

It is used for storing and editing high definition video data in Apple's Final Cut Pro.

See also:
http://wiki.multimedia.cx/index.php?title=Apple_ProRes

Definition in file proresdec_lgpl.c.


Define Documentation

#define LONG_BITSTREAM_READER

Definition at line 31 of file proresdec_lgpl.c.

#define LSB2SIGN (  )     (-((x) & 1))

Definition at line 334 of file proresdec_lgpl.c.

#define MOVE_DATA_PTR ( nbytes   )     buf += (nbytes); buf_size -= (nbytes)

Definition at line 599 of file proresdec_lgpl.c.

Referenced by decode_frame().

#define TOSIGNED (  )     (((x) >> 1) ^ LSB2SIGN(x))

Definition at line 335 of file proresdec_lgpl.c.


Function Documentation

static void decode_ac_coeffs ( GetBitContext gb,
DCTELEM out,
int  blocks_per_slice,
int  plane_size_factor,
const uint8_t scan 
) [inline, static]

Decode AC coefficients for all blocks in a slice.

Definition at line 368 of file proresdec_lgpl.c.

static av_cold int decode_close ( AVCodecContext avctx  )  [static]

Definition at line 650 of file proresdec_lgpl.c.

static void decode_dc_coeffs ( GetBitContext gb,
DCTELEM out,
int  nblocks 
) [inline, static]

Decode DC coefficients for all blocks in a slice.

Definition at line 340 of file proresdec_lgpl.c.

static int decode_frame ( AVCodecContext avctx,
void *  data,
int *  data_size,
AVPacket avpkt 
) [static]

Definition at line 601 of file proresdec_lgpl.c.

static int decode_frame_header ( ProresContext ctx,
const uint8_t buf,
const int  data_size,
AVCodecContext avctx 
) [static]

Definition at line 102 of file proresdec_lgpl.c.

static av_cold int decode_init ( AVCodecContext avctx  )  [static]

Definition at line 79 of file proresdec_lgpl.c.

static int decode_picture ( ProresContext ctx,
int  pic_num,
AVCodecContext avctx 
) [static]

Definition at line 568 of file proresdec_lgpl.c.

static int decode_picture_header ( ProresContext ctx,
const uint8_t buf,
const int  data_size,
AVCodecContext avctx 
) [static]

Definition at line 212 of file proresdec_lgpl.c.

static int decode_slice ( AVCodecContext avctx,
void *  tdata 
) [static]

Definition at line 470 of file proresdec_lgpl.c.

static void decode_slice_plane ( ProresContext ctx,
ProresThreadData td,
const uint8_t buf,
int  data_size,
uint16_t *  out_ptr,
int  linesize,
int  mbs_per_slice,
int  blocks_per_mb,
int  plane_size_factor,
const int16_t qmat,
int  is_chroma 
) [static]

Decode a slice plane (luma or chroma).

Definition at line 413 of file proresdec_lgpl.c.

Referenced by decode_slice().

static int decode_vlc_codeword ( GetBitContext gb,
unsigned  codebook 
) [inline, static]

Read an unsigned rice/exp golomb codeword.

Definition at line 296 of file proresdec_lgpl.c.

Referenced by decode_ac_coeffs(), and decode_dc_coeffs().


Variable Documentation

Initial value:

 {
    .name           = "prores_lgpl",
    .type           = AVMEDIA_TYPE_VIDEO,
    .id             = CODEC_ID_PRORES,
    .priv_data_size = sizeof(ProresContext),
    .init           = decode_init,
    .close          = decode_close,
    .decode         = decode_frame,
    .capabilities   = CODEC_CAP_DR1 | CODEC_CAP_SLICE_THREADS,
    .long_name      = NULL_IF_CONFIG_SMALL("Apple ProRes (iCodec Pro)")
}

Definition at line 663 of file proresdec_lgpl.c.


Generated on Fri Oct 26 02:47:58 2012 for FFmpeg by  doxygen 1.5.8