faandct_deps="faan fdctdsp"
faanidct_deps="faan idctdsp"
h264dsp_select="startcode"
+frame_thread_encoder_deps="encoders threads"
+ intrax8_select="idctdsp"
mdct_select="fft"
-rdft_select="fft"
me_cmp_select="fdctdsp idctdsp pixblockdsp"
mpeg_er_select="error_resilience"
mpegaudio_select="mpegaudiodsp"
{
MpegEncContext *const s = w->s;
int t;
- #define B(x,y) s->block[0][w->idct_permutation[(x)+(y)*8]]
-#define B(x, y) s->block[0][w->idsp.idct_permutation[(x) + (y) * 8]]
++#define B(x,y) s->block[0][w->idct_permutation[(x) + (y) * 8]]
#define T(x) ((x) * dc_level + 0x8000) >> 16;
switch (direction) {
case 0:
if (ret < 0)
return ret;
+ w->idsp = *idsp;
w->s = s;
- // two rows, 2 blocks per cannon mb
+ //two rows, 2 blocks per cannon mb
w->prediction_table = av_mallocz(s->mb_width * 2 * 2);
if (!w->prediction_table)
return AVERROR(ENOMEM);
#include "get_bits.h"
#include "mpegvideo.h"
+ #include "idctdsp.h"
#include "intrax8dsp.h"
+#include "wmv2dsp.h"
typedef struct IntraX8Context {
VLC *j_ac_vlc[4]; // they point to the static j_mb_vlc
// set by ff_intrax8_common_init
uint8_t *prediction_table; // 2 * (mb_w * 2)
ScanTable scantable[3];
+ WMV2DSPContext wdsp;
+ uint8_t idct_permutation[64];
- // set by the caller codec
- MpegEncContext *s;
+ //set by the caller codec
+ MpegEncContext * s;
IntraX8DSPContext dsp;
+ IDCTDSPContext idsp;
int quant;
int dquant;
int qsum;
v->mv_f_next[1] = v->mv_f_next[0] + (s->b8_stride * (mb_height * 2 + 1) + s->mb_stride * (mb_height + 1) * 2);
if (s->avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || s->avctx->codec_id == AV_CODEC_ID_VC1IMAGE) {
- for (i = 0; i < 4; i++) {
- v->sr_rows[i >> 1][i & 1] = av_malloc(v->output_width);
- if (!v->sr_rows[i >> 1][i & 1])
- goto error;
- }
+ for (i = 0; i < 4; i++)
+ if (!(v->sr_rows[i >> 1][i & 1] = av_malloc(v->output_width)))
+ return AVERROR(ENOMEM);
}
- ret = ff_intrax8_common_init(&v->x8, s);
+ ret = ff_intrax8_common_init(&v->x8, &s->idsp, s);
if (ret < 0)
goto error;