From: Joseph A. <jo...@mi...> - 2012-11-19 11:59:54
|
Hi, I've got 3 patches this time. 1. uninitialized_read.patch Fixes reading uninitialized memory or even (if you are unlucky) invalid memory. 2. sdtp_for_xdcam.patch Fixes a few things that were wrong with my XDCAM encoding code and introducing support for sdtp atom. These changes make it possible to load XDCAM files generated by libquicktime into Avid Media Composer. One interesting thing is Avid 6.5 fails to load XDCAM files with timing of 1/25, while 24/600 (which is the same) works fine. Avid 5.5 doesn't have this problem. As part of those changes I took libery to unconditionally enable (it was #ifdef DO_INTERLACING before) setting AVFrame->interlaced_frame and AVFrame->top_field_first according to libquicktime's interlacing setting. I didn't enable setting interlaced DCT though, as I prefer individual codecs to set this up. That's not a big deal anyway. Now, you might think top_field_first is also not a big deal, but that's only if you use Windows QuickTime or libquicktime API to decode frames, as neither of them support decoding individual fields. Now, I know for sure that Avid Media Composer uses Windows QuickTime API to read compressed frames but uses it's own decoder to decode them. Therefore, field order is important. 3. Fixes a problem with presentation time stamps that get fed into ffmpeg. Initially I thought that was a bug in FFMpeg and even sent them a patch. In the discussion that followed it became clear it's libquicktime's bug, not FFMpeg's one. Here is the discussion on the ffmpeg mailing list: http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/154243 I am not 100% sure this patch won't cause side-effects, such as inability to encode variable-length frames, therefore I made it a separate patch, rather than including it in the XDCAM patch. -- Joseph Artsimovich Senior C++ Applications Developer MirriAd Ltd |