Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion `av1_is_subpelmv_in_range(&ms_params.m v_limits, start_mv)' failed. #2608

Open
s1ddok opened this issue Feb 11, 2025 · 10 comments
Open

Comments

@s1ddok
Copy link

s1ddok commented Feb 11, 2025

What does it typically mean? I'm repacking huge amount of data and most of it proceeeds fine, but some files are crashing with this error:

avifenc: /home/avolodin/projects/libavif/build/_deps/libaom-src/av1/encoder/nonrd_pickmode.c:348: search_new_mv: Assertion `av1_is_subpelmv_in_range(&ms_params.m
v_limits, start_mv)' failed.       

died with <Signals.SIGABRT: 6>. 

I've built v1.1.1 myself from source, using it with libaom v.3.9.1

@y-guyon
Copy link
Collaborator

y-guyon commented Feb 11, 2025

https://aomedia.googlesource.com/aom/+/refs/tags/v3.9.1/av1/encoder/nonrd_pickmode.c#348 does not provide more context.

Could you attach a file that reproduces the issue, along with the exact compile flags and avifenc command?

@s1ddok
Copy link
Author

s1ddok commented Feb 11, 2025

I think I can't as I'm repacking proprietary business data... I'm repacking a bunch of JPGs into an animated AVIF. What do you think I can do to further investigate the reason?

@y-guyon
Copy link
Collaborator

y-guyon commented Feb 11, 2025

You can try filing a bug with libaom directly, see https://aomedia.googlesource.com/aom/#bug-reports.
Without a way to reproduce the issue, it is unlikely to be fixed though.

I am not familiar with this code. Assuming this assertion is safe to ignore, try building in Release to skip it.
Do you have issues only with Debug binaries?

@s1ddok
Copy link
Author

s1ddok commented Feb 11, 2025

I thought I'm running Release as I copied build command from README, do you think it is a debug?

@y-guyon
Copy link
Collaborator

y-guyon commented Feb 11, 2025

You mean https://github.com/AOMediaCodec/libavif?tab=readme-ov-file#build-everything-from-scratch?

Could you give the exact command lines you used to build the binaries and the exact command lines you used to call the binaries please?

@s1ddok
Copy link
Author

s1ddok commented Feb 13, 2025

yes, I'm still struggling with it:

git clone -b v1.1.1 https://github.com/AOMediaCodec/libavif.git
cmake -S libavif -B libavif/build -DBUILD_SHARED_LIBS=OFF -DAVIF_CODEC_AOM=LOCAL -DAVIF_LIBYUV=LOCAL -DAVIF_LIBSHARPYUV=LOCAL -DAVIF_JPEG=LOCAL -DAVIF_ZLIBPNG=LOCAL -DAVIF_BUILD_APPS=ON -DCMAKE_C_FLAGS_RELEASE="-static" -DCMAKE_EXE_LINKER_FLAGS="-static"
cmake --build libavif/build --parallel

I followed build instrunctions exactly form the link you point to and then calling avifenc with the following command:

            command = [
                str(script_dir / "bin" / "linux" / "avifenc"),
                *file_paths,
                str(output_file),
                "-q", str(quality),
                "-a", "aq-mode=1",
                "-a", "deltaq-mode=3",
                "-a", "enable-qm=1",
                "-a", "sharpness=1",
                "-a", "enable-chroma-deltaq=1",
                "--speed", str(speed),
                "-k", "125",
                "--autotiling",
                "--fps", str(fps)
            ]

it works on majority of my jpg files but fails on some of them with the above error. I've tried passing -DCMAKE_BUILD_TYPE=Release but it didn't seem to change anything...

@y-guyon
Copy link
Collaborator

y-guyon commented Feb 13, 2025

Thank you. I do not see any blatant problem with the command lines you shared.

I would suggest:

  • Try to reproduce the issue with files that you can share, by first finding public data with permissive licenses. Once again a way to reproduce the issue is necessary to easily debug it and to properly fix it. If sharing a file privately is an option for you, you can also send it to me by email (yguyon at google dot com).
  • Remove avifenc flags one by one in case there is a single culprit, which would help in identifying the root cause and maybe solve your issue in the short term if you can live without using that flag.

@s1ddok
Copy link
Author

s1ddok commented Feb 13, 2025

I think I can send data privately! Just to clarify: did the command I used for build (from README) builds a release build? if so, why does executable prints my local paths to files during the assertion? I've tried to build aom manually from ext/ folder but it didn't change anything.

@y-guyon
Copy link
Collaborator

y-guyon commented Feb 13, 2025

Just to clarify: did the command I used for build (from README) builds a release build?

It should.

if so, why does executable prints my local paths to files during the assertion?

It should not. This is a separate issue filed as #2616.

@s1ddok
Copy link
Author

s1ddok commented Mar 4, 2025

@y-guyon I'm sorry for the delay -- I've sent the data sample and reproduction command on provided e-mail, I hope it will help to resolve the problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants