Revision 2417652e

View differences:

libavcodec/avcodec.h
5 5

  
6 6
#define LIBAVCODEC_VERSION_INT 0x000406
7 7
#define LIBAVCODEC_VERSION     "0.4.6"
8
#define LIBAVCODEC_BUILD       4603
9
#define LIBAVCODEC_BUILD_STR   "4603"
8
#define LIBAVCODEC_BUILD       4604
9
#define LIBAVCODEC_BUILD_STR   "4604"
10 10

  
11 11
enum CodecID {
12 12
    CODEC_ID_NONE, 
......
141 141
    int key_frame;    /* true if the previous compressed frame was 
142 142
                         a key frame (intra, or seekable) */
143 143
    int delay;        /* number of frames the decoded output will be delayed relative to the encoded input */
144
    uint8_t *mbskip_table; /* =1 if MB didnt change, is only valid for I/P frames 
145
                              stride= mb_width = (width+15)>>4 */
144 146
    
145 147
    /* encoding parameters */
146 148
    int quality;      /* quality of the previous encoded frame 
......
157 159
    int rc_strategy;
158 160
    int b_frame_strategy;
159 161

  
162
    int hurry_up;     /* when set to 1 during decoding, b frames will be skiped
163
                         when set to 2 idct/dequant will be skipped too */
164
    
160 165
    struct AVCodec *codec;
161 166
    void *priv_data;
162 167

  
libavcodec/h263dec.c
74 74
        return -1;
75 75
    }
76 76
    s->codec_id= avctx->codec->id;
77
    avctx->mbskip_table= s->mbskip_table;
77 78
    
78 79
    /* for h263, we allocate the images after having read the header */
79 80
    if (avctx->codec->id != CODEC_ID_H263 && avctx->codec->id != CODEC_ID_MPEG4)
......
108 109
    printf("*****frame %d size=%d\n", avctx->frame_number, buf_size);
109 110
    printf("bytes=%x %x %x %x\n", buf[0], buf[1], buf[2], buf[3]);
110 111
#endif
112

  
113
    s->hurry_up= avctx->hurry_up;
111 114
    
112 115
    /* no supplementary picture */
113 116
    if (buf_size == 0) {
......
154 157
        return -1;
155 158
    /* skip b frames if we dont have reference frames */
156 159
    if(s->num_available_buffers<2 && s->pict_type==B_TYPE) return 0;
160
    /* skip b frames if we are in a hurry */
161
    if(s->hurry_up && s->pict_type==B_TYPE) return 0;
157 162
        
158 163
    MPV_frame_start(s);
159 164

  
libavcodec/mpeg12.c
1187 1187
    s->mpeg_enc_ctx.picture_number = 0;
1188 1188
    s->repeat_field = 0;
1189 1189
    s->mpeg_enc_ctx.codec_id= avctx->codec->id;
1190
    avctx->mbskip_table= s->mpeg_enc_ctx.mbskip_table;
1190 1191
    return 0;
1191 1192
}
1192 1193

  
libavcodec/mpegvideo.c
1145 1145
static inline void add_dct(MpegEncContext *s, 
1146 1146
                           DCTELEM *block, int i, UINT8 *dest, int line_size)
1147 1147
{
1148
    /* skip dequant / idct if we are really late ;) */
1149
    if(s->hurry_up>1) return;
1150

  
1148 1151
    if (s->block_last_index[i] >= 0) {
1149 1152
        if (!s->mpeg2)
1150 1153
            if(s->encoding || (!s->h263_msmpeg4))
libavcodec/mpegvideo.h
196 196
    int no_rounding; /* apply no rounding to motion compensation (MPEG4, msmpeg4, ...) 
197 197
                        for b-frames rounding mode is allways 0 */
198 198

  
199
    int hurry_up;     /* when set to 1 during decoding, b frames will be skiped
200
                         when set to 2 idct/dequant will be skipped too */
201

  
199 202
    /* macroblock layer */
200 203
    int mb_x, mb_y;
201 204
    int mb_incr;

Also available in: Unified diff