CI: the lanes Ubuntu 26.04 broke, and the formats warnings

Built with ffmpeg 8, libaom 3.13, x265 4.1, glibc 2.43 and clang 21,
five lanes failed on the 26.04 runners:

- AV1 fixtures: a monochrome sequence comes out full range with no
  matrix whatever is asked for; the oracle takes the colour ffprobe
  reads instead of assuming it.
- Preview audio oracle: ffmpeg 8 leaves a timestamp gap at every seam
  of a -stream_loop copy, which the mixer honours and ffmpeg's raw
  decode does not. trailing_large loops its picture and encodes its
  sound as one track.
- rh265 multi-slice oracle: x265 4.1 writes unreadable slice headers
  when two slices are encoded on several threads; those cases encode
  on one worker.
- vkms: the kernel follows the runner's own release, its modules may
  sit under /usr/lib/modules, and modules-extra is fetched only where
  it exists.
- clang -std=c89 -pedantic: glibc's const-generic strchr/strstr under
  _GNU_SOURCE are _Generic; -Wno-c11-extensions goes wherever
  -Wno-c99-extensions already does.

ci_paths filters a file at the top of a samples tree by its own path.
rh264 and rh265 lose the parameters no instantiation reads, the 8-bit
H.264 kernels mark the depth they ignore, and the AV1 WebM fixtures
leave out the MP4 box writer they never use.
This commit is contained in:
LibretroAdmin authored and libretroadmin committed 2026-11-05 17:36:02 +01:00
1 parent de1def158d
commit a4172fdafd
27 files changed
+125 -80

No files matched your search

