Ticket #15: y4m_asp.diff
| File y4m_asp.diff, 1.3 KB (added by , 20 years ago) |
|---|
-
libvo/vo_yuv4mpeg.c
41 41 #include "fastmemcpy.h" 42 42 #include "libswscale/swscale.h" 43 43 #include "libmpcodecs/vf_scale.h" 44 #include "libavutil/rational.h" 44 45 45 46 static vo_info_t info = 46 47 { … … 82 83 uint32_t d_height, uint32_t flags, char *title, 83 84 uint32_t format) 84 85 { 86 AVRational pixelaspect = av_div_q((AVRational){d_width, d_height}, 87 (AVRational){width, height}); 85 88 if (image_width == width && image_height == height && 86 89 image_fps == vo_fps && vo_config_count) 87 90 return 0; … … 153 156 image_u = image_y + image_width * image_height; 154 157 image_v = image_u + image_width * image_height / 4; 155 158 156 // This isn't right. 157 // But it should work as long as the file isn't interlaced 158 // or otherwise unusual (the "Ip A0:0" part). 159 160 /* At least the interlacing is ok now */ 161 fprintf(yuv_out, "YUV4MPEG2 W%d H%d F%ld:%ld I%c A0:0\n", 159 fprintf(yuv_out, "YUV4MPEG2 W%d H%d F%ld:%ld I%c A%"PRId64":%"PRId64"\n", 162 160 image_width, image_height, (long)(image_fps * 1000000.0), 163 (long)1000000, config_interlace); 161 (long)1000000, config_interlace, 162 pixelaspect.num, pixelaspect.den); 164 163 165 164 fflush(yuv_out); 166 165 return 0;
