Revision cfb7e6e6 ffplay.c

View differences:

ffplay.c
1591 1591

  
1592 1592
    ref->w = codec->width;
1593 1593
    ref->h = codec->height;
1594
    for(i = 0; i < 3; i ++) {
1595
        unsigned hshift = i == 0 ? 0 : av_pix_fmt_descriptors[ref->pic->format].log2_chroma_w;
1596
        unsigned vshift = i == 0 ? 0 : av_pix_fmt_descriptors[ref->pic->format].log2_chroma_h;
1594
    for(i = 0; i < 4; i ++) {
1595
        unsigned hshift = (i == 1 || i == 2) ? av_pix_fmt_descriptors[ref->pic->format].log2_chroma_w : 0;
1596
        unsigned vshift = (i == 1 || i == 2) ? av_pix_fmt_descriptors[ref->pic->format].log2_chroma_h : 0;
1597 1597

  
1598 1598
        if (ref->data[i]) {
1599 1599
            ref->data[i]    += (edge >> hshift) + ((edge * ref->linesize[i]) >> vshift);

Also available in: Unified diff