Closed Bug 1270016 Opened 8 years ago Closed 8 years ago

Create FLAC MediaDataDecoder

Categories

(Core :: Audio/Video: Playback, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: jya, Assigned: jya)

References

Details

Attachments

(3 files)

We need this to be able to play flac (either native container or contained in ogg)
Mass change P2 -> P3
Priority: P2 → P3
Assignee: nobody → jyavenard
Code was extracted from FFmpeg 3.1.

Review commit: https://reviewboard.mozilla.org/r/68558/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/68558/
Attachment #8776924 - Flags: review?(ajones)
Attachment #8776925 - Flags: review?(ajones)
Comment on attachment 8776925 [details]
Bug 1270016: P2. Make the FFVPX PDM work with FLAC.

https://reviewboard.mozilla.org/r/68560/#review65806

r+ with the sign inversion problem fixed.

::: dom/media/AudioSampleFormat.h:87
(Diff revision 1)
>  }
> +inline float
> +AudioSampleToFloat(int32_t aValue)
> +{
> +  return aValue/(float)(1<<31);
> +}

1 << 31 is negative - see below:

ajones@DESKTOP-IELR441:~$ cat test.c
#include <stdio.h>

int main(int argc, char* argv[])
{
  printf("%f\n", (float)(1 << 31));
  return 0;
}
ajones@DESKTOP-IELR441:~$ clang-3.6 test.c
ajones@DESKTOP-IELR441:~$ ./a.out
-2147483648.000000
ajones@DESKTOP-IELR441:~$
Attachment #8776925 - Flags: review?(ajones) → review+
Comment on attachment 8776924 [details]
Bug 1270016: P1. Add FLAC support to our ffmpeg extract.

https://reviewboard.mozilla.org/r/68558/#review65768
Attachment #8776924 - Flags: review?(ajones) → review+
https://reviewboard.mozilla.org/r/68560/#review65806

> 1 << 31 is negative - see below:
> 
> ajones@DESKTOP-IELR441:~$ cat test.c
> #include <stdio.h>
> 
> int main(int argc, char* argv[])
> {
>   printf("%f\n", (float)(1 << 31));
>   return 0;
> }
> ajones@DESKTOP-IELR441:~$ clang-3.6 test.c
> ajones@DESKTOP-IELR441:~$ ./a.out
> -2147483648.000000
> ajones@DESKTOP-IELR441:~$

would have sounded the same :)
Comment on attachment 8776924 [details]
Bug 1270016: P1. Add FLAC support to our ffmpeg extract.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/68558/diff/1-2/
Comment on attachment 8776925 [details]
Bug 1270016: P2. Make the FFVPX PDM work with FLAC.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/68560/diff/1-2/
Comment on attachment 8776924 [details]
Bug 1270016: P1. Add FLAC support to our ffmpeg extract.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/68558/diff/2-3/
Comment on attachment 8776925 [details]
Bug 1270016: P2. Make the FFVPX PDM work with FLAC.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/68560/diff/2-3/
Comment on attachment 8781839 [details]
Bug 1270016: P3. Only check audio format at decode time.

https://reviewboard.mozilla.org/r/72164/#review70006
Attachment #8781839 - Flags: review?(dglastonbury) → review+
Pushed by jyavenard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8a0f3231b43e
P1. Add FLAC support to our ffmpeg extract. r=kentuckyfriedtakahe
https://hg.mozilla.org/integration/autoland/rev/8359b182bb99
P2. Make the FFVPX PDM work with FLAC. r=kentuckyfriedtakahe
https://hg.mozilla.org/integration/autoland/rev/9178e6e14a5a
P3. Only check audio format at decode time. r=kamidphish
I had to back these (and bug 1270016) out for various media test failures and/or unexpected passes:
https://treeherder.mozilla.org/logviewer.html#?job_id=2282261&repo=autoland
https://treeherder.mozilla.org/logviewer.html#?job_id=2279990&repo=autoland


https://hg.mozilla.org/integration/autoland/rev/e6b665f32057
Status: RESOLVED → REOPENED
Flags: needinfo?(jyavenard)
Resolution: FIXED → ---
Target Milestone: mozilla51 → ---
Pushed by jyavenard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/204316468536
P1. Add FLAC support to our ffmpeg extract. r=kentuckyfriedtakahe
https://hg.mozilla.org/integration/autoland/rev/b23729f27e03
P2. Make the FFVPX PDM work with FLAC. r=kentuckyfriedtakahe
https://hg.mozilla.org/integration/autoland/rev/db0f179fdb85
P3. Only check audio format at decode time. r=kamidphish
https://hg.mozilla.org/mozilla-central/rev/204316468536
https://hg.mozilla.org/mozilla-central/rev/b23729f27e03
https://hg.mozilla.org/mozilla-central/rev/db0f179fdb85
Status: REOPENED → RESOLVED
Closed: 8 years ago8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Flags: needinfo?(jyavenard)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: