Ffmpeg custom - problem to compile

Hello everybody.

I'm trying to compile a custom version of ffmpeg to use with minidlna.

I mark libffmpeg-custom with "Y", and the options below with "Y":

  • Use (L)GPL v3
  • Use code with complex licensing requirements
  • Include support for minidlna
  • Include support for most audio decoding requirements

In Global build settings the option Compile with support for patented functionality is marked with "Y".

The compilation starts but ends with the following error:

libavcodec/h264_cabac.d -MT libavcodec/h264_cabac.o -c -o libavcodec/h264_cabac.o libavcodec/h264_cabac.c
{standard input}: Assembler messages:
{standard input}:138: Error: invalid operands `and $24,$7,0xC0'
{standard input}:139: Error: invalid operands `sll $24,$24,0x01'
{standard input}:140: Error: invalid operands `addu $24,$24,$17'
{standard input}:141: Error: invalid operands `addu $24,$24,$2'
{standard input}:142: Error: invalid operands `lbu $25,512($24)'
{standard input}:143: Error: operand 3 must be an immediate expression `subu $7,$7,$25'
{standard input}:144: Error: invalid operands `sll $24,$7,0x11'
{standard input}:145: Error: operand 2 must be an immediate expression `slt $4,$24,$6'
{standard input}:149: Error: operand 3 must be an immediate expression `subu $6,$6,$24'
{standard input}:151: Error: invalid operands `addu $24,$17,$2'
{standard input}:152: Error: invalid operands `lbu $25,1152($24)'
{standard input}:153: Error: invalid operands `addu $24,$17,$7'
{standard input}:154: Error: invalid operands `lbu $4,0($24)'
{standard input}:155: Error: invalid operands `sb $25,0($5)'
{standard input}:156: Error: invalid operands `and $2,$2,0x01'
{standard input}:157: Error: operand 3 must be an immediate expression `sll $7,$7,$4'
{standard input}:158: Error: operand 3 must be an immediate expression `sll $6,$6,$4'
(...)
{standard input}:4885: Error: opcode not supported on this processor: mips32r2 (mips32r2) `movz $7,$16,$6'
{standard input}:4886: Error: opcode not supported on this processor: mips32r2 (mips32r2) `movz $4,$25,$6'
make[4]: *** [ffbuild/common.mak:81: libavcodec/h264_cabac.o] Error 1

What could it be? I can't find anything about the error involving openwrt.

Please posst output of

ubus call system board

from your openwrt device.

If your code is gpl3 please link to it.

Hello,

I am not currently using OpenWRT, I am using an old version of X-WRT and trying to migrate to OpenWRT.

Since the problem occurred in libffmpeg, I did not imagine that it could have something to do with the platform/router.

My router is the Mi Router 3.

	"kernel": "5.4.155",
	"hostname": "X-WRT",
	"system": "MediaTek MT7620A ver:2 eco:6",
	"model": "Xiaomi Mi Router R3",
	"board_name": "xiaomi,miwifi-r3",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "X-WRT",
		"version": "9.0_b202110271906",
		"revision": "r17859+164-70c12d26ca",
		"codename": "hirsute",
		"target": "ramips/mt7620",
		"description": "X-WRT 9.0_b202110271906 Hirsute"

If there is any problem asking about this here, I apologize.

Not a big problem, just that you have to use compatible xwrt sdk.
If incompatible assembly slips from gcc into gas it is their SDK problem, either way disable all assembly in ffmpeg, or ask them to fix.