[FFmpeg-devel] aspect fuction
rachel li
qiuli_li
Tue Nov 20 08:45:08 CET 2007
1. What does code below mean?
video_enc->sample_aspect_ratio = av_d2q(frame_aspect_ratio*video_enc->height/video_enc->width, 255);
If the source is 720x480 aspect_ratio 1.333, then the result is 8/9. what does it mean?
2. I found this function does not take effect while outputting jpeg. The command line I use as follows:
-i test.avi ?f image2 ?vcodec mjpeg ?aspect 1.3333 -y test%d.jpg
Because I found code as follows at mjpegenc.c
jpeg_put_comments
if (s->aspect_ratio_info /* && !lossless */)
{
/* JFIF header */
put_marker(p, APP0);
put_bits(p, 16, 16);
ff_put_string(p, "JFIF", 1); /* this puts the trailing zero-byte too */
put_bits(p, 16, 0x0201); /* v 1.02 */
put_bits(p, 8, 0); /* units type: 0 - aspect ratio */
put_bits(p, 16, s->avctx->sample_aspect_ratio.num);
put_bits(p, 16, s->avctx->sample_aspect_ratio.den);
put_bits(p, 8, 0); /* thumbnail width */
put_bits(p, 8, 0); /* thumbnail height */
}
I found the condition is not satisfied, what does it mean?
More information about the ffmpeg-devel
mailing list