FFmpeg
Loading...
Searching...
No Matches
mpegvideoenc_template.c File Reference
#include <stdint.h>
#include "libavutil/internal.h"
#include "libavutil/mem_internal.h"
#include "libavutil/x86/asm.h"
#include "libavcodec/mathops.h"
#include "libavcodec/mpegutils.h"
#include "libavcodec/mpegvideoenc.h"
#include "fdct.h"
#include "mpegvideoencdsp.h"

Go to the source code of this file.

Macros

#define SPREADW(a)
 
#define PMAX(a, b)
 
#define SAVE_SIGN(a, b)
 
#define RESTORE_SIGN(a, b)
 

Functions

static int dct_quantize_TMPL (MPVEncContext *const s, int16_t *block, int n, int qscale, int *overflow)
 

Macro Definition Documentation

◆ SPREADW

#define SPREADW ( a)
Value:
"pshuflw $0, "a", "a" \n\t"\
"punpcklwd "a", "a" \n\t"
int a

Definition at line 39 of file mpegvideoenc_template.c.

Referenced by dct_quantize_TMPL().

◆ PMAX

#define PMAX ( a,
b )
Value:
"movhlps "a", "b" \n\t"\
"pmaxsw "b", "a" \n\t"\
"pshuflw $0x0E, "a", "b" \n\t"\
"pmaxsw "b", "a" \n\t"\
"pshuflw $0x01, "a", "b" \n\t"\
"pmaxsw "b", "a" \n\t"
#define b
Definition input.c:43

Definition at line 42 of file mpegvideoenc_template.c.

Referenced by dct_quantize_TMPL().

◆ SAVE_SIGN

#define SAVE_SIGN ( a,
b )
Value:
"pxor "a", "a" \n\t"\
"pcmpgtw "b", "a" \n\t" /* block[i] <= 0 ? 0xFF : 0x00 */\
"pxor "a", "b" \n\t"\
"psubw "a", "b" \n\t" /* ABS(block[i]) */

Definition at line 57 of file mpegvideoenc_template.c.

Referenced by dct_quantize_TMPL().

◆ RESTORE_SIGN

#define RESTORE_SIGN ( a,
b )
Value:
"pxor "a", "b" \n\t"\
"psubw "a", "b" \n\t"

Definition at line 62 of file mpegvideoenc_template.c.

Referenced by dct_quantize_TMPL().

Function Documentation

◆ dct_quantize_TMPL()

static int dct_quantize_TMPL ( MPVEncContext *const s,
int16_t * block,
int n,
int qscale,
int * overflow )
static

Definition at line 67 of file mpegvideoenc_template.c.