Revision fe5c7e58

View differences:

libavcodec/huffyuv.c
265 265
typedef struct {
266 266
    uint64_t val;
267 267
    int name;
268
} heap_elem_t;
268
} HeapElem;
269 269

  
270
static void heap_sift(heap_elem_t *h, int root, int size)
270
static void heap_sift(HeapElem *h, int root, int size)
271 271
{
272 272
    while(root*2+1 < size) {
273 273
        int child = root*2+1;
274 274
        if(child < size-1 && h[child].val > h[child+1].val)
275 275
            child++;
276 276
        if(h[root].val > h[child].val) {
277
            FFSWAP(heap_elem_t, h[root], h[child]);
277
            FFSWAP(HeapElem, h[root], h[child]);
278 278
            root = child;
279 279
        } else
280 280
            break;
......
282 282
}
283 283

  
284 284
static void generate_len_table(uint8_t *dst, uint64_t *stats, int size){
285
    heap_elem_t h[size];
285
    HeapElem h[size];
286 286
    int up[2*size];
287 287
    int len[2*size];
288 288
    int offset, i, next;
libavcodec/snow.c
498 498
    IDWTELEM *b2;
499 499
    IDWTELEM *b3;
500 500
    int y;
501
} dwt_compose_t;
501
} DWTCompose;
502 502

  
503 503
#define slice_buffer_get_line(slice_buf, line_num) ((slice_buf)->line[line_num] ? (slice_buf)->line[line_num] : slice_buffer_load_line((slice_buf), (line_num)))
504 504
//#define slice_buffer_get_line(slice_buf, line_num) (slice_buffer_load_line((slice_buf), (line_num)))
......
1080 1080
    }
