Opened 8 months ago

Closed 8 months ago

Last modified 8 months ago

#6932 closed defect (fixed)

Cross-compile fails in "libavcodec/libx264.c: In function ‘X264_frame’"

Reported by: hydra3333 Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: libx264
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
Cross-compile fails in "libavcodec/libx264.c: In function ‘X264_frame’"
How to reproduce:
Attempt to cross-compile with commit cf57cb3ae4364ab8e70af37beea7a45a86de90e9

CC	libavcodec/libx264.o
libavcodec/libx264.c: In function ‘X264_frame’:
libavcodec/libx264.c:282:9: error: ‘x264_bit_depth’ undeclared (first use in this function); did you mean ‘x264_picture_t’?
     if (x264_bit_depth > 8)
         ^~~~~~~~~~~~~~
         x264_picture_t
libavcodec/libx264.c:282:9: note: each undeclared identifier is reported only once for each function it appears in
libavcodec/libx264.c: In function ‘X264_init_static’:
libavcodec/libx264.c:876:9: error: ‘x264_bit_depth’ undeclared (first use in this function); did you mean ‘x264_picture_t’?
     if (x264_bit_depth == 8)
         ^~~~~~~~~~~~~~
         x264_picture_t
ffbuild/common.mak:60: recipe for target 'libavcodec/libx264.o' failed
make: *** [libavcodec/libx264.o] Error 1
make: *** Waiting for unfinished jobs....

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Change History (7)

comment:1 Changed 8 months ago by hydra3333

Ah.

An issue seems to have been introduced upstream sometime after x264 commit e9a5903edf8ca59ef20e6f4894c196f135af735e where cross-compiling both ffmpeg and x264 from latest git fails.
Refer to http://git.videolan.org/?p=x264.git;a=shortlog
x86: Fix stack alignment for x264_cabac_encode_ue_bypass call stable
Cross-compiling the latest ffmpeg from git with that x264 commit seems to work.

Last edited 8 months ago by hydra3333 (previous) (diff)

comment:2 Changed 8 months ago by jamrial

  • Component changed from undetermined to avcodec
  • Status changed from new to open

There's a patch waiting review in the mailing list that will add support for the latest x264 version.

comment:4 Changed 8 months ago by hydra3333

This seems to be related to the error message and possibly may be more than an API change ? Just wondering.

http://git.videolan.org/?p=x264.git;a=commit;h=71ed44c7312438fac7c5c5301e45522e57127db4
"Drop the 'x264_bit_depth' global variable."

Unify 8-bit and 10-bit CLI and libraries

Add 'i_bitdepth' to x264_param_t with the corresponding '--output-depth' CLI
option to set the bit depth at runtime.

Drop the 'x264_bit_depth' global variable. Rather than hardcoding it to an
incorrect value, it's preferable to induce a linking failure. If applications
relies on this symbol this will make it more obvious where the problem is.

Add Makefile rules that compiles modules with different bit depths. Assembly
on x86 is prefixed with the 'private_prefix' define, while all other archs
modify their function prefix internally.

Templatize the main C library, x86/x86_64 assembly, ARM assembly, AARCH64
assembly, PowerPC assembly, and MIPS assembly.

The depth and cache CLI filters heavily depend on bit depth size, so they
need to be duplicated for each value. This means having to rename these
filters, and adjust the callers to use the right version.

Unfortunately the threaded input CLI module inherits a common.h dependency
(input/frame -> common/threadpool -> common/frame -> common/common) which
is extremely complicated to address in a sensible way. Instead duplicate
the module and select the appropriate one at run time.

Each bitdepth needs different checkasm compilation rules, so split the main
checkasm target into two executables.

Version 0, edited 8 months ago by hydra3333 (next)

comment:5 Changed 8 months ago by jamrial

comment:6 Changed 8 months ago by jamrial

  • Resolution set to fixed
  • Status changed from open to closed

comment:7 Changed 8 months ago by cehoyos

  • Keywords libx264 added
Note: See TracTickets for help on using tickets.