FFmpeg
|
#include <inttypes.h>
#include "libavutil/thread.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "get_bits.h"
#include "mathops.h"
#include "lagarithrac.h"
#include "lossless_videodsp.h"
#include "thread.h"
Go to the source code of this file.
Data Structures | |
struct | LagarithContext |
Macros | |
#define | VLC_BITS 7 |
Enumerations | |
enum | LagarithFrameType { FRAME_RAW = 1, FRAME_U_RGB24 = 2, FRAME_ARITH_YUY2 = 3, FRAME_ARITH_RGB24 = 4, FRAME_SOLID_GRAY = 5, FRAME_SOLID_COLOR = 6, FRAME_OLD_ARITH_RGB = 7, FRAME_ARITH_RGBA = 8, FRAME_SOLID_RGBA = 9, FRAME_ARITH_YV12 = 10, FRAME_REDUCED_RES = 11 } |
Functions | |
static av_cold void | lag_init_static_data (void) |
static uint64_t | softfloat_reciprocal (uint32_t denom) |
Compute the 52-bit mantissa of 1/(double)denom. More... | |
static uint32_t | softfloat_mul (uint32_t x, uint64_t mantissa) |
(uint32_t)(x*f), where f has the given mantissa, and exponent 0 Used in combination with softfloat_reciprocal computes x/(double)denom. More... | |
static uint8_t | lag_calc_zero_run (int8_t x) |
static int | lag_decode_prob (GetBitContext *gb, uint32_t *value) |
static int | lag_read_prob_header (lag_rac *rac, GetBitContext *gb) |
static void | add_lag_median_prediction (uint8_t *dst, uint8_t *src1, uint8_t *diff, int w, int *left, int *left_top) |
static void | lag_pred_line (LagarithContext *l, uint8_t *buf, int width, int stride, int line) |
static void | lag_pred_line_yuy2 (LagarithContext *l, uint8_t *buf, int width, int stride, int line, int is_luma) |
static int | lag_decode_line (LagarithContext *l, lag_rac *rac, uint8_t *dst, int width, int stride, int esc_count) |
static int | lag_decode_zero_run_line (LagarithContext *l, uint8_t *dst, const uint8_t *src, const uint8_t *src_end, int width, int esc_count) |
static int | lag_decode_arith_plane (LagarithContext *l, uint8_t *dst, int width, int height, int stride, const uint8_t *src, int src_size) |
static int | lag_decode_frame (AVCodecContext *avctx, AVFrame *p, int *got_frame, AVPacket *avpkt) |
Decode a frame. More... | |
static av_cold int | lag_decode_init (AVCodecContext *avctx) |
Variables | |
static VLCElem | lag_tab [1<< VLC_BITS] |
static const uint8_t | lag_bits [] |
static const uint8_t | lag_codes [] |
static const uint8_t | lag_symbols [] |
const FFCodec | ff_lagarith_decoder |
Lagarith lossless decoder
Definition in file lagarith.c.
#define VLC_BITS 7 |
Definition at line 40 of file lagarith.c.
enum LagarithFrameType |
Definition at line 42 of file lagarith.c.
|
static |
Definition at line 86 of file lagarith.c.
Referenced by lag_decode_init().
|
static |
Compute the 52-bit mantissa of 1/(double)denom.
This crazy format uses floats in an entropy coder and we have to match x86 rounding exactly, thus ordinary floats aren't portable enough.
denom | denominator |
Definition at line 100 of file lagarith.c.
Referenced by lag_read_prob_header().
|
static |
(uint32_t)(x*f), where f has the given mantissa, and exponent 0 Used in combination with softfloat_reciprocal computes x/(double)denom.
x | 32-bit integer factor |
mantissa | mantissa of f with exponent 0 |
Definition at line 119 of file lagarith.c.
Referenced by lag_read_prob_header().
|
static |
Definition at line 130 of file lagarith.c.
Referenced by lag_decode_line(), and lag_decode_zero_run_line().
|
static |
Definition at line 135 of file lagarith.c.
Referenced by lag_read_prob_header().
|
static |
Definition at line 156 of file lagarith.c.
Referenced by lag_decode_arith_plane().
|
static |
Definition at line 262 of file lagarith.c.
Referenced by lag_pred_line().
|
static |
Definition at line 286 of file lagarith.c.
Referenced by lag_decode_arith_plane().
|
static |
Definition at line 312 of file lagarith.c.
Referenced by lag_decode_arith_plane().
|
static |
Definition at line 349 of file lagarith.c.
Referenced by lag_decode_arith_plane().
|
static |
Definition at line 391 of file lagarith.c.
Referenced by lag_decode_arith_plane().
|
static |
Definition at line 452 of file lagarith.c.
Referenced by lag_decode_frame().
|
static |
Decode a frame.
avctx | codec context |
data | output AVFrame |
data_size | size of output data or 0 if no picture is returned |
avpkt | input packet |
Definition at line 560 of file lagarith.c.
|
static |
Definition at line 741 of file lagarith.c.
Definition at line 63 of file lagarith.c.
Referenced by lag_decode_prob(), and lag_init_static_data().
|
static |
Definition at line 65 of file lagarith.c.
Referenced by lag_init_static_data().
|
static |
Definition at line 71 of file lagarith.c.
Referenced by lag_init_static_data().
|
static |
Definition at line 79 of file lagarith.c.
Referenced by lag_init_static_data().
const FFCodec ff_lagarith_decoder |
Definition at line 753 of file lagarith.c.