Gcc version affects program execution efficiency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Sir or Madam




I used ffmpeg for hardware acceleration of video decoding and compiled ffmpeg using gcc-9.4 on the Ubuntu 20.04 system. 
However, its performance is poor. If gcc-7.5 is used on the same Ubuntu 20.04 system, the decoding performance will be better. 


I analyzed the code of ffmpeg and found that there is a big difference in time consumption when use gcc-9.4 and gcc-7.5 in the following functions:
static int find_marker(const uint_8 **pbuf_ptr, const uint_8 *buf_end)
{
    const uint_8 *buf_ptr;
    unsigned int v, v2;
    int val;
    int skipped = 0;
     
    buf_ptr = *pbuf_ptr;
    while (buf_end - buf_ptr > 1) {
        v = *buf_ptr++;
        v2 = *buf_ptr;
        if (v == 0xff && v2 >= SOFO && v2 <= COM) {
            val = *buf_ptr++;
             goto found;
        }
        skipped++;
    }
    buf_ptr = buf_end;
    val = -1;
found:
    *pbuf_ptr = buf_ptr;
    return val;
}


I want to know why this difference arises and how to solve this problem.


I look forward to your help.


Thanks and Regards.
Aibin




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux