Commit Graph

5928 Commits

Author SHA1 Message Date
fangyibo de5cd3cb7c ffmpeg: fix scale build error in specific product
CC:  ffmpeg/libavformat/rtp.c 1 warning generated.
ffmpeg/libswscale/utils.c:701:33: error: use of undeclared identifier 'AV_CPU_FLAG__TIE_xt_FP_LSX'
    if (have_lasx(cpu_flags) || have_lsx(cpu_flags)) {
                                ^
ffmpeg/libavutil/loongarch/cpu.h:28:25: note: expanded from macro 'have_lsx'
#define have_lsx(flags) CPUEXT(flags, LSX)
                        ^
ffmpeg/libavutil/cpu_internal.h:43:31: note: expanded from macro 'CPUEXT'
#define CPUEXT(flags, cpuext) CPUEXT_SUFFIX(flags, , cpuext)
                              ^
ffmpeg/libavutil/cpu_internal.h:27:46: note: expanded from macro 'CPUEXT_SUFFIX'
    (HAVE_ ## cpuext ## suffix && ((flags) & AV_CPU_FLAG_ ## cpuext))
                                             ^
<scratch space>:186:1: note: expanded from here
AV_CPU_FLAG__TIE_xt_FP_LSX
^
ffmpeg/libswscale/utils.c:701:33: error: use of undeclared identifier 'HAVE__TIE_xt_FP_LSX'; did you mean '_TIE_xt_FP_LSX'?
ffmpeg/libavutil/loongarch/cpu.h:28:25: note: expanded from macro 'have_lsx'
#define have_lsx(flags) CPUEXT(flags, LSX)
                        ^
ffmpeg/libavutil/cpu_internal.h:43:31: note: expanded from macro 'CPUEXT'
#define CPUEXT(flags, cpuext) CPUEXT_SUFFIX(flags, , cpuext)
                              ^
ffmpeg/libavutil/cpu_internal.h:27:6: note: expanded from macro 'CPUEXT_SUFFIX'
    (HAVE_ ## cpuext ## suffix && ((flags) & AV_CPU_FLAG_ ## cpuext))
     ^
<scratch space>:185:1: note: expanded from here
HAVE__TIE_xt_FP_LSX
^
/workdir/prebuilts/clang/linux/xtensa/bin/../config/../hifi4_bes_asic_newlib/xtensa-elf/arch/include/xtensa/tie/xt_FP.h:156:16: note: '_TIE_xt_FP_LSX' declared here
extern xtfloat _TIE_xt_FP_LSX(const xtfloat * a /*in*/, int off /*in*/);
               ^
ffmpeg/libswscale/utils.c:1865:37: error: use of undeclared identifier 'AV_CPU_FLAG__TIE_xt_FP_LSX'
                                    have_lsx(cpu_flags)    ? 8 :
                                    ^
ffmpeg/libavutil/loongarch/cpu.h:28:25: note: expanded from macro 'have_lsx'
#define have_lsx(flags) CPUEXT(flags, LSX)
                        ^
ffmpeg/libavutil/cpu_internal.h:43:31: note: expanded from macro 'CPUEXT'
#define CPUEXT(flags, cpuext) CPUEXT_SUFFIX(flags, , cpuext)
                              ^
ffmpeg/libavutil/cpu_internal.h:27:46: note: expanded from macro 'CPUEXT_SUFFIX'
    (HAVE_ ## cpuext ## suffix && ((flags) & AV_CPU_FLAG_ ## cpuext))
                                             ^
<scratch space>:57:1: note: expanded from here
AV_CPU_FLAG__TIE_xt_FP_LSX
^
ffmpeg/libswscale/utils.c:1865:37: error: use of undeclared identifier 'HAVE__TIE_xt_FP_LSX'; did you mean '_TIE_xt_FP_LSX'?
ffmpeg/libavutil/loongarch/cpu.h:28:25: note: expanded from macro 'have_lsx'
#define have_lsx(flags) CPUEXT(flags, LSX)
                        ^
ffmpeg/libavutil/cpu_internal.h:43:31: note: expanded from macro 'CPUEXT'
#define CPUEXT(flags, cpuext) CPUEXT_SUFFIX(flags, , cpuext)
                              ^
ffmpeg/libavutil/cpu_internal.h:27:6: note: expanded from macro 'CPUEXT_SUFFIX'
    (HAVE_ ## cpuext ## suffix && ((flags) & AV_CPU_FLAG_ ## cpuext))
     ^
<scratch space>:56:1: note: expanded from here
HAVE__TIE_xt_FP_LSX
^
/workdir/prebuilts/clang/linux/xtensa/bin/../config/../hifi4_bes_asic_newlib/xtensa-elf/arch/include/xtensa/tie/xt_FP.h:156:16: note: '_TIE_xt_FP_LSX' declared here
extern xtfloat _TIE_xt_FP_LSX(const xtfloat * a /*in*/, int off /*in*/);

Signed-off-by: fangyibo <fangyibo@xiaomi.com>
2026-04-20 20:58:13 +08:00
openvela-robot 79d0634421 ffmpeg7: fixed amix format when graph load
Signed-off-by: zhushiqshi <zhushiqshi@xiaomi.com>
2026-04-20 20:57:53 +08:00
openvela-robot 225a503d52 FFMPEG: fix AVPacket mem leak
Signed-off-by: yangyalei <yangyalei@xiaomi.com>
2026-04-20 20:57:50 +08:00
openvela-robot 6fb822a912 ffmpeg7: add avformat_write_trailer for adevsink
Signed-off-by: zhushiqshi <zhushiqshi@xiaomi.com>
2026-04-20 20:57:47 +08:00
openvela-robot 32ee48238c adevsink:only do grahp reconfig in start flow
Resolve audio ending process interrupted by adevsink non start command

Signed-off-by: shipei <shipei@xiaomi.com>
2026-04-20 20:57:39 +08:00
openvela-robot 3608e86b4f FFMPEG: fix sys/syscrl.h can not find
Signed-off-by: zhushiqshi <zhushiqshi@xiaomi.com>
2026-04-20 20:57:30 +08:00
openvela-robot a6c20059ed FFMPEG: add resume when eos is on
when eos is on, we should resume the stream if it is paused.

Signed-off-by: jinxiuxu <jinxiuxu@xiaomi.com>
2026-04-20 20:57:27 +08:00
James Almer fcf080b978 swscale/output: fix alpha endianness in XV36
Mistakenly written in native endianness in 42098f92662c47659df85173d8076b62a23269aa.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:57:25 +08:00
James Almer 78f6311df0 swscale/output: fill the xv30le alpha bits
As with other pixel formats, set the undefined alpha bits to opaque.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:57:25 +08:00
James Almer 46447d0e84 swscale/output: add AYUV64BE output support
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:57:25 +08:00
James Almer a87289c354 swscale/input: add AYUV64BE input support
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:57:25 +08:00
James Almer d9689407ee swscale/output: add X36VBE output support
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:57:24 +08:00
James Almer 5341916571 swscale/input: add X36VBE input support
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:57:24 +08:00
openvela-robot 6cf52fc3f3 swscale/output: fill all the xv36le alpha bits
The format is 10 bit per component, not 8.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:57:24 +08:00
openvela-robot 356c47e109 FFMPEG: force start and stop after configure for driver
Signed-off-by: hanqiyuan <hanqiyuan@xiaomi.com>
2026-04-20 20:57:20 +08:00
openvela-robot dccba787a1 fftools/ffmpeg_demux: use proper logging contexts everywhere 2026-04-20 20:57:15 +08:00
openvela-robot 1e2e93b397 FFMPEG: only back completed msg when running state.
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2026-04-20 20:57:12 +08:00
openvela-robot 34d0892357 configure: Only try to use the -no_warn_duplicate_libraries flag on Darwin
While we only add the flag if the linker seems to support it,
it turns out that ld.bfd had a bug where the flag is accidentally
accepted, and the flag produces an output file named
"_warn_duplicate_libraries".

The ld.bfd bug was fixed in binutils 2.36, in
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=3991c7acb29aa8d7d52150695eb3efa03a08dd50.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 20:57:04 +08:00
openvela-robot c8c957ba35 adevsrc: modify the type of codec_id option param to string.
codec_id=65544 => codec_name=pcm_s32le.

Signed-off-by: yaojingwei <yaojingwei@xiaomi.com>
2026-04-20 20:57:01 +08:00
Martin Schitter 970094dfa2 swscale/input: add input support for RGBF16
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 20:56:59 +08:00
Martin Schitter 9c47336965 swscale/input: add input support for RGBF32
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 20:56:58 +08:00
James Almer a9c60db910 swscale/output: add V30X output support
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:56:55 +08:00
James Almer b23e98fbaf swscale/output: add VYU444 output support
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:56:55 +08:00
James Almer 8f489b0a85 swscale/output: add UYVA output support
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:56:55 +08:00
James Almer 6dc6ce2628 swscale/output: add AYUV output support
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:56:55 +08:00
James Almer 964aef622d swscale/output: add missing yuv2packed1 and yuv2packed2 support for VUY{X,A}
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:56:55 +08:00
openvela-robot 2006b05fae avcodec/hevc/ps: return a proper error code when we don't support parsing an sps
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:56:54 +08:00
openvela-robot 79836cf6b9 FFMPEG: ff_nuttx_capbility_query_ranges not relay on AVFormatContext
Signed-off-by: yangyalei <yangyalei@xiaomi.com>
2026-04-20 20:56:51 +08:00
Martin Storsjö b848e3d9b3 arm: Consistently use proper interworking function returns
Use "bx lr", or "pop {lr}", which do proper mode switching
between thumb and arm modes. A plain "mov pc, lr" does not switch
from thumb mode to arm mode (while in arm mode, it does switch
mode for a thumb caller).

This is normally not an issue, as CONFIG_THUMB only is enabled if
the C compiler defaults to thumb; but stick to patterns that can
do mode switching if needed, for consistency.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 20:56:47 +08:00
Niklas Haas 22edebec31 swscale/internal: constify and expose ff_swscale()
Used as an intermediate entry point for the new swscale context. The extra
constification is a consistency measure, as I want to move the memcpy of
stride and plane pointers to the functions that actually need to mutate them.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-04-20 20:56:47 +08:00
Niklas Haas 232eb35b77 swscale/rgb2xyz: expose these functions internally
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-04-20 20:56:46 +08:00
Niklas Haas dbcb3ed34e swscale/rgb2xyz: follow convention on image pointers and strides
Instead of taking an int16_t pointer and a stride in halfwords, follow the
usual convention of treating all planes and strides as byte-addressed.

This does not have any immediate effect but makes these functions more
reusable without unintended "gotchas".

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-04-20 20:56:46 +08:00
Niklas Haas af38a54b02 swscale/rgb2xyz: add explicit width parameter
This fixes an 11-year-old bug in the rgb2xyz functions, when used with a
negative stride. The current loop bounds turned it into a no-op.

Additionally, this increases performance on highly cropped images, whose
stride may be substantially higher than the effective width.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-04-20 20:56:46 +08:00
Niklas Haas f3c6bcf582 swscale/rgb2xyz: minor style fixes
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-04-20 20:56:46 +08:00
James Almer 130a34ce7a swscale/input: add V30X input support
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:56:46 +08:00
James Almer 3a5e5651cd swscale/input: add VYU444 input support
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:56:46 +08:00
James Almer 6aa19689f8 swscale/input: add UYVA input support
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:56:46 +08:00
James Almer 65b5f58f3e swscale/input: add AYUV input support
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:56:46 +08:00
jinbo 5b74e04d7b swscale: Fix conflicting types for loongarch
Build breaks after c1a0e657638f7007dcc807a2d985c22631fcd6d3

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 20:56:46 +08:00
Niklas Haas 0636d786dc swscale/ppc: fix altivec build failure
Fixes: c1a0e657638f7007dcc807a2d985c22631fcd6d3
2026-04-20 20:56:45 +08:00
Martin Storsjö 753d875796 swscale: Fix aarch64 and i386 compilation failures
This unbreaks builds after c1a0e657638f7007dcc807a2d985c22631fcd6d3,
which broke with errors like

src/libswscale/aarch64/rgb2rgb.c:66:25: error: incompatible function pointer types assigning to 'void (*)(const uint8_t *, uint8_t *, uint8_t *, uint8_t *, int, int, int, int, int, const int32_t *)' (aka 'void (*)(const unsigned char *, unsigned char *, unsigned char *, unsigned char *, int, int, int, int, int, const int *)') from 'void (const uint8_t *, uint8_t *, uint8_t *, uint8_t *, int, int, int, int, int, int32_t *)' (aka 'void (const unsigned char *, unsigned char *, unsigned char *, unsigned char *, int, int, int, int, int, int *)') [-Wincompatible-function-pointer-types]
   66 |         ff_rgb24toyv12  = rgb24toyv12;
      |                         ^ ~~~~~~~~~~~

and

src/libswscale/aarch64/swscale_unscaled.c:213:29: error: incompatible function pointer types assigning to 'SwsFunc' (aka 'int (*)(struct SwsContext *, const unsigned char *const *, const int *, int, int, unsigned char *const *, const int *)') from 'int (SwsContext *, const uint8_t *const *, const int *, int, int, const uint8_t **, const int *)' (aka 'int (struct SwsContext *, const unsigned char *const *, const int *, int, int, const unsigned char **, const int *)') [-Wincompatible-function-pointer-types]
  213 |         c->convert_unscaled = nv24_to_yuv420p_neon_wrapper;
      |                             ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 20:56:44 +08:00
Niklas Haas 157362114f swscale/input: parametrize ff_sws_init_input_funcs() pointers
Following the precedent set by ff_sws_init_output_funcs().

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-04-20 20:56:44 +08:00
Niklas Haas 8a6af092da swscale/internal: add typedefs for input reading functions
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-04-20 20:56:44 +08:00
Niklas Haas 9b113f2fef swscale/internal: forward typedef SwsContext
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-04-20 20:56:44 +08:00
Niklas Haas 77cc6a2750 swscale/internal: constify SwsFunc
I want to move away from having random leaf processing functions mutate
plane pointers, and while we're at it, we might as well make the strides
and tables const as well.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-04-20 20:56:44 +08:00
Niklas Haas 5a99237373 swscale/internal: turn cascaded_tmp into an array
Slightly more convenient to access from the new wrapping code.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-04-20 20:56:44 +08:00
Niklas Haas 1f8cf6ba2f swscale/internal: expose ff_update_palette() internally
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-04-20 20:56:44 +08:00
Niklas Haas bd4a95a01e swscale/internal: rename NB_SWS_DITHER for consistency
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-04-20 20:56:43 +08:00
Niklas Haas a4443a97fd tests/swscale: fix minor typos
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-04-20 20:56:43 +08:00
openvela-robot 48ade96938 lavfi/buffersink: add array-type options to replace "int-list" ones
"int-list" options are a hack that provides rudimentary support for
array-type options by treating them as byte arrays (i.e.
AV_OPT_TYPE_BINARY). Since we now have proper array-type options, they
should replace "int-list" everywhere (which happens to be just
buffersink).
2026-04-20 20:56:25 +08:00