Part2: Overcome the ‘Access Violation Exception’ in the FFMPEG
We have understood a simple solution in the “Part1: Overcome the ‘Access Violation Exception’ in the FFMPEG ”. Unfortunately, it pays performance for correction. I always ask me the same question “Can we find the better solution to balance between performance and correction?” As every plant has its root, this issue should have its bugfix in the level of source codes. As a result, I will focus on this point in this article.
Before modifying source codes, I must list major related files for the variables of ff_cos_*.
1. fft.c 2. x86/fft_mmx.asm |
By analyzing these files, it is lucky that fft.c is eliminated for this case. As people often says “Double happiness at the door”. Fft_mmx.asm is organized by YASM syntax which is contained in my knowledge fieldJ .
Yeah, all that is needed is an east wind. Let’s do it! The main idea is to use un-aligning instructions to replace the aligning instruction in this file. Limitations for the discussing purpose, I only list the source codes after being revised. Reader can copy it into your proper folder and re-build FFMPEG. Now, how about your speed now:- )?
[Summarization]
1. It is a better method in this article if compared with Part1, but it is not final one.
2. The final one should be solved in the aspect of compiler, and all source codes keep original at the same time.
3. The final one will be represented in the next articles after my hard work.