comparison dv.c @ 460:6624afe8bf65 libavformat

* IEC DV seems to accept SMPTE way of tagging 16:9 too.
author romansh
date Tue, 18 May 2004 02:33:27 +0000
parents e440fb884442
children b69898ffc92a
comparison
equal deleted inserted replaced
459:ce1a3e82328b 460:6624afe8bf65
580 avctx->frame_rate_base = sys->frame_rate_base; 580 avctx->frame_rate_base = sys->frame_rate_base;
581 avctx->width = sys->width; 581 avctx->width = sys->width;
582 avctx->height = sys->height; 582 avctx->height = sys->height;
583 avctx->pix_fmt = sys->pix_fmt; 583 avctx->pix_fmt = sys->pix_fmt;
584 584
585 /* finding out SAR is a little bit messy */
585 vsc_pack = dv_extract_pack(frame, dv_video_control); 586 vsc_pack = dv_extract_pack(frame, dv_video_control);
586 apt = frame[4] & 0x07; 587 apt = frame[4] & 0x07;
587 is16_9 = (vsc_pack && (vsc_pack[2] & 0x07) == (apt?0x02:0x07)); 588 is16_9 = (vsc_pack && ((vsc_pack[2] & 0x07) == 0x02 ||
589 (!apt && (vsc_pack[2] & 0x07) == 0x07)));
588 avctx->sample_aspect_ratio = sys->sar[is16_9]; 590 avctx->sample_aspect_ratio = sys->sar[is16_9];
589 591
590 size = sys->frame_size; 592 size = sys->frame_size;
591 } 593 }
592 return size; 594 return size;