Skip to content

Commit

Permalink
Bug 1822246 - Part 1. Fix moz.yaml of libtheora to work correctly. r=…
Browse files Browse the repository at this point in the history
…media-playback-reviewers,padenot

When running `./mach vendor media/libtheora/moz.yaml`, it doesn't copy same
files correctly.

Differential Revision: https://phabricator.services.mozilla.com/D172650
  • Loading branch information
makotokato committed Mar 20, 2023
1 parent 156849c commit 5a0dca8
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 4 deletions.
2 changes: 1 addition & 1 deletion media/libtheora/lib/arm/armopts.s
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
;********************************************************************
; Original implementation:
; Copyright (C) 2009 Robin Watts for Pinknoise Productions Ltd
; last mod: $Id: armopts.s.in 17430 2010-09-22 21:54:09Z tterribe $
; last mod: $Id$
;********************************************************************

; Set the following to 1 if we have EDSP instructions
Expand Down
39 changes: 39 additions & 0 deletions media/libtheora/lib/arm/armopts.s.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
;********************************************************************
;* *
;* THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. *
;* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
;* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
;* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
;* *
;* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2010 *
;* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
;* *
;********************************************************************
; Original implementation:
; Copyright (C) 2009 Robin Watts for Pinknoise Productions Ltd
; last mod: $Id$
;********************************************************************

; Set the following to 1 if we have EDSP instructions
; (LDRD/STRD, etc., ARMv5E and later).
OC_ARM_ASM_EDSP * @HAVE_ARM_ASM_EDSP@

; Set the following to 1 if we have ARMv6 media instructions.
OC_ARM_ASM_MEDIA * @HAVE_ARM_ASM_MEDIA@

; Set the following to 1 if we have NEON (some ARMv7)
OC_ARM_ASM_NEON * @HAVE_ARM_ASM_NEON@

; Set the following to 1 if LDR/STR can work on unaligned addresses
; This is assumed to be true for ARMv6 and later code
OC_ARM_CAN_UNALIGN * 0

; Large unaligned loads and stores are often configured to cause an exception.
; They cause an 8 cycle stall when they cross a 128-bit (load) or 64-bit (store)
; boundary, so it's usually a bad idea to use them anyway if they can be
; avoided.

; Set the following to 1 if LDRD/STRD can work on unaligned addresses
OC_ARM_CAN_UNALIGN_LDRD * 0

END
21 changes: 18 additions & 3 deletions media/libtheora/moz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ origin:
description: Video compression format from Xiph
url: https://www.theora.org/

release: commit 7180717276af1ebc7da15c83162d6c5d6203aabf (2020-10-27T09:17:42.000-07:00).
release: 7180717276af1ebc7da15c83162d6c5d6203aabf (2020-10-27T09:17:42.000-07:00).
revision: 7180717276af1ebc7da15c83162d6c5d6203aabf

license: BSD-3-Clause-Clear
Expand Down Expand Up @@ -41,9 +41,12 @@ vendoring:
- .travis.yml
- configure.ac
- SConstruct
- Makefile.*
- "*.in"
- Makefile.am
- "*.pc.in"
- "*.spec.in"
- include/theora/theoraenc.h
- include/theora/Makefile.*
- include/Makefile.*
- lib/analyze.c
- lib/apiwrapper.c
- lib/apiwrapper.h
Expand Down Expand Up @@ -83,6 +86,18 @@ vendoring:
- lib/x86_vc/x86enc.c
- lib/x86_vc/x86enc.h
- lib/x86_vc/x86zigzag.h
- lib/Makefile.*
- lib/Version_script*
- lib/*.awk
- lib/*.def
- lib/*.exp

keep:
- Makefile.in
- lib/config.h
- update.sh

update-actions:
- action: run-script
script: '{yaml_dir}/update.sh'
cwd: '{yaml_dir}'
10 changes: 10 additions & 0 deletions media/libtheora/update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

sed \
-e s/@HAVE_ARM_ASM_EDSP@/1/g \
-e s/@HAVE_ARM_ASM_MEDIA@/1/g \
-e s/@HAVE_ARM_ASM_NEON@/1/g \
lib/arm/armopts.s.in > lib/arm/armopts.s

0 comments on commit 5a0dca8

Please sign in to comment.