[FFmpeg-devel] [ffmpeg-devel][PATCH] OpenHEVC new MC with ASM

Michael Niedermayer michaelni at gmx.at
Tue May 6 18:34:14 CEST 2014


On Tue, May 06, 2014 at 01:04:35PM -0300, James Almer wrote:
> On 29/04/14 12:09 PM, Pierre Edouard Lepere wrote:
> > Hello,
> > here is a patch submission changing the way MC is done : 4 and 8 tap filters now do the weighting too.
> > x86 ASM is also added in the second file.
> > 
> > Best Regards,
> > Pierre-Edouard Lepere
> 
> > +void ff_hevcdsp_init_x86(HEVCDSPContext *c, const int bit_depth)
> > +{
> > +    int mm_flags = av_get_cpu_flags();
> > +
> > +    if (bit_depth == 8) {
> > +        if (EXTERNAL_MMX(mm_flags)) {
> > +
> > +            if (EXTERNAL_MMXEXT(mm_flags)) {
> > +
> > +                if (EXTERNAL_SSSE3(mm_flags) && ARCH_X86_64) {
> 
> The asm functions and the prototypes are all SSE4, yet you're checking for SSSE3 support 
> at runtime here.
> This will crash on CPUs like first gen Core 2, Atom and AMD Bobcat.
> 
> Also, there's no need to check for MMX and MMXEXT in a chain like this. EXTERNAL_SSSE3() 
> is enough.
> 
> > +
> > +                    EPEL_LINKS(c->put_hevc_epel, 0, 0, pel_pixels,  8);
> > +                    EPEL_LINKS(c->put_hevc_epel, 0, 1, epel_h,      8);
> > +                    EPEL_LINKS(c->put_hevc_epel, 1, 0, epel_v,      8);
> > +                    EPEL_LINKS(c->put_hevc_epel, 1, 1, epel_hv,     8);
> > +
> > +                    QPEL_LINKS(c->put_hevc_qpel, 0, 0, pel_pixels, 8);
> > +                    QPEL_LINKS(c->put_hevc_qpel, 0, 1, qpel_h,     8);
> > +                    QPEL_LINKS(c->put_hevc_qpel, 1, 0, qpel_v,     8);
> > +                    QPEL_LINKS(c->put_hevc_qpel, 1, 1, qpel_hv,    8);
> > +
> > +                }
> > +            }
> > +        }
> > +    } else if (bit_depth == 10) {
> > +        if (EXTERNAL_MMX(mm_flags)) {
> > +            if (EXTERNAL_MMXEXT(mm_flags) && ARCH_X86_64) {
> > +
> > +                if (EXTERNAL_SSSE3(mm_flags)) {
> 
> Same as above.

fixed (was easier for me to fix instead of waiting for a new patch
as i already had fixed 2 other issues locally ...)

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140506/f2c3886a/attachment.asc>


More information about the ffmpeg-devel mailing list