Update libjpeg-turbo to version 1.4

RESOLVED FIXED in mozilla38

Status

()

defect
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: ionnv, Assigned: RyanVM)

Tracking

Trunk
mozilla38
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

()

Attachments

(2 attachments, 1 obsolete attachment)

http://sourceforge.net/projects/libjpeg-turbo/files/1.3.90%20%281.4%20beta1%29/

Should update Firefox to this when the 1.4 final release comes out.
Depends on: 987002
Blocks: 1076902
Assignee: nobody → ryanvm
Wow, we've updated libjpeg-turbo for every ESR going back to 24 (and version 1.2.1 made it for 16, so just barely beat out esr17). Funny trend :)
Conveniently, the work from bug 815473 appears to have made it upstream, so that allows us to simplify some things on our end.
Posted patch build system changes (obsolete) — Splinter Review
The new version of libjpeg-turbo adds SIMD support for aarch64 and mips. Not that I have any way of actually testing these changes myself locally, but I've at least verified on Try that they don't break any existing platforms.
Attachment #8549688 - Flags: review?(mh+mozilla)
Comment on attachment 8549823 [details] [diff] [review]
Update libjpeg-turbo to version 1.4

Review of attachment 8549823 [details] [diff] [review]:
-----------------------------------------------------------------

This is basically unreviewable... Hopefully it's good.
Attachment #8549823 - Flags: review?(jmuizelaar) → review+
Comment on attachment 8549688 [details] [diff] [review]
build system changes

Review of attachment 8549688 [details] [diff] [review]:
-----------------------------------------------------------------

::: configure.in
@@ +6162,5 @@
> +    LIBJPEG_TURBO_ASFLAGS="-march=armv8-a"
> +    LIBJPEG_TURBO_ARM64_ASM=1
> +  ;;
> +  *:mips*)
> +    LIBJPEG_TURBO_ASFLAGS="-march=native"

-march=native is never the right flag to use. Either you give an explicit value, or no value at all.
Attachment #8549688 - Flags: review?(mh+mozilla) → feedback+
Branislav, is there a sensible default to set for MIPS assembly files or should I just not bother trying to set one?
Flags: needinfo?(branislav.rankov)
(In reply to Ryan VanderMeulen [:RyanVM UTC-5] from comment #8)
> Branislav, is there a sensible default to set for MIPS assembly files or
> should I just not bother trying to set one?

I believe you want -mdspr2.  AFAICS, you don't need to switch on any -march= bits for that.
Thanks!
Attachment #8549688 - Attachment is obsolete: true
Attachment #8550422 - Flags: review?(mh+mozilla)
Attachment #8550422 - Flags: feedback?(branislav.rankov)
Attachment #8550422 - Flags: review?(mh+mozilla) → review+
(In reply to Nathan Froyd [:froydnj] [:nfroyd] from comment #9)
> (In reply to Ryan VanderMeulen [:RyanVM UTC-5] from comment #8)
> > Branislav, is there a sensible default to set for MIPS assembly files or
> > should I just not bother trying to set one?
> 
> I believe you want -mdspr2.  AFAICS, you don't need to switch on any -march=
> bits for that.

This is correct. My concern is that not all MIPS CPU-s support dspr2. I think that it would be safer not to give this option by default and let the one who does the build provide it if it is needed. 

Also the libjpeg-turbo code will parse cpuinfo and determine if it can use dspr2.

Here is the part of code:

#if defined(__MIPSEL__) && defined(__mips_dsp) && (__mips_dsp_rev >= 2)
  simd_support |= JSIMD_MIPS_DSPR2;
#elif defined(__linux__)
  /* We still have a chance to use MIPS DSPR2 regardless of globally used
   * -mdspr2 options passed to gcc by performing runtime detection via
   * /proc/cpuinfo parsing on linux */
  if (!parse_proc_cpuinfo("MIPS 74K"))
    return;
#endif
Flags: needinfo?(branislav.rankov)
Attachment #8550422 - Flags: feedback?(branislav.rankov) → feedback+
The -mdspr2 flag only applies to the assembly code.
https://hg.mozilla.org/mozilla-central/rev/fd682d5fc723
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Blocks: 1176196
You need to log in before you can comment on or make changes to this bug.