FFmpeg
Loading...
Searching...
No Matches
mpegvideo_unquantize.c File Reference
#include <assert.h>
#include <stddef.h>
#include "config.h"
#include "checkasm.h"
#include "libavcodec/idctdsp.h"
#include "libavcodec/mathops.h"
#include "libavcodec/mpegvideo.h"
#include "libavcodec/mpegvideodata.h"
#include "libavcodec/mpegvideo_unquantize.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem_internal.h"

Go to the source code of this file.

Macros

#define randomize_struct(TYPE, s)
 
#define TEST(NAME, INTRA, INTRA_SCANTABLE, TYPE)
 

Enumerations

enum  TestType { H263 , MPEG1 , MPEG2 }
 

Functions

static void init_idct_scantable (MPVContext *const s, const uint8_t *scantable, enum idct_permutation_type idct_permutation, int intra_scantable)
 
static void init_h263_test (MPVContext *const s, int16_t block[64], int last_nonzero_coeff, int qscale, int h263_aic, int ac_pred, int intra)
 
static void init_mpeg12_test (MPVContext *const s, int16_t block[64], int last_nonzero_coeff, int qscale, int intra, enum TestType type)
 
void checkasm_check_mpegvideo_unquantize (void)
 

Variables

static enum idct_permutation_type permutation_types []
 
static const uint8_t ff_wmv1_scantable [][64]
 
static const uint8_t *const scantables []
 

Macro Definition Documentation

◆ randomize_struct

#define randomize_struct ( TYPE,
s )
Value:
do { \
static_assert(!(_Alignof(TYPE) % 4), \
"can't use aligned stores"); \
unsigned char *ptr = (unsigned char*)s; \
for (size_t i = 0; i < (sizeof(*s) & ~3); i += 4) \
AV_WN32A(ptr + i, rnd()); \
for (size_t i = sizeof(*s) & ~3; i < sizeof(*s); ++i) \
ptr[i] = rnd(); \
} while (0)
#define i(width, name, range_min, range_max)
Definition cbs_h264.c:63
#define s(width, name)
Definition cbs_vp9.c:198
#define rnd
Definition checkasm.h:136
#define TYPE
Definition ffv1dec.c:90
#define AV_WN32A(p, v)

Definition at line 35 of file mpegvideo_unquantize.c.

Referenced by checkasm_check_mpegvideo_unquantize().

◆ TEST

#define TEST ( NAME,
INTRA,
INTRA_SCANTABLE,
TYPE )
Value:
{ .name = #NAME, .offset = offsetof(MPVUnquantDSPContext, NAME), \
.intra = INTRA, .intra_scantable = INTRA_SCANTABLE, .type = TYPE }

Referenced by checkasm_check_mpegvideo_unquantize().

Enumeration Type Documentation

◆ TestType

enum TestType
Enumerator
H263 
MPEG1 
MPEG2 

Definition at line 45 of file mpegvideo_unquantize.c.

Function Documentation

◆ init_idct_scantable()

static void init_idct_scantable ( MPVContext *const s,
const uint8_t * scantable,
enum idct_permutation_type idct_permutation,
int intra_scantable )
static

Definition at line 113 of file mpegvideo_unquantize.c.

Referenced by checkasm_check_mpegvideo_unquantize().

◆ init_h263_test()

static void init_h263_test ( MPVContext *const s,
int16_t block[64],
int last_nonzero_coeff,
int qscale,
int h263_aic,
int ac_pred,
int intra )
static

Definition at line 122 of file mpegvideo_unquantize.c.

Referenced by checkasm_check_mpegvideo_unquantize().

◆ init_mpeg12_test()

static void init_mpeg12_test ( MPVContext *const s,
int16_t block[64],
int last_nonzero_coeff,
int qscale,
int intra,
enum TestType type )
static

Definition at line 146 of file mpegvideo_unquantize.c.

Referenced by checkasm_check_mpegvideo_unquantize().

◆ checkasm_check_mpegvideo_unquantize()

void checkasm_check_mpegvideo_unquantize ( void )

Definition at line 187 of file mpegvideo_unquantize.c.

Variable Documentation

◆ permutation_types

enum idct_permutation_type permutation_types[]
static
Initial value:
= {
}
@ FF_IDCT_PERM_LIBMPEG2
Definition idctdsp.h:29
@ FF_IDCT_PERM_NONE
Definition idctdsp.h:28

Definition at line 51 of file mpegvideo_unquantize.c.

Referenced by checkasm_check_mpegvideo_unquantize().

◆ ff_wmv1_scantable

const uint8_t ff_wmv1_scantable[][64]
static

Definition at line 68 of file mpegvideo_unquantize.c.

◆ scantables

const uint8_t* const scantables[]
static
Initial value:
= {
}
const uint8_t ff_zigzag_direct[64]
Definition mathtables.c:137
const uint8_t ff_alternate_horizontal_scan[64]
const uint8_t ff_alternate_vertical_scan[64]
const uint8_t ff_wmv1_scantable[WMV1_SCANTABLE_COUNT][64]

Definition at line 103 of file mpegvideo_unquantize.c.

Referenced by checkasm_check_mpegvideo_unquantize().