OSDN Git Service

Merge commit '9fa888c02801fff2e8817c24068f5296bbe60000'
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>
Sat, 7 May 2016 20:38:30 +0000 (21:38 +0100)
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>
Sat, 7 May 2016 20:39:44 +0000 (21:39 +0100)
* commit '9fa888c02801fff2e8817c24068f5296bbe60000':
  intrax8: Keep a reference to the decoder blocks

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
1  2 
libavcodec/intrax8.c
libavcodec/intrax8.h
libavcodec/vc1dec.c
libavcodec/wmv2dec.c

@@@ -476,9 -480,8 +476,8 @@@ static void x8_get_prediction(IntraX8Co
  static void x8_ac_compensation(IntraX8Context *const w, const int direction,
                                 const int dc_level)
  {
-     MpegEncContext *const s = w->s;
      int t;
- #define B(x,y)  s->block[0][w->idct_permutation[(x) + (y) * 8]]
 -#define B(x, y) w->block[0][w->idsp.idct_permutation[(x) + (y) * 8]]
++#define B(x,y)  w->block[0][w->idct_permutation[(x) + (y) * 8]]
  #define T(x)  ((x) * dc_level + 0x8000) >> 16;
      switch (direction) {
      case 0:
@@@ -578,8 -579,8 +575,8 @@@ static int x8_decode_intra_mb(IntraX8Co
      int use_quant_matrix;
      int sign;
  
 -    assert(w->orient < 12);
 +    av_assert2(w->orient < 12);
-     w->bdsp.clear_block(s->block[0]);
+     w->bdsp.clear_block(w->block[0]);
  
      if (chroma)
          dc_mode = 2;
                                                 w->frame->linesize[!!chroma]);
      }
      if (!zeros_only)
 -        w->idsp.idct_add(w->dest[chroma],
 +        w->wdsp.idct_add(w->dest[chroma],
                           w->frame->linesize[!!chroma],
-                          s->block[0]);
+                          w->block[0]);
  
  block_placed:
      if (!chroma)
@@@ -37,12 -36,12 +37,14 @@@ typedef struct IntraX8Context 
      // set by ff_intrax8_common_init
      uint8_t *prediction_table; // 2 * (mb_w * 2)
      ScanTable scantable[3];
 +    WMV2DSPContext wdsp;
 +    uint8_t idct_permutation[64];
      AVCodecContext *avctx;
+     int *block_last_index;  ///< last nonzero coefficient in block
+     int16_t (*block)[64];
  
 -    // set by the caller codec
 -    MpegEncContext *s;
 +    //set by the caller codec
 +    MpegEncContext * s;
      IntraX8DSPContext dsp;
      IDCTDSPContext idsp;
      BlockDSPContext bdsp;
Simple merge
Simple merge