Update libjpeg-turbo to version 1.4

RESOLVED FIXED in mozilla38

Status

()

Core
ImageLib
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: NVD, Assigned: RyanVM)

Tracking

Trunk
mozilla38
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

4 years ago
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.
(Reporter)

Updated

4 years ago
Depends on: 987002
(Assignee)

Updated

4 years ago
Blocks: 1076902
(Assignee)

Updated

4 years ago
Assignee: nobody → ryanvm
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Comment 2

4 years ago
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 :)
(Assignee)

Comment 3

4 years ago
Conveniently, the work from bug 815473 appears to have made it upstream, so that allows us to simplify some things on our end.
(Assignee)

Comment 4

4 years ago
Created attachment 8549688 [details] [diff] [review]
build system changes

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)
(Assignee)

Comment 5

4 years ago
Created attachment 8549823 [details] [diff] [review]
Update libjpeg-turbo to version 1.4

https://treeherder.mozilla.org/#/jobs?repo=try&revision=15d79489f390

Such green, much wow.
Attachment #8549823 - Flags: review?(jmuizelaar)
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+
(Assignee)

Comment 8

4 years ago
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.
(Assignee)

Comment 10

4 years ago
Created attachment 8550422 [details] [diff] [review]
build system changes

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
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
(Reporter)

Updated

3 years ago
Blocks: 1176196
You need to log in before you can comment on or make changes to this bug.