+2 -2
View File
@@ -123,7 +123,7 @@ jobs:
if [ "$offset" = 64 ]; then extra="-D_FILE_OFFSET_BITS=64"; fi
CC="$bin/$target$api-clang $extra" python3 libretro-common/samples/formats/vp9/check_stack.py
"$bin/$target$api-clang" $extra -O1 -std=c89 -pedantic -Wall -Wextra -Werror \
-Wno-long-long -Wno-c99-extensions -Wframe-larger-than=2048 \
-Wno-long-long -Wno-c99-extensions -Wno-c11-extensions -Wframe-larger-than=2048 \
-DHAVE_THREADS -DHAVE_DYLIB -Ilibretro-common/include -Igfx/include \
-c "$unity" -o "$RUNNER_TEMP/record-$target-$api-$offset.o"
if "$bin/llvm-nm" -u "$RUNNER_TEMP/record-$target-$api-$offset.o" | \
@@ -136,7 +136,7 @@ jobs:
vulkan_android_image vulkan_android_pipeline vulkan_android_sync \
vulkan_android_submit vulkan_android_cache_entry vulkan_android_cache vulkan_android_queue; do
"$bin/$target$api-clang" $extra -O1 -std=c89 -pedantic -Wall -Wextra -Werror \
-Wno-long-long -Wno-c99-extensions -Wframe-larger-than=2048 \
-Wno-long-long -Wno-c99-extensions -Wno-c11-extensions -Wframe-larger-than=2048 \
-DHAVE_THREADS -DHAVE_DYLIB -Ilibretro-common/include -Igfx/include \
-c "gfx/common/$source.c" -o "$RUNNER_TEMP/$source-$target-$api-$offset.o"
done
@@ -74,6 +74,7 @@ on:
- 'samples/tasks/wifi_tasks/**'
- 'samples/runloop/**'
- 'samples/tasks/**'
- 'samples/ui_companion_log_stub.c'
- '.github/workflows/Linux-frontend-overhead.yml'
# ci_paths: end
pull_request:
@@ -134,6 +135,7 @@ on:
- 'samples/tasks/wifi_tasks/**'
- 'samples/runloop/**'
- 'samples/tasks/**'
- 'samples/ui_companion_log_stub.c'
- '.github/workflows/Linux-frontend-overhead.yml'
# ci_paths: end
workflow_dispatch:
+2 -2
View File
@@ -232,7 +232,7 @@ jobs:
for compiler in gcc clang; do
for sample in libretro-common/samples/formats/subtitle_srt samples/tasks/subtitle_load samples/gfx/media_subtitle samples/gfx/media_controls; do
extra_flags=''
if [ "$compiler" = clang ]; then extra_flags=-Wno-c99-extensions; fi
if [ "$compiler" = clang ]; then extra_flags="-Wno-c99-extensions -Wno-c11-extensions"; fi
make -C "$sample" clean
ASAN_OPTIONS=detect_leaks=1 UBSAN_OPTIONS=halt_on_error=1 CFLAGS="$extra_flags" \
make -C "$sample" check CC="$compiler" SANITIZER=address,undefined
@@ -244,7 +244,7 @@ jobs:
set -eu
for sample in samples/tasks/subtitle_load samples/gfx/media_subtitle samples/gfx/media_controls; do
make -C "$sample" clean
TSAN_OPTIONS=halt_on_error=1 CFLAGS=-Wno-c99-extensions \
TSAN_OPTIONS=halt_on_error=1 CFLAGS="-Wno-c99-extensions -Wno-c11-extensions" \
make -C "$sample" check CC=clang SANITIZER=thread
done
- name: Threadless subtitle loading and drawing
+4 -2
View File
@@ -12,7 +12,7 @@ on:
- '!.github/workflows/*.yml'
- 'libretro-common/samples/encodings/rbzip2/**'
- 'samples/menu/dirwalk/**'
- 'samples/playlist/playlist_parity_test.c/**'
- 'samples/playlist/playlist_parity_test.c'
- 'samples/tasks/autodetect_handoff/**'
- 'samples/tasks/bluetooth_scan/**'
- 'samples/tasks/bps_patch/**'
@@ -45,6 +45,7 @@ on:
- 'samples/tasks/watchdog/**'
- 'samples/tasks/wifi_tasks/**'
- 'samples/playlist/**'
- 'samples/ui_companion_log_stub.c'
- '.github/workflows/Linux-samples-tasks.yml'
# ci_paths: end
pull_request:
@@ -58,7 +59,7 @@ on:
- '!.github/workflows/*.yml'
- 'libretro-common/samples/encodings/rbzip2/**'
- 'samples/menu/dirwalk/**'
- 'samples/playlist/playlist_parity_test.c/**'
- 'samples/playlist/playlist_parity_test.c'
- 'samples/tasks/autodetect_handoff/**'
- 'samples/tasks/bluetooth_scan/**'
- 'samples/tasks/bps_patch/**'
@@ -91,6 +92,7 @@ on:
- 'samples/tasks/watchdog/**'
- 'samples/tasks/wifi_tasks/**'
- 'samples/playlist/**'
- 'samples/ui_companion_log_stub.c'
- '.github/workflows/Linux-samples-tasks.yml'
# ci_paths: end
workflow_dispatch:
+1 -1
View File
@@ -100,7 +100,7 @@ jobs:
run: |
set -eu
flags=''
if cc --version | grep -qi clang; then flags=-Wno-c99-extensions; fi
if cc --version | grep -qi clang; then flags="-Wno-c99-extensions -Wno-c11-extensions"; fi
cc $flags -std=c89 -pedantic -Wall -Wextra -Werror -Wno-unused-function -Wframe-larger-than=4096 -Ilibretro-common/include samples/gfx/win32_window_proc/modal_frame_test.c -o modal_frame_test.exe -lgdi32 -luser32
rc=0
./modal_frame_test.exe || rc=$?
+1 -1
View File
@@ -135,7 +135,7 @@ ifneq ($(CXX_BUILD), 1)
# Keep the SDK's long-long declarations visible in C89 mode.
CFLAGS += -U__STRICT_ANSI__
ifeq ($(shell $(CC) --version 2>&1 | head -n 1 | grep -c "clang"),1)
CFLAGS += -Wno-c99-extensions
CFLAGS += -Wno-c99-extensions -Wno-c11-extensions
endif
endif
ifneq ($(findstring Win32,$(OS)),)
+14 -14
View File
@@ -1786,8 +1786,8 @@ static void rh264_mc_luma(const rh264_frame *f, uint8_t *dst, int dstride,
static void rh264_mc_chroma(const rh264_frame *f, uint8_t *dst, int dstride,
const uint8_t *ref, int rstride, int rw, int rh,
int ox, int oy, int bw, int bh, int mvx, int mvy)
{ if (f->bsh) rh264_mc_chroma_16((uint16_t*)dst, dstride, (const uint16_t*)ref, rstride, rw, rh, ox, oy, bw, bh, mvx, mvy, f->bd);
else rh264_mc_chroma_8(dst, dstride, ref, rstride, rw, rh, ox, oy, bw, bh, mvx, mvy, 8); }
{ if (f->bsh) rh264_mc_chroma_16((uint16_t*)dst, dstride, (const uint16_t*)ref, rstride, rw, rh, ox, oy, bw, bh, mvx, mvy);
else rh264_mc_chroma_8(dst, dstride, ref, rstride, rw, rh, ox, oy, bw, bh, mvx, mvy); }
static void rh264_wp_row(const rh264_frame *f, uint8_t *d, int n, int w,
int rnd, int sh, int o)
{ if (f->bsh) rh264_wp_row_16((uint16_t*)d, n, w, rnd, sh, o, f->bd);
@@ -1799,8 +1799,8 @@ static void rh264_bi_block(const rh264_frame *f, uint8_t *d, int dstride,
else rh264_bi_block_8(d, dstride, s0, s0s, s1, s1s, w, h, w0, w1, rnd, sh, o, 8); }
static void rh264_avg_block(const rh264_frame *f, uint8_t *d, int dstride,
const uint8_t *s0, int s0s, const uint8_t *s1, int s1s, int w, int h)
{ if (f->bsh) rh264_avg_block_16((uint16_t*)d, dstride, (const uint16_t*)s0, s0s, (const uint16_t*)s1, s1s, w, h, f->bd);
else rh264_avg_block_8(d, dstride, s0, s0s, s1, s1s, w, h, 8); }
{ if (f->bsh) rh264_avg_block_16((uint16_t*)d, dstride, (const uint16_t*)s0, s0s, (const uint16_t*)s1, s1s, w, h);
else rh264_avg_block_8(d, dstride, s0, s0s, s1, s1s, w, h); }
/* Macroblock position from its address. With macroblock-adaptive
* frame/field coding the picture is scanned in vertical PAIRS:
@@ -4021,7 +4021,7 @@ static RH264_INLINE int rh264_col_zero(const rh264_mv *c)
/* Spatial direct per-macroblock preparation (8.4.1.2.2): the minimum
* non-negative reference of the three MV predictor neighbours per list, and
* the 16x16 median predictor toward it. */
static void rh264_b_direct_prepare(const rh264_bctx *bc, const rh264_mv *mvg,
static void rh264_b_direct_prepare(const rh264_mv *mvg,
int gwmax, int ghmax, int mbx, int mby,
int *l0r, int *l1r, int *pm0x, int *pm0y, int *pm1x, int *pm1y)
{
@@ -4243,7 +4243,7 @@ static int rh264_b_direct_mb(rh264_frame *f, const rh264_bctx *bc,
{
int l0r = -1, l1r = -1, pm0x = 0, pm0y = 0, pm1x = 0, pm1y = 0, q;
if (bc->direct_spatial)
rh264_b_direct_prepare(bc, mvg, gwmax, ghmax, mbx, mby,
rh264_b_direct_prepare(mvg, gwmax, ghmax, mbx, mby,
&l0r, &l1r, &pm0x, &pm0y, &pm1x, &pm1y);
for (q = 0; q < 4; q++)
if (rh264_b_direct_quadrant(bc, mvg, gwmax, mbx, mby,
@@ -4275,8 +4275,8 @@ static const int8_t rh264_b_sub_pdir[13] = {3, 0, 1, 2, 0, 0, 1, 1, 2, 2, 0, 1,
/* One non-direct B partition, both lists resolved: predict per list off the
* grid, fill the cells, compensate. Refs below zero mean the list is unused. */
static void rh264_b_part(rh264_frame *f, const rh264_bctx *bc,
const rh264_slice_hdr *sh, rh264_mv *mvg, int gwmax, int ghmax,
static void rh264_b_part(const rh264_bctx *bc,
rh264_mv *mvg, int gwmax, int ghmax,
int mbx, int mby, int bx, int by, int bw, int bh,
int r0, int mvd0x, int mvd0y, int r1, int mvd1x, int mvd1y,
int hint, int *m0x, int *m0y, int *m1x, int *m1y)
@@ -4424,7 +4424,7 @@ static int rh264_decode_bslice(rh264_bits *b, const rh264_sps *sps,
if (pd == 1 || pd == 2) r1 = rh264_ref_idx_te(b, bc->n1);
if (r0 >= 0) { d0x = rh264_se(b); d0y = rh264_se(b); }
if (r1 >= 0) { d1x = rh264_se(b); d1y = rh264_se(b); }
rh264_b_part(f, bc, sh, mvg, gwmax, ghmax, mbx, mby, 0, 0, 16, 16,
rh264_b_part(bc, mvg, gwmax, ghmax, mbx, mby, 0, 0, 16, 16,
r0, d0x, d0y, r1, d1x, d1y, RH264_MVP_MEDIAN,
&m0x, &m0y, &m1x, &m1y);
rh264_b_pred_block(f, bc, sh, mbx, mby, 0, 0, 16, 16,
@@ -4458,7 +4458,7 @@ static int rh264_decode_bslice(rh264_bits *b, const rh264_sps *sps,
int bx = is16x8 ? 0 : pi * 8, by = is16x8 ? pi * 8 : 0;
int bw = is16x8 ? 16 : 8, bh = is16x8 ? 8 : 16;
int rr0 = pi ? r0b : r0a, rr1 = pi ? r1b : r1a;
rh264_b_part(f, bc, sh, mvg, gwmax, ghmax, mbx, mby,
rh264_b_part(bc, mvg, gwmax, ghmax, mbx, mby,
bx, by, bw, bh, rr0, d0[pi*2], d0[pi*2+1],
rr1, d1[pi*2], d1[pi*2+1], hints[pi],
&m0[pi*2], &m0[pi*2+1], &m1[pi*2], &m1[pi*2+1]);
@@ -4492,7 +4492,7 @@ static int rh264_decode_bslice(rh264_bits *b, const rh264_sps *sps,
if (need_prepare)
{
if (bc->direct_spatial)
rh264_b_direct_prepare(bc, mvg, gwmax, ghmax, mbx, mby,
rh264_b_direct_prepare(mvg, gwmax, ghmax, mbx, mby,
&l0r, &l1r, &pm0x, &pm0y, &pm1x, &pm1y);
for (p = 0; p < 4; p++)
if (rh264_b_sub_pdir[sub[p]] == 3)
@@ -8670,7 +8670,7 @@ static int rh264_cabac_decode_bslice(rh264_bits *b, const rh264_sps *sps,
if (r1 >= 0)
rh264_cabac_b_mvd(cb, am1, gwmax, mbx*4, mby*4, 4, 4,
&d1x, &d1y);
rh264_b_part(f, bc, sh, mvg, gwmax, ghmax, mbx, mby,
rh264_b_part(bc, mvg, gwmax, ghmax, mbx, mby,
0, 0, 16, 16, r0, d0x, d0y, r1, d1x, d1y,
RH264_MVP_MEDIAN, &m0x, &m0y, &m1x, &m1y);
rh264_b_pred_block(f, bc, sh, mbx, mby, 0, 0, 16, 16,
@@ -8739,7 +8739,7 @@ static int rh264_cabac_decode_bslice(rh264_bits *b, const rh264_sps *sps,
int bx = is16x8 ? 0 : pi * 8, by = is16x8 ? pi * 8 : 0;
int bw = is16x8 ? 16 : 8, bh = is16x8 ? 8 : 16;
int rr0 = pi ? r0b : r0a, rr1 = pi ? r1b : r1a;
rh264_b_part(f, bc, sh, mvg, gwmax, ghmax, mbx, mby,
rh264_b_part(bc, mvg, gwmax, ghmax, mbx, mby,
bx, by, bw, bh, rr0, d0[pi*2], d0[pi*2+1],
rr1, d1[pi*2], d1[pi*2+1], hints[pi],
&m0[pi*2], &m0[pi*2+1], &m1[pi*2], &m1[pi*2+1]);
@@ -8772,7 +8772,7 @@ static int rh264_cabac_decode_bslice(rh264_bits *b, const rh264_sps *sps,
if (need_prepare)
{
if (bc->direct_spatial)
rh264_b_direct_prepare(bc, mvg, gwmax, ghmax, mbx, mby,
rh264_b_direct_prepare(mvg, gwmax, ghmax, mbx, mby,
&l0r, &l1r, &pm0x, &pm0y, &pm1x, &pm1y);
for (p = 0; p < 4; p++)
if (rh264_b_sub_pdir[sub[p]] == 3)
+21 -13
View File
@@ -38,6 +38,13 @@
#define RH264_PMAX ((1 << bd) - 1)
#define RH264_PHALF (1 << (bd - 1))
#endif
/* 'bd' sets the ceiling only above 8 bits; the 8-bit kernels that take
* it for the shared signature leave it unread */
#if RH264_BD == 8 && defined(__GNUC__)
#define RH264_BDPARAM int bd __attribute__((__unused__))
#else
#define RH264_BDPARAM int bd
#endif
#define RH264_CLIP(v) ((v)<0?0:((v)>RH264_PMAX?RH264_PMAX:(v)))
/* the unshifted 6-tap sums of the luma interpolation: up to 52 * 255
* fits sixteen bits; 52 * 16383 does not (it overflowed at 10 bits,
@@ -49,7 +56,7 @@
#endif
static void RH264_FN(add_bypass)(RH264_PEL *dst, int stride,
const int32_t *r, int rstride, int w, int h, int bd)
const int32_t *r, int rstride, int w, int h, RH264_BDPARAM)
{
int x, y;
for (y = 0; y < h; y++)
@@ -63,7 +70,7 @@ static void RH264_FN(add_bypass)(RH264_PEL *dst, int stride,
}
}
static void RH264_FN(intra16x16)(RH264_PEL *dst,int stride,int mode,int have_up,int have_left, int bd){
static void RH264_FN(intra16x16)(RH264_PEL *dst,int stride,int mode,int have_up,int have_left, RH264_BDPARAM){
int x,y; const RH264_PEL *up=dst-stride;
/* Vertical(0)/Horizontal(1)/Plane(3) require the corresponding neighbours;
* fall back to DC(2) if unavailable rather than read out of bounds. */
@@ -94,7 +101,7 @@ static void RH264_FN(intra16x16)(RH264_PEL *dst,int stride,int mode,int have_up,
* macroblock; the plane mode's vertical term is built from sixteen
* neighbours rather than eight and scaled to match. */
static void RH264_FN(intra_chroma_h)(RH264_PEL *dst,int stride,int mode,
int have_up,int have_left,int ch, int bd){
int have_up,int have_left,int ch, RH264_BDPARAM){
int x,y; const RH264_PEL *up=dst-stride;
/* Horizontal(1)/Vertical(2)/Plane(3) require the corresponding neighbours.
* A conformant stream never signals them when unavailable, but arbitrary
@@ -136,7 +143,7 @@ static void RH264_FN(intra_chroma_h)(RH264_PEL *dst,int stride,int mode,
}
/* Intra_4x4 (8.3.1.2). p[] samples: p[-1,-1]=C, p[x,-1]=T[0..7] (top+topright),
* p[-1,y]=L[0..3]. avail flags gate which samples are valid. */
static void RH264_FN(intra4x4)(RH264_PEL *dst,int stride,int mode,int have_up,int have_left,int have_up_right,int have_ul, int bd){
static void RH264_FN(intra4x4)(RH264_PEL *dst,int stride,int mode,int have_up,int have_left,int have_up_right,int have_ul, RH264_BDPARAM){
const RH264_PEL *up=dst-stride; RH264_PEL L[4],C,T[8]; int x,y;
for(y=0;y<4;y++)L[y]=have_left?dst[y*stride-1]:0;
C=have_ul?dst[-stride-1]:0;
@@ -191,7 +198,7 @@ static void RH264_FN(intra4x4)(RH264_PEL *dst,int stride,int mode,int have_up,in
* (8.3.2.2.1), then apply the requested mode. Mode numbering matches the
* 4x4 modes. */
static void RH264_FN(intra8x8)(RH264_PEL *dst, int stride, int mode,
int have_up, int have_left, int have_ul, int have_ur, int bd)
int have_up, int have_left, int have_ul, int have_ur, RH264_BDPARAM)
{
/* p[0]=corner, p[1..16]=top row (incl. top-right 8), p[17..24]=left */
int p[25], q[25];
@@ -321,7 +328,7 @@ static void RH264_FN(intra8x8)(RH264_PEL *dst, int stride, int mode,
/* Filter one luma sample line across an edge (p3..p0 | q0..q3), stride s.
* bS in 1..4. a=alpha, be=beta, tc0v from table (unused for bS==4). */
static void RH264_FN(filter_luma_edge)(RH264_PEL *e,int s,int bS,int a,int be,int tc0v, int bd)
static void RH264_FN(filter_luma_edge)(RH264_PEL *e,int s,int bS,int a,int be,int tc0v, RH264_BDPARAM)
{
int p0=e[-1*s],p1=e[-2*s],p2=e[-3*s],p3=e[-4*s];
int q0=e[0],q1=e[1*s],q2=e[2*s],q3=e[3*s];
@@ -399,7 +406,7 @@ static RH264_INLINE uint8x8_t RH264_FN(neon_load4)(const RH264_PEL *s)
* rather than a sample at a time: unpack the predicted bytes into
* 16-bit lanes, add, and pack back with unsigned saturation, which
* performs the clip to [0,RH264_PMAX] for free. */
static void RH264_FN(add_residual)(RH264_PEL *dst,int stride,const int32_t *r,int n, int bd)
static void RH264_FN(add_residual)(RH264_PEL *dst,int stride,const int32_t *r,int n, RH264_BDPARAM)
{
int y;
#if RH264_BD == 8 && defined(RH264_SSE2)
@@ -882,7 +889,7 @@ static void RH264_FN(filter_luma_edge_n)(RH264_PEL *e, int s, int ls, int n,
}
/* Filter one chroma sample across an edge. */
static void RH264_FN(filter_chroma_edge)(RH264_PEL *e,int s,int bS,int a,int be,int tc0v, int bd)
static void RH264_FN(filter_chroma_edge)(RH264_PEL *e,int s,int bS,int a,int be,int tc0v, RH264_BDPARAM)
{
int p1=e[-2*s],p0=e[-1*s],q0=e[0],q1=e[1*s];
if(RH264_ABS(p0-q0)>=a||RH264_ABS(p1-p0)>=be||RH264_ABS(q1-q0)>=be) return;
@@ -1463,7 +1470,7 @@ static RH264_INLINE uint8x8_t RH264_FN(neon_j8)(const int16_t *r0,
* stacks; the 8-bit instantiation keeps them local. */
static void RH264_FN(mc_luma)(RH264_PEL *dst, int dstride,
const RH264_PEL *ref, int rstride, int rw, int rh,
int ox, int oy, int bw, int bh, int mvx, int mvy, int bd,
int ox, int oy, int bw, int bh, int mvx, int mvy, RH264_BDPARAM,
void *scratch)
{
int fx = mvx & 3, fy = mvy & 3;
@@ -1872,7 +1879,7 @@ static void RH264_FN(mc_luma)(RH264_PEL *dst, int dstride,
* mv directly as 1/8-pel offsets (4:2:0 -> chroma mv = luma mv, 1/8 units). */
static void RH264_FN(mc_chroma)(RH264_PEL *dst, int dstride,
const RH264_PEL *ref, int rstride, int rw, int rh,
int ox, int oy, int bw, int bh, int mvx, int mvy, int bd)
int ox, int oy, int bw, int bh, int mvx, int mvy)
{
int ix = ox + (mvx >> 3);
int iy = oy + (mvy >> 3);
@@ -1998,7 +2005,7 @@ static void RH264_FN(mc_chroma)(RH264_PEL *dst, int dstride,
/* d[i] = clip(((d[i]*w + rnd) >> sh) + o): explicit weighting of one
* prediction in place (8.4.2.3.2; rnd is 1<<(sh-1), or 0 when sh is 0). */
static void RH264_FN(wp_row)(RH264_PEL *d, int n, int w, int rnd, int sh, int o, int bd)
static void RH264_FN(wp_row)(RH264_PEL *d, int n, int w, int rnd, int sh, int o, RH264_BDPARAM)
{
int x = 0;
#if RH264_BD == 8 && defined(RH264_SSE2)
@@ -2065,7 +2072,7 @@ static void RH264_FN(wp_row)(RH264_PEL *d, int n, int w, int rnd, int sh, int o,
* inside one setup instead. */
static void RH264_FN(bi_block)(RH264_PEL *d, int dstride,
const RH264_PEL *s0, int s0stride, const RH264_PEL *s1, int s1stride,
int w, int h, int w0, int w1, int bias, int sh, int o, int bd)
int w, int h, int w0, int w1, int bias, int sh, int o, RH264_BDPARAM)
{
int y;
#if RH264_BD == 8 && defined(RH264_SSE2)
@@ -2165,7 +2172,7 @@ static void RH264_FN(bi_block)(RH264_PEL *d, int dstride,
/* (s0 + s1 + 1) >> 1 per sample: the default bi-prediction (8.4.2.3.1) */
static void RH264_FN(avg_block)(RH264_PEL *d, int dstride,
const RH264_PEL *s0, int s0s, const RH264_PEL *s1, int s1s,
int w, int h, int bd)
int w, int h)
{
int x, y;
for (y = 0; y < h; y++)
@@ -2202,6 +2209,7 @@ static void RH264_FN(avg_block)(RH264_PEL *d, int dstride,
}
#undef RH264_PMAX
#undef RH264_BDPARAM
#undef RH264_PHALF
#undef RH264_CLIP
#undef RH264_HB
+2 -2
View File
@@ -4605,7 +4605,7 @@ static void rh265_row_done(rh265_video *v, rh265_dec *d, int ry)
/* The finish: whatever the hook left - the last row's SAO, or the
* whole picture when the hook could not run. */
static int rh265_filters_finish(rh265_video *v, rh265_dec *d)
static int rh265_filters_finish(rh265_dec *d)
{
const rh265_sps *sps = d->sps;
int ctb = 1 << sps->log2_ctb;
@@ -4860,7 +4860,7 @@ static void rh265_ctx_run_slices(rh265_video *v, rh265_dec *d)
if (d->job_rc == 0 && d->cur && d->ctb_end >= d->sps->pic_size_ctbs
&& !d->completed)
{
if (rh265_filters_finish(v, d) < 0)
if (rh265_filters_finish(d) < 0)
d->job_rc = -1;
d->completed = 1;
}
@@ -20,6 +20,10 @@ def fnv(data):
value = ((value ^ byte) * 16777619) & 0xffffffff
return f'{value:08x}'
# ffprobe's names for the ISO/IEC 23091-4 code points these streams use
CODE = {'gbr': 0, 'bt709': 1, 'unknown': 2}
RANGE = {'tv': 0, 'pc': 1}
exe = str(Path(os.environ.get('AV1_CONTAINER_TEST', './rav1_container_test')).resolve())
with tempfile.TemporaryDirectory(prefix='rav1-') as directory:
cases = [('420-8', 'yuv420p', 8, 0), ('420-10', 'yuv420p10le', 10, 0),
@@ -46,7 +50,14 @@ with tempfile.TemporaryDirectory(prefix='rav1-') as directory:
stream = oracle['streams'][0]
assert stream['codec_name'] == 'av1'
private = raw_dump(stream['extradata'])
expected = [f"S {stream['width']} {stream['height']} {depth} 1 1 1 0", f"C {stream['width']} {stream['height']} {profile} {depth} {len(private)} {fnv(private)}"]
# The colour comes from what ffprobe read in this stream, not
# from what was asked for: libaom 3.13 writes a monochrome
# sequence as full range with no matrix whatever it is told
colour = (CODE[stream.get('color_primaries', 'unknown')],
CODE[stream.get('color_transfer', 'unknown')],
CODE[stream.get('color_space', 'unknown')],
RANGE[stream.get('color_range', 'tv')])
expected = [f"S {stream['width']} {stream['height']} {depth} %u %u %u %u" % colour, f"C {stream['width']} {stream['height']} {profile} {depth} {len(private)} {fnv(private)}"]
for packet in oracle['packets']:
data = raw_dump(packet['data'])
timestamp = int(int(packet['pts']) * Fraction(stream['time_base']) * 1000000000)
@@ -5,7 +5,7 @@
#include <string.h>
static uint8_t bytes[4096];
static size_t used, config_at, media_at, color_at;
static size_t used, config_at, media_at;
static const uint8_t config[] = {0x81, 0x00, 0x0c, 0x00, 0x0a, 0x09, 0x00, 0x00,
0x00, 0x02, 0xaf, 0xff, 0x80, 0x00, 0x01};
static const uint8_t packet[] = {0x32, 0x05, 0x0e, 0xff, 0x40,
@@ -22,16 +22,15 @@ static void be32(uint32_t n)
put(n >> 8);
put(n);
}
static void zeros(size_t n)
{
while (n--)
put(0);
}
static void copy(const void *p, size_t n)
{
memcpy(bytes + used, p, n);
used += n;
}
/* the MP4 boxes, which a WebM-only test leaves out */
#ifndef RAV1_MP4_FIXTURE_WRITER_ONLY
static size_t color_at;
static void patch32(size_t at, uint32_t n)
{
bytes[at] = n >> 24;
@@ -39,6 +38,11 @@ static void patch32(size_t at, uint32_t n)
bytes[at + 2] = n >> 8;
bytes[at + 3] = n;
}
static void zeros(size_t n)
{
while (n--)
put(0);
}
static size_t box(const char *name)
{
size_t at = used;
@@ -50,7 +54,6 @@ static void end_box(size_t at)
{
patch32(at, (uint32_t)(used - at));
}
static void make_mp4_clip(int with_config, int hdr)
{
static const uint8_t cll[] = {0x2a, 6, 1, 3, 232, 1, 144, 128};
@@ -193,10 +196,6 @@ static void make_mp4_clip(int with_config, int hdr)
end_box(b);
patch32(chunk, (uint32_t)media_at);
}
static void make_mp4(int with_config)
{
make_mp4_clip(with_config, 0);
}
#endif
#endif
@@ -100,7 +100,7 @@ static void test_stream(void)
video_hw_frame_t frame;
unsigned i, w = 0, h = 0, before;
int duration = 0, frames = 0, loops = 0, ret = 2;
make_mp4(1);
make_mp4_clip(1, 0);
CHECK(!rmp4_video_stream_open(bytes, used));
CHECK(!opens);
s = rmp4_video_stream_open_hw_avail(
@@ -159,7 +159,7 @@ static void test_seek(void)
unsigned before, n;
int ret = 0;
int64_t position = -1;
make_mp4(1);
make_mp4_clip(1, 0);
s = rmp4_video_stream_open_hw_avail(bytes, used,
media_at + sizeof(packet) - 1, NULL, NULL, NULL);
CHECK(s != NULL);
@@ -197,7 +197,7 @@ static void test_color(void)
const uint32_t *marker = NULL;
for (transfer = 16; transfer <= 18; transfer += 2)
{
make_mp4(1);
make_mp4_clip(1, 0);
bytes[color_at + 1] = 9;
bytes[color_at + 3] = (uint8_t)transfer;
bytes[color_at + 5] = 9;
@@ -218,7 +218,7 @@ static void test_color(void)
}
CHECK(opens == before + 2);
before = opens;
make_mp4(1);
make_mp4_clip(1, 0);
bytes[color_at + 6] = 128;
s = rmp4_video_stream_open_hw_avail(bytes, used, used, NULL, NULL, NULL);
CHECK(s != NULL);
@@ -229,7 +229,7 @@ static void test_color(void)
}
CHECK(opens == before);
marker = NULL;
make_mp4(1);
make_mp4_clip(1, 0);
bytes[color_at + 5] = 1;
s = rmp4_video_stream_open_hw_avail(bytes, used, used, NULL, NULL, NULL);
CHECK(s != NULL);
@@ -504,7 +504,7 @@ static void test_unavailable(void)
{
rmp4_video_stream_t *s;
unsigned before = opens;
make_mp4(1);
make_mp4_clip(1, 0);
rav1_set_hw_backend(NULL);
s = rmp4_video_stream_open_hw_avail(bytes, used, used, NULL, NULL, NULL);
CHECK(s != NULL);
@@ -1,6 +1,8 @@
/* SPDX-License-Identifier: MIT */
#ifndef RAV1_WEBM_FIXTURE_H
#define RAV1_WEBM_FIXTURE_H
/* the byte writer only: a WebM test never builds an MP4 */
#define RAV1_MP4_FIXTURE_WRITER_ONLY
#include "rav1_mp4_fixture.h"
static size_t element(uint32_t id)
+1 -1
View File
@@ -2,7 +2,7 @@ CC ?= cc
LRC := ../../..
CFLAGS += -O1 -g1 -std=c89 -pedantic -Wall -Wextra -Werror -Wframe-larger-than=2048 -I$(LRC)/include
ifneq ($(findstring clang,$(shell $(CC) --version 2>/dev/null)),)
CFLAGS += -Wno-c99-extensions
CFLAGS += -Wno-c99-extensions -Wno-c11-extensions
endif
ifneq ($(SANITIZER),)
CFLAGS += -fsanitize=$(SANITIZER) -fno-omit-frame-pointer
@@ -474,10 +474,12 @@ int main(void)
"-x265-params crf=24:sao=1:deblock=1:bframes=3:b-pyramid=1:wpp=0:frame-threads=1");
oracle_case("lossy_ctu16", "mandelbrot=s=176x144:r=10", 6, "yuv420p",
"-x265-params crf=24:ctu=16:sao=1:deblock=1:bframes=2:wpp=0:frame-threads=1");
/* One worker: x265 4.1 encoding two slices on several threads writes
* slice headers no decoder can read, ffmpeg's included */
oracle_case("multi_slice_b", "mandelbrot=s=256x256:r=10", 12, "yuv420p",
"-x265-params crf=24:slices=2:bframes=3:b-pyramid=1:wpp=1:frame-threads=1");
"-x265-params crf=24:slices=2:bframes=3:b-pyramid=1:wpp=1:frame-threads=1:pools=1");
oracle_case("multi_slice_10", "mandelbrot=s=256x256:r=10", 12, "yuv420p10le",
"-x265-params crf=24:slices=2:bframes=3:b-pyramid=1:wpp=1:frame-threads=1");
"-x265-params crf=24:slices=2:bframes=3:b-pyramid=1:wpp=1:frame-threads=1:pools=1");
#ifdef HAVE_THREADS
if (g_pool)
tpool_destroy((tpool_t*)g_pool);
@@ -14,7 +14,7 @@ flags = [
"-I" + str(root / "include"),
]
if "clang" in subprocess.check_output(compiler + ["--version"], text=True):
flags += ["-Wno-c99-extensions"]
flags += ["-Wno-c99-extensions", "-Wno-c11-extensions"]
with tempfile.TemporaryDirectory(prefix="rvp9-stack-") as directory:
for threaded in (False, True):
name = "threaded" if threaded else "threadless"
+1 -1
View File
@@ -3,7 +3,7 @@ LRC := ../../..
include ../../sample_objdir.mk
CFLAGS += -O1 -g1 -std=c89 -pedantic -Wall -Wextra -Werror -Wframe-larger-than=2048 -I$(LRC)/include
ifneq ($(findstring clang,$(shell $(CC) --version 2>/dev/null)),)
CFLAGS += -Wno-c99-extensions
CFLAGS += -Wno-c99-extensions -Wno-c11-extensions
endif
ifneq ($(SANITIZER),)
CFLAGS += -fsanitize=$(SANITIZER) -fno-omit-frame-pointer
+1 -1
View File
@@ -2,7 +2,7 @@ CC ?= cc
CFLAGS += -DHAVE_THREADS -O1 -g1 -std=c89 -pedantic -Wall -Wextra -Werror -Wno-long-long -Wframe-larger-than=2048 -I../../../libretro-common/include
ifneq ($(findstring clang,$(shell $(CC) --version 2>/dev/null)),)
# boolean.h uses the compiler _Bool spelling in C89 builds.
CFLAGS += -Wno-c99-extensions
CFLAGS += -Wno-c99-extensions -Wno-c11-extensions
endif
ifneq ($(SANITIZER),)
CFLAGS += -fsanitize=$(SANITIZER) -fno-omit-frame-pointer
+16 -7
View File
@@ -6,7 +6,7 @@
# run_vm.sh --kernel-version (prints the kernel it would fetch)
#
# KERNEL_DIR, when set, names a directory holding vmlinuz and vkms.ko;
# otherwise Ubuntu's current HWE kernel is fetched with apt-get download
# otherwise the runner release's current HWE kernel is fetched with apt-get download
# into VKMS_CACHE (default .kernel here) and taken from there. Needs
# qemu-system-x86_64, a static busybox, zstd and cpio; uses KVM where
# /dev/kvm can be opened, and plain emulation otherwise.
@@ -15,10 +15,16 @@ set -eu
here=$(cd "$(dirname "$0")" && pwd)
. "$here/fetch_debs.sh"
# The kernel the runner's own release tracks: its HWE metapackage, or
# the plain generic one on a release that has none yet
hwe_kernel() {
apt-cache depends linux-image-generic-hwe-24.04 2>/dev/null \
| sed -n 's/.*Depends: linux-image-\([0-9][^ ]*-generic\)$/\1/p' \
| head -n 1
rel=$(. /etc/os-release && echo "$VERSION_ID")
for meta in "linux-image-generic-hwe-$rel" linux-image-generic; do
k=$(apt-cache depends "$meta" 2>/dev/null \
| sed -n 's/.*Depends: linux-image-\([0-9][^ ]*-generic\)$/\1/p' \
| head -n 1)
[ -n "$k" ] && { echo "$k"; return; }
done
}
# Lists the runner never refreshed name no kernel: refreshed once
if [ -z "$(hwe_kernel)" ] && command -v sudo >/dev/null 2>&1; then
@@ -49,13 +55,16 @@ if [ -z "${KERNEL_DIR:-}" ]; then
download_debs "$work/deb" "linux-image-unsigned-$kver" \
"linux-modules-$kver" \
|| { echo "run_vm.sh: could not fetch $kver"; exit 1; }
# vkms is in the modules, or in the extra ones, by kernel
download_debs "$work/deb" "linux-modules-extra-$kver" || true
# vkms is in the modules, or in the extra ones on a kernel that
# still splits them out
if apt-cache show "linux-modules-extra-$kver" >/dev/null 2>&1; then
download_debs "$work/deb" "linux-modules-extra-$kver" || true
fi
for d in "$work"/deb/*.deb; do
dpkg-deb -x "$d" "$work/root"
done
cp "$work/root/boot/vmlinuz-$kver" "$KERNEL_DIR/vmlinuz"
ko=$(find "$work/root/lib/modules" -name 'vkms.ko*' | head -n 1)
ko=$(find "$work/root" -path "*/lib/modules/*" -name 'vkms.ko*' | head -n 1)
[ -n "$ko" ] || { echo "run_vm.sh: $kver has no vkms"; exit 1; }
case $ko in
*.zst) zstd -dqf "$ko" -o "$KERNEL_DIR/vkms.ko" ;;
@@ -503,10 +503,17 @@ def main():
audio_large_packet(j('trailing_small.mp4'), j('audio_large_packet.m4a'))
audio_large_packet(j('trailing_small.mp4'), j('audio_seek_gap.m4a'),
32 * 1024 * 1024)
# trailing moov well past any plausible head
# trailing moov well past any plausible head. The picture loops; the
# sound is one track encoded whole, since a looped copy carries each
# loop's priming frame and, from ffmpeg 8, a timestamp gap at every
# seam, which a decode that honours timestamps fills and ffmpeg's
# raw decode, the audio oracle's reference, does not
subprocess.check_call(['ffmpeg', '-v', 'error', '-y', '-stream_loop',
'60', '-i', j('seed_4k.mp4'), '-c', 'copy',
j('trailing_large.mp4')])
'60', '-i', j('seed_4k.mp4'),
'-f', 'lavfi', '-i', 'sine=f=440:r=48000',
'-map', '0:v', '-map', '1:a', '-c:v', 'copy',
'-c:a', 'aac', '-b:a', '64k', '-ac', '2',
'-shortest', j('trailing_large.mp4')])
# trailing moov at 7.28 GB, co64 offsets past 4 GiB
trailing_padded(j('seed_4k.mp4'), j('trailing_huge.mp4'), BIG)
# leading moov at 7.28 GB, media past 4 GiB
+1 -1
View File
@@ -3,7 +3,7 @@ THREADS ?= 1
TARGET := media_controls_test
CFLAGS += -O2 -g1 -std=c89 -pedantic -Wall -Wextra -Werror -Wno-long-long -Wno-unused-parameter -Wframe-larger-than=4096 -D_GNU_SOURCE -I../../.. -I../../../libretro-common/include
ifneq ($(findstring clang,$(shell $(CC) --version 2>/dev/null)),)
CFLAGS += -Wno-c99-extensions
CFLAGS += -Wno-c99-extensions -Wno-c11-extensions
endif
LRC := ../../../libretro-common
SOURCES := media_controls_test.c ../../../gfx/gfx_media_display.c ../../../gfx/gfx_media_controls.c ../../../menu/menu_media_controls.c \
+1 -1
View File
@@ -1,7 +1,7 @@
CC ?= cc
CFLAGS += -O2 -std=c89 -pedantic -Wall -Wextra -Werror -Wno-long-long -Wframe-larger-than=2048 -fstack-usage -I../../../libretro-common/include
ifneq ($(findstring clang,$(shell $(CC) --version 2>/dev/null)),)
CFLAGS += -Wno-c99-extensions
CFLAGS += -Wno-c99-extensions -Wno-c11-extensions
endif
ifneq ($(SANITIZER),)
CFLAGS += -fsanitize=$(SANITIZER) -fno-omit-frame-pointer
+1 -1
View File
@@ -39,7 +39,7 @@ STRICT_FLAGS := -std=c89 -pedantic -Wdeclaration-after-statement \
-Wframe-larger-than=4096 -Werror
ifneq ($(findstring clang,$(shell $(CC) --version 2>/dev/null)),)
# boolean.h uses the compiler _Bool spelling in C89 builds.
STRICT_FLAGS += -Wno-c99-extensions
STRICT_FLAGS += -Wno-c99-extensions -Wno-c11-extensions
endif
$(STRICT_OBJS): CFLAGS += $(STRICT_FLAGS)
+1 -1
View File
@@ -9,7 +9,7 @@ CFLAGS += -fsanitize=$(SANITIZER) -fno-omit-frame-pointer
LDFLAGS += -fsanitize=$(SANITIZER)
endif
ifneq ($(findstring clang,$(shell $(CC) --version 2>/dev/null)),)
CFLAGS += -Wno-c99-extensions
CFLAGS += -Wno-c99-extensions -Wno-c11-extensions
endif
all: $(TARGET) $(TARGET_NOTHREADS)
$(TARGET): gpu_reinit_test.c $(ROOT)/record/record_gpu_reinit.c $(ROOT)/record/record_driver.h
+1 -1
View File
@@ -1,7 +1,7 @@
CC ?= cc
CFLAGS += -O1 -g1 -std=c89 -pedantic -Wall -Wextra -Werror -Wno-long-long -Wframe-larger-than=2048 -I../../../libretro-common/include
ifneq ($(findstring clang,$(shell $(CC) --version 2>/dev/null)),)
CFLAGS += -Wno-c99-extensions
CFLAGS += -Wno-c99-extensions -Wno-c11-extensions
endif
ifneq ($(SANITIZER),)
CFLAGS += -fsanitize=$(SANITIZER) -fno-omit-frame-pointer
+1 -1
View File
@@ -3,7 +3,7 @@ RA := ../../..
CFLAGS += -DHAVE_THREADS -O1 -g1 -std=c89 -pedantic -Wall -Wextra -Werror -Wno-long-long -Wframe-larger-than=2048 -I$(RA)/libretro-common/include
ifneq ($(findstring clang,$(shell $(CC) --version 2>/dev/null)),)
# The project boolean.h uses clang's _Bool spelling in C89 as well.
CFLAGS += -Wno-c99-extensions
CFLAGS += -Wno-c99-extensions -Wno-c11-extensions
endif
ifneq ($(SANITIZER),)
CFLAGS += -fsanitize=$(SANITIZER) -fno-omit-frame-pointer
+5 -2
View File
@@ -163,8 +163,11 @@ def plan(wf):
if not keep_workflows:
paths += ['!.github/workflows/*.yml']
if not keep_samples:
paths += [d + '/**' for d in sorted(dirs) if d.count('/') >= 2]
paths += [d + '/**' for d in sorted(dirs) if d.count('/') < 2]
# A file at a tree's top (a stub several samples link) is
# filtered by its own path, not as a directory
glob = lambda d: d if os.path.isfile(os.path.join(c.ROOT, d)) else d + '/**'
paths += [glob(d) for d in sorted(dirs) if d.count('/') >= 2]
paths += [glob(d) for d in sorted(dirs) if d.count('/') < 2]
if not keep_workflows:
paths.append('.github/workflows/' + wf.file)
if paths == ['**']: