~ubuntu-branches/debian/experimental/libav/experimental

« back to all changes in this revision

Viewing changes to libavcodec/lagarith.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2014-01-18 15:46:55 UTC
  • mfrom: (1.1.24)
  • Revision ID: package-import@ubuntu.com-20140118154655-iz6u00yevkat1jqi
Tags: 6:10~alpha2-1
New Upstream release 10_alpha2. This upstream git snapshot has too many
changes to list here, cf. to the upstream Changelog:
http://git.libav.org/?p=libav.git;a=blob;f=Changelog;hb=refs/tags/v10_alpha2

Show diffs side-by-side

added added

removed removed

Lines of Context:
248
248
    int L, TL;
249
249
 
250
250
    if (!line) {
 
251
        int i, align_width = (width - 1) & ~31;
251
252
        /* Left prediction only for first line */
252
253
        L = l->dsp.add_hfyu_left_prediction(buf + 1, buf + 1,
253
 
                                            width - 1, buf[0]);
 
254
                                            align_width, buf[0]);
 
255
        for (i = align_width + 1; i < width; i++)
 
256
            buf[i] += buf[i - 1];
254
257
    } else {
255
258
        /* Left pixel is actually prev_row[width] */
256
259
        L = buf[width - stride - 1];
276
279
    int L, TL;
277
280
 
278
281
    if (!line) {
 
282
        int i, align_width;
279
283
        if (is_luma) {
280
284
            buf++;
281
285
            width--;
282
286
        }
283
 
        l->dsp.add_hfyu_left_prediction(buf + 1, buf + 1, width - 1, buf[0]);
 
287
 
 
288
        align_width = (width - 1) & ~31;
 
289
        l->dsp.add_hfyu_left_prediction(buf + 1, buf + 1, align_width, buf[0]);
 
290
 
 
291
        for (i = align_width + 1; i < width; i++)
 
292
            buf[i] += buf[i - 1];
 
293
 
284
294
        return;
285
295
    }
286
296
    if (line == 1) {
293
303
            L += buf[i];
294
304
            buf[i] = L;
295
305
        }
296
 
        buf   += HEAD;
297
 
        width -= HEAD;
 
306
        for (; i < width; i++) {
 
307
            L      = mid_pred(L & 0xFF, buf[i - stride], (L + buf[i - stride] - TL) & 0xFF) + buf[i];
 
308
            TL     = buf[i - stride];
 
309
            buf[i] = L;
 
310
        }
298
311
    } else {
299
312
        TL = buf[width - (2 * stride) - 1];
300
313
        L  = buf[width - stride - 1];
 
314
        l->dsp.add_hfyu_median_prediction(buf, buf - stride, buf, width,
 
315
                                          &L, &TL);
301
316
    }
302
 
    l->dsp.add_hfyu_median_prediction(buf, buf - stride, buf, width,
303
 
                                      &L, &TL);
304
317
}
305
318
 
306
319
static int lag_decode_line(LagarithContext *l, lag_rac *rac,