Revision 9d9c3e1a

View differences:

libavcodec/dnxhdenc.c
239 239
    buf[5] = ctx->interlaced ? ctx->cur_field+2 : 0x01;
240 240
    buf[6] = 0x80; // crc flag off
241 241
    buf[7] = 0xa0; // reserved
242
    AV_WB16(buf + 0x18, avctx->height); // ALPF
242
    AV_WB16(buf + 0x18, avctx->height>>ctx->interlaced); // ALPF
243 243
    AV_WB16(buf + 0x1a, avctx->width);  // SPL
244
    AV_WB16(buf + 0x1d, avctx->height); // NAL
244
    AV_WB16(buf + 0x1d, avctx->height>>ctx->interlaced); // NAL
245 245

  
246 246
    buf[0x21] = 0x38; // FIXME 8 bit per comp
247
    buf[0x22] = 0x88 + (ctx->frame.interlaced_frame<<2);
247
    buf[0x22] = 0x88 + (ctx->interlaced<<2);
248 248
    AV_WB32(buf + 0x28, ctx->cid); // CID
249 249
    buf[0x2c] = ctx->interlaced ? 0 : 0x80;
250 250

  
tests/ref/vsynth1/dnxhd_1080i
1
cd1489f18d2186a49ab23c61ed33bce7 *./tests/data/vsynth1/dnxhd-1080i.mov
1
8a814d4056ca2810a8ed0bad3b70f358 *./tests/data/vsynth1/dnxhd-1080i.mov
2 2
3031875 ./tests/data/vsynth1/dnxhd-1080i.mov
3 3
0c651e840f860592f0d5b66030d9fa32 *./tests/data/dnxhd_1080i.vsynth1.out.yuv
4 4
stddev:    6.29 PSNR: 32.15 MAXDIFF:   64 bytes:   760320/  7603200
tests/ref/vsynth2/dnxhd_1080i
1
1a4594983ae91f41907b89fe3174c527 *./tests/data/vsynth2/dnxhd-1080i.mov
1
c81c7cfb375f61b7ab9b60fa340fe52a *./tests/data/vsynth2/dnxhd-1080i.mov
2 2
3031875 ./tests/data/vsynth2/dnxhd-1080i.mov
3 3
3c559af629ae0a8fb1a9a0e4b4da7733 *./tests/data/dnxhd_1080i.vsynth2.out.yuv
4 4
stddev:    1.31 PSNR: 45.77 MAXDIFF:   23 bytes:   760320/  7603200

Also available in: Unified diff