Opened 6 years ago

Closed 6 years ago

Last modified 6 years 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 by hydra3333, 6 years ago

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 6 years ago by hydra3333 (previous) (diff)

comment:2 by James, 6 years ago

Component: undeterminedavcodec
Status: newopen

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

comment:4 by hydra3333, 6 years ago

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.
Last edited 6 years ago by hydra3333 (previous) (diff)

comment:6 by James, 6 years ago

Resolution: fixed
Status: openclosed

comment:7 by Carl Eugen Hoyos, 6 years ago

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