1081 1081
}
1082 1082

  
1083
static void spatial_compose53i_buffered_init(dwt_compose_t *cs, slice_buffer * sb, int height, int stride_line){
1083
static void spatial_compose53i_buffered_init(DWTCompose *cs, slice_buffer * sb, int height, int stride_line){
1084 1084
    cs->b0 = slice_buffer_get_line(sb, mirror(-1-1, height-1) * stride_line);
1085 1085
    cs->b1 = slice_buffer_get_line(sb, mirror(-1  , height-1) * stride_line);
1086 1086
    cs->y = -1;
1087 1087
}
1088 1088

  
1089
static void spatial_compose53i_init(dwt_compose_t *cs, IDWTELEM *buffer, int height, int stride){
1089
static void spatial_compose53i_init(DWTCompose *cs, IDWTELEM *buffer, int height, int stride){
1090 1090
    cs->b0 = buffer + mirror(-1-1, height-1)*stride;
1091 1091
    cs->b1 = buffer + mirror(-1  , height-1)*stride;
1092 1092
    cs->y = -1;
1093 1093
}
1094 1094

  
1095
static void spatial_compose53i_dy_buffered(dwt_compose_t *cs, slice_buffer * sb, int width, int height, int stride_line){
1095
static void spatial_compose53i_dy_buffered(DWTCompose *cs, slice_buffer * sb, int width, int height, int stride_line){
1096 1096
    int y= cs->y;
1097 1097

  
1098 1098
    IDWTELEM *b0= cs->b0;
......
1111 1111
    cs->y += 2;
1112 1112
}
1113 1113

  
1114
static void spatial_compose53i_dy(dwt_compose_t *cs, IDWTELEM *buffer, int width, int height, int stride){
1114
static void spatial_compose53i_dy(DWTCompose *cs, IDWTELEM *buffer, int width, int height, int stride){
1115 1115
    int y= cs->y;
1116 1116
    IDWTELEM *b0= cs->b0;
1117 1117
    IDWTELEM *b1= cs->b1;
......
1130 1130
}
1131 1131

  
1132 1132
static void av_unused spatial_compose53i(IDWTELEM *buffer, int width, int height, int stride){
1133
    dwt_compose_t cs;
1133
    DWTCompose cs;
1134 1134
    spatial_compose53i_init(&cs, buffer, height, stride);
1135 1135
    while(cs.y <= height)
1136 1136
        spatial_compose53i_dy(&cs, buffer, width, height, stride);
......
1198 1198
    }
1199 1199
}
1200 1200

  
1201
static void spatial_compose97i_buffered_init(dwt_compose_t *cs, slice_buffer * sb, int height, int stride_line){
1201
static void spatial_compose97i_buffered_init(DWTCompose *cs, slice_buffer * sb, int height, int stride_line){
1202 1202
    cs->b0 = slice_buffer_get_line(sb, mirror(-3-1, height-1) * stride_line);
1203 1203
    cs->b1 = slice_buffer_get_line(sb, mirror(-3  , height-1) * stride_line);
1204 1204
    cs->b2 = slice_buffer_get_line(sb, mirror(-3+1, height-1) * stride_line);
......
1206 1206
    cs->y = -3;
1207 1207
}
1208 1208

  
1209
static void spatial_compose97i_init(dwt_compose_t *cs, IDWTELEM *buffer, int height, int stride){
1209
static void spatial_compose97i_init(DWTCompose *cs, IDWTELEM *buffer, int height, int stride){
1210 1210
    cs->b0 = buffer + mirror(-3-1, height-1)*stride;
1211 1211
    cs->b1 = buffer + mirror(-3  , height-1)*stride;
1212 1212
    cs->b2 = buffer + mirror(-3+1, height-1)*stride;
......
1214 1214
    cs->y = -3;
1215 1215
}
1216 1216

  
1217
static void spatial_compose97i_dy_buffered(DSPContext *dsp, dwt_compose_t *cs, slice_buffer * sb, int width, int height, int stride_line){
1217
static void spatial_compose97i_dy_buffered(DSPContext *dsp, DWTCompose *cs, slice_buffer * sb, int width, int height, int stride_line){
1218 1218
    int y = cs->y;
1219 1219

  
1220 1220
    IDWTELEM *b0= cs->b0;
......
1243 1243
    cs->y += 2;
1244 1244
}
1245 1245

  
1246
static void spatial_compose97i_dy(dwt_compose_t *cs, IDWTELEM *buffer, int width, int height, int stride){
1246
static void spatial_compose97i_dy(DWTCompose *cs, IDWTELEM *buffer, int width, int height, int stride){
1247 1247
    int y = cs->y;
1248 1248
    IDWTELEM *b0= cs->b0;
1249 1249
    IDWTELEM *b1= cs->b1;
......
1268 1268
}
1269 1269

  
1270 1270
static void av_unused spatial_compose97i(IDWTELEM *buffer, int width, int height, int stride){
1271
    dwt_compose_t cs;
1271
    DWTCompose cs;
1272 1272
    spatial_compose97i_init(&cs, buffer, height, stride);
1273 1273
    while(cs.y <= height)
1274 1274
        spatial_compose97i_dy(&cs, buffer, width, height, stride);
1275 1275
}
1276 1276

  
1277
static void ff_spatial_idwt_buffered_init(dwt_compose_t *cs, slice_buffer * sb, int width, int height, int stride_line, int type, int decomposition_count){
1277
static void ff_spatial_idwt_buffered_init(DWTCompose *cs, slice_buffer * sb, int width, int height, int stride_line, int type, int decomposition_count){
1278 1278
    int level;
1279 1279
    for(level=decomposition_count-1; level>=0; level--){
1280 1280
        switch(type){
......
1284 1284
    }
1285 1285
}
1286 1286

  
1287
static void ff_spatial_idwt_init(dwt_compose_t *cs, IDWTELEM *buffer, int width, int height, int stride, int type, int decomposition_count){
1287
static void ff_spatial_idwt_init(DWTCompose *cs, IDWTELEM *buffer, int width, int height, int stride, int type, int decomposition_count){
1288 1288
    int level;
1289 1289
    for(level=decomposition_count-1; level>=0; level--){
1290 1290
        switch(type){
......
1294 1294
    }
1295 1295
}
1296 1296

  
1297
static void ff_spatial_idwt_slice(dwt_compose_t *cs, IDWTELEM *buffer, int width, int height, int stride, int type, int decomposition_count, int y){
1297
static void ff_spatial_idwt_slice(DWTCompose *cs, IDWTELEM *buffer, int width, int height, int stride, int type, int decomposition_count, int y){
1298 1298
    const int support = type==1 ? 3 : 5;
1299 1299
    int level;
1300 1300
    if(type==2) return;
......
1311 1311
    }
1312 1312
}
1313 1313

  
1314
static void ff_spatial_idwt_buffered_slice(DSPContext *dsp, dwt_compose_t *cs, slice_buffer * slice_buf, int width, int height, int stride_line, int type, int decomposition_count, int y){
1314
static void ff_spatial_idwt_buffered_slice(DSPContext *dsp, DWTCompose *cs, slice_buffer * slice_buf, int width, int height, int stride_line, int type, int decomposition_count, int y){
1315 1315
    const int support = type==1 ? 3 : 5;
1316 1316
    int level;
1317 1317
    if(type==2) return;
......
1329 1329
}
1330 1330

  
1331 1331
static void ff_spatial_idwt(IDWTELEM *buffer, int width, int height, int stride, int type, int decomposition_count){
1332
        dwt_compose_t cs[MAX_DECOMPOSITIONS];
1332
        DWTCompose cs[MAX_DECOMPOSITIONS];
1333 1333
        int y;
1334 1334
        ff_spatial_idwt_init(cs, buffer, width, height, stride, type, decomposition_count);
1335 1335
        for(y=0; y<height; y+=4)
......
4550 4550
        const int block_size = MB_SIZE >> s->block_max_depth;
4551 4551
        const int block_w    = plane_index ? block_size/2 : block_size;
4552 4552
        int mb_y;
4553
        dwt_compose_t cs[MAX_DECOMPOSITIONS];
4553
        DWTCompose cs[MAX_DECOMPOSITIONS];
4554 4554
        int yd=0, yq=0;
4555 4555
        int y;
4556 4556
        int end_y;

Also available in: Unified diff