Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Starred by 2 users
Status: Fixed
Owner:
Closed: Oct 2010
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug
M-9

Restricted
  • Only users with EditIssue permission may comment.



Sign in to add a comment
ffmpeg does not build for Neon Chrome/OS
Project Member Reported by fbarchard@chromium.org, Oct 13 2010 Back to list
What steps will reproduce the problem?
1. configure for neon

export GYP_DEFINES="target_arch=arm armv7=1 arm_neon=1 linux_use_tcmalloc=0 sysroot=/usr/local/google/arm-rootfs disable_nacl=1 werror=
branding=Chromium ffmpeg_branding=Chrome buildtype=Official"

2. build ffmpeg
make -j16 -r ffmpeg BUILDTYPE=Release

What is the expected output?
Chrome should build, like it does for ARM

What do you see instead?
  CC(target) out/Debug/obj.target/ffmpegsumo/third_party/ffmpeg/patched-ffmpeg-mt/libavcodec/arm/h264dsp_neon.o
third_party/ffmpeg/patched-ffmpeg-mt/libavcodec/arm/mpegvideo_arm.c:28: error: size of array 'x_Y_DC_SCALE' is negative
third_party/ffmpeg/patched-ffmpeg-mt/libavcodec/arm/mpegvideo_arm.c:29: error: size of array 'x_C_DC_SCALE' is negative
third_party/ffmpeg/patched-ffmpeg-mt/libavcodec/arm/mpegvideo_arm.c:30: error: size of array 'x_AC_PRED' is negative
third_party/ffmpeg/patched-ffmpeg-mt/libavcodec/arm/mpegvideo_arm.c:31: error: size of array 'x_BLOCK_LAST_INDEX' is negative
third_party/ffmpeg/patched-ffmpeg-mt/libavcodec/arm/mpegvideo_arm.c:32: error: size of array 'x_INTER_SCANTAB_RASTER_END' is negative
third_party/ffmpeg/patched-ffmpeg-mt/libavcodec/arm/mpegvideo_arm.c:33: error: size of array 'x_H263_AIC' is negative
make: *** [out/Debug/obj.target/ffmpegsumo/third_party/ffmpeg/patched-ffmpeg-mt/libavcodec/arm/mpegvideo_arm.o] Error 1


Arm configure is
export GYP_DEFINES="target_arch=arm armv7=1 arm_neon=0 linux_use_tcmalloc=0 sysroot=/usr/local/google/arm-rootfs disable_nacl=1 werror= branding=Chromium ffmpeg
_branding=Chrome buildtype=Official"

which builds okay
  CC(target) out/Debug/obj.target/ffmpegsumo/third_party/ffmpeg/patched-ffmpeg-mt/libavcodec/arm/simple_idct_armv6.o
  CC(target) out/Debug/obj.target/ffmpegsumo/third_party/ffmpeg/patched-ffmpeg-mt/libavutil/arm/cpu.o
  CC(target) out/Debug/obj.target/ffmpegsumo/third_party/ffmpeg/patched-ffmpeg-mt/libavcodec/arm/h264dsp_init_arm.o
  CC(target) out/Debug/obj.target/ffmpegsumo/third_party/ffmpeg/patched-ffmpeg-mt/libavcodec/arm/h264pred_init_arm.o
  CC(target) out/Debug/obj.target/ffmpegsumo/third_party/ffmpeg/patched-ffmpeg-mt/libavcodec/arm/mpegvideo_arm.o
  CC(target) out/Debug/obj.target/ffmpegsumo/third_party/ffmpeg/patched-ffmpeg-mt/libavcodec/arm/mpegvideo_armv5te.o
  CC(target) out/Debug/obj.target/ffmpegsumo/third_party/ffmpeg/patched-ffmpeg-mt/libavcodec/arm/mpegvideo_armv5te_s.o
  SOLINK(target) out/Debug/obj.target/third_party/ffmpeg/libffmpegsumo.so

Chromium build for Neon avoids the problematic file.
export GYP_DEFINES="target_arch=arm armv7=1 arm_neon=1 linux_use_tcmalloc=0 sysroot=/usr/local/google/arm-rootfs disable_nacl=1 werror= branding=Chromium ffmpeg_branding=Chromium buildtype=Official"
 
This is the configure for Neon ffmpeg ChromeOS

./configure --disable-everything --disable-network --disable-bzlib --disable-zlib --disable-swscale --enable-shared --enable-decoder=theora,vorbis,pcm_u8,pcm_s16le,pcm_f32le,aac,h264,mp3,wmv1,wmv2,wmv3,wmav1,wmav2,wmapro,mpeg4,pcm_u8,pcm_s16le,pcm_f32le --enable-demuxer=ogg,matroska,wav,mp3,mov,avi,wav,asf --enable-parser=mpegaudio --enable-bsf=h264_mp4toannexb,mpeg4video_es,vc1_asftorcv,vc1_asftoannexg --enable-cross-compile --arch=arm --target-os=linux --enable-armv6 --enable-armv6t2 --enable-armvfp --enable-neon --cross-prefix=/usr/local/google/cross-tools/arm-2009q3/bin/arm-none-linux-gnueabi- --extra-cflags="-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
Comment 2 by jiesun@chromium.org, Oct 14 2010
#define Y_DC_SCALE               (0xa54+72)
#define C_DC_SCALE               (0xa58+72)
#define AC_PRED                  (0xa80+72)
#define BLOCK_LAST_INDEX         (0x2160+72)
#define INTER_SCANTAB_RASTER_END (0x2360+72)
#define H263_AIC                 (0x2610+80) will pass this to another bugs 


out/Debug/obj.target/third_party/ffmpeg/libffmpegsumo.so: undefined reference to `ff_dct_unquantize_h263_inter_neon'
out/Debug/obj.target/third_party/ffmpeg/libffmpegsumo.so: undefined reference to `ff_dct_unquantize_h263_intra_neon'

Apparently if the code is disabled, there will be a legitimate link bug
undefined reference to `ff_dct_unquantize_h263_inter_neon
Comment 5 by bugdro...@gmail.com, Oct 14 2010
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=62571

------------------------------------------------------------------------
r62571 | fbarchard@chromium.org | Thu Oct 14 10:03:25 PDT 2010

Changed paths:
 M http://src.chromium.org/viewvc/chrome/trunk/src/DEPS?r1=62571&r2=62570&pathrev=62571

ffmpeg roll to patch for neon to adjust offsets
BUG= 59123 
TEST=ffmpeg builds on neon

Review URL: http://codereview.chromium.org/3807003
------------------------------------------------------------------------
Status: Fixed
fixed with ffmpeg patch: 16_neon_offsets.patch
CL62568	http://codereview.chromium.org/3763003 for the patch
CL62571	http://codereview.chromium.org/3807003 to update DEPS

Status: Started
62568 only got the C code to build, but once the neon assembly was added to the gyp, the expression did not work.  Will need to update the offsets manually.

Comment 8 by bugdro...@gmail.com, Oct 14 2010
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=62579

------------------------------------------------------------------------
r62579 | fbarchard@chromium.org | Thu Oct 14 11:02:42 PDT 2010

Changed paths:
 M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/patches/to_upstream/16_neon_offsets.patch?r1=62579&r2=62578&pathrev=62579
 M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/source/patched-ffmpeg-mt/libavcodec/arm/asm-offsets.h?r1=62579&r2=62578&pathrev=62579
 M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/source/ffmpeg.gyp?r1=62579&r2=62578&pathrev=62579

ffmpeg add neon assembly to gyp and fix offsets with simple values
BUG= 59123 
TEST=ffmpeg builds on neon

Review URL: http://codereview.chromium.org/3832001
------------------------------------------------------------------------
Comment 9 by bugdro...@gmail.com, Oct 14 2010
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=62579

------------------------------------------------------------------------
r62579 | fbarchard@chromium.org | Thu Oct 14 11:02:42 PDT 2010

Changed paths:
 M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/patches/to_upstream/16_neon_offsets.patch?r1=62579&r2=62578&pathrev=62579
 M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/source/patched-ffmpeg-mt/libavcodec/arm/asm-offsets.h?r1=62579&r2=62578&pathrev=62579
 M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/source/ffmpeg.gyp?r1=62579&r2=62578&pathrev=62579

ffmpeg add neon assembly to gyp and fix offsets with simple values
BUG= 59123 
TEST=ffmpeg builds on neon

Review URL: http://codereview.chromium.org/3832001
------------------------------------------------------------------------
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=62582

------------------------------------------------------------------------
r62582 | fbarchard@chromium.org | Thu Oct 14 11:04:23 PDT 2010

Changed paths:
 M http://src.chromium.org/viewvc/chrome/trunk/src/DEPS?r1=62582&r2=62581&pathrev=62582

ffmpeg add neon assembly to gyp and fix offsets with simple values
BUG= 59123 
TEST=ffmpeg builds on neon

Review URL: http://codereview.chromium.org/3820002
------------------------------------------------------------------------
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=62582

------------------------------------------------------------------------
r62582 | fbarchard@chromium.org | Thu Oct 14 11:04:23 PDT 2010

Changed paths:
 M http://src.chromium.org/viewvc/chrome/trunk/src/DEPS?r1=62582&r2=62581&pathrev=62582

ffmpeg add neon assembly to gyp and fix offsets with simple values
BUG= 59123 
TEST=ffmpeg builds on neon

Review URL: http://codereview.chromium.org/3820002
------------------------------------------------------------------------
Comment 12 by karen@chromium.org, Oct 18 2010
Labels: Mstone-9
Status: Fixed
Thanks to JieSun for patch
Project Member Comment 15 by bugdroid1@chromium.org, Oct 12 2012
Labels: Restrict-AddIssueComment-Commit
This issue has been closed for some time. No one will pay attention to new comments.
If you are seeing this bug or have new data, please click New Issue to start a new bug.
Project Member Comment 16 by bugdroid1@chromium.org, Mar 10 2013
Labels: -Area-WebKit -Feature-Media -Mstone-9 Cr-Content Cr-Internals-Media M-9
Project Member Comment 17 by bugdroid1@chromium.org, Mar 13 2013
Labels: -Restrict-AddIssueComment-Commit Restrict-AddIssueComment-EditIssue
Project Member Comment 18 by bugdroid1@chromium.org, Apr 6 2013
Labels: -Cr-Content Cr-Blink
Sign in to add a comment