Commit Graph

22 Commits

Author SHA1 Message Date
Davis E. King
46e59a2174
Disable mac osx CI 2023-12-07 22:28:12 -05:00
Davis King
efaa213b6e remove clang 13 CI since the install method isn't working anymore and we have another test for clang 2023-07-27 20:18:13 -04:00
Adrià Arrufat
7b6021eee7
Only trigger CI when relevant files are changed (#2836) 2023-07-23 09:02:21 -04:00
Davis E. King
6893653428
Ubuntu 18.04 Actions runner image is deprecated, use newer image (#2759)
* Ubuntu 18.04 Actions runner image is deprecated, use newer image

See https://github.blog/changelog/2022-08-09-github-actions-the-ubuntu-18-04-actions-runner-image-is-being-deprecated-and-will-be-removed-by-12-1-22/

* make it really use gcc 7
2023-04-04 08:59:27 -04:00
pfeatherstone
f586d0a552
FFMPEG : misc + ffmpeg5 support (#2746)
* - enhanced list_muxers()
- added fail() error handling helper function
- moved framerate setting to decoder_image_args

* docs

* oops

* - don't use std::endl, use `\n` instead
- use fail(). See, on average, it removes lines of code

* convenient constructor for demuxer

* ffmpeg5 support

* added docs for == -1

* oops

* grouping audio channel compatibility stuff together

* more compatibility stuff

* more channel abstractions

* build with ffmpeg 5

* install assembler

* cache the installation

* cmake doesn't like using ~ in filepath

* at some point this will work

* i think i need to change the key

* test FFmpeg-n5.1.3_try3 cache

* bug fix

* Update build_cpp.yml

Giving this another go

* Update build_cpp.yml

Disable building documentation and CLI tools

* Update CMakeLists.txt

Fix cmake script when using 3.8.0 and expecting imported targets to work when there are link flags included

* - use environment variables
- on ubuntu 18 gcc7, use ffmpeg 3.2.18

* correct way of dereferencing variables ?

* can't get variables to work

* Revert "can't get variables to work"

This reverts commit 5eef96a43e.

* Revert "correct way of dereferencing variables ?"

This reverts commit e8ff95f5c6.

* Revert "- use environment variables"

This reverts commit a6938333d5.

* using ffmpeg 3.2.18 with ubuntu18 gcc7

* Update build_cpp.yml

Disable ubuntu18 job for now. Hopefully no more cancelled jobs, then i can re-enable

* Re-enabled ubuntu18 job. Hopefully this time it won't get cancelled

* Fixed bad indentation

* Can go in details namespace

* Update dlib/CMakeLists.txt

Co-authored-by: Davis E. King <davis685@gmail.com>

* use details namespace

* remove declaration. It's in details now

* don't need get_channels_from_layout()

---------

Co-authored-by: pf <pf@me>
Co-authored-by: Davis E. King <davis685@gmail.com>
2023-03-29 22:12:47 -04:00
Davis E. King
9a13229970
Exercise more of the ways dlib can be configured in the github actions tests (#2751) 2023-03-25 22:52:41 -04:00
Davis E. King
53d2ceb669
test with cmake 3.8 since that's the min required cmake version for dlib (#2748)
* test with cmake 3.8 since that's the min required cmake version for dlib
2023-03-24 22:25:40 -04:00
pfeatherstone
9d3ba472dd
FFMPEG wrappers: dlib::ffmpeg::decoder and dlib::ffmpeg::demuxer (#2707)
* - added ffmpeg stuff to cmake

* - added observer_ptr

* ffmpeg utils

* WIP

* - added ffmpeg_decoder

* config file for test data

* another test file

* install ffmpeg

* added ffmpeg_demuxer

* install all ffmpeg libraries

* support older version of ffmpeg

* simplified loop

* - test converting to dlib object
- added docs
- support older ffmpeg

* added convert() overload

* added comment

* only register stuff when API not deprecated

* - fixed version issues
- fixed decoding

* added tests for ffmpeg_demuxer

* removed unused code

* test GIF

* added docs

* added audio test

* test for audio

* more tests

* review changes

* don't need observer_ptr

* made deps public. I could be wrong but just in case.

* - added some static asserts. Some areas of the code might do memcpy's on arrays of pixels. This requires the structures to be packed. Check this.
- added convert() functions
- changed default decoder options. By default, always decode to RGB and S16 audio
- added convenience constructor to demuxer

* - no longer need opencv

* oops. I let that slip

* - made a few functions public
- more precise requires clauses

* enhanced example

* - avoid FFMPEG_INITIALIZED being optimized away at link time
- added decoding example

* - avoid -Wunused-parameter error

* constexpr and noexcept correctness. This probably makes no difference to performance, BUT, it's what the core guidelines tell you to do. It does however demonstrate how complicated and unecessarily verbose C++ is becoming. Sigh, maybe one day i'll make the switch to something that doesn't make my eyes twitch.

* - simplified metadata structure

* hopefully more educational

* added another example

* ditto

* typo

* screen grab example

* whoops

* avoid -Wunused-parameter errors

* ditto

* - added methods to av_dict
- print the demuxer format options that were not used
- enhanced webcam_face_pose_ex.cpp so you can set webcam options

* if height and width are specified, attempt to set video_size in format_options. Otherwise set the bilinear resizer.

* updated docs

* once again, the ffmpeg APIs do a lot for you. It's a matter of knowing which APIs  to call.

* made header-only

* - some Werror thing

* don't use type_safe_union

* - templated sample type
- reverted deep copy of AVFrame for frame copy constructor

* - added is_pixel_type and is_pixel_check

* unit tests for pixel traits

* enhanced is_image_type type trait and added is_image_check

* added unit tests for is_image_type

* added pix_traits, improved convert() functions

* bug fix

* get rid of -Werror=unused-variable error

* added a type alias

* that's the last of the manual memcpys gone. We'using ffmpeg API everywhere now for copying frames to buffers and back

* missing doc

* set framerate for webcam

* list input devices

* oops. I was trying to make ffmpeg 5 happy but i've given up on ffmpeg v5 compatibility in this PR. Future PR.

* enhanced the information provided by list_input_devices and list_output_devices

* removed vscode settings.json file

* - added a type trait for checking whether a type is complete. This is useful for writing type traits that check other types have type trait specializations. But also other useful things. For example, std::unique_ptr uses something similar to this.

* Davis was keen to simply check pixel_traits is specialised. That's equivalent to checking pixel_traits<> is complete for some type

* code review

* juse use the void_t in dlib/type_traits.h

* one liners

* just need is_image_check

* more tests for is_image_type

* i think this is correct

* removed printf

* better docs

* Keep opencv out of it

* keep old face pose example, then add new one which uses dlib's ffmpeg wrappers

* revert

* revert

* better docs

* better docs

---------

Co-authored-by: pf <pf@me>
2023-01-29 20:17:34 -05:00
Davis E. King
1ce7b9cbc5
Run unit tests with gcc 7 too (#2706) 2023-01-03 10:13:54 -05:00
Adria Arrufat
02330e0a15
Fix GitHub actions on Windows because of CMake 3.25.0 (#2692) 2022-11-28 20:10:47 -05:00
Davis King
4e9854204c Github actions deprecated windows-2016, switching to windows-2019 2022-07-31 17:45:46 -04:00
Davis King
71d95d76d9 more tweaks cleanup and fixes for ci builds 2022-07-12 20:40:11 -04:00
Crayon
6c24e65f86
Fix typos (#2606) 2022-06-17 22:19:11 -04:00
Davis King
8af4226057 Revert "Add a test on github actions that builds on windows in debug mode"
This reverts commit 7009080014.
2022-04-29 22:51:01 -04:00
Davis King
7009080014 Add a test on github actions that builds on windows in debug mode 2022-04-29 22:04:37 -04:00
Adrià Arrufat
9db84f4c24
Build ancillary tools on Windows (#2583)
* Build ancillary tools on Windows

* Fix dtoc name
2022-04-29 21:49:57 -04:00
Davis E. King
4d92c302c0
Remove this test on windows for now since it runs out of ram 2022-04-29 09:43:50 -04:00
Davis King
2bcb1c4436 See if using only one thread to build prevents running out of ram on github actions when building windows examples 2022-04-29 08:39:53 -04:00
Davis King
e264c26641 Build examples and other ancillary tools on windows too 2022-04-29 07:45:51 -04:00
Juha Reunanen
ebc4d63d68
Workaround for #2506 (#2570)
* Do not put variants that can hold immutable types to vectors

* Enable build on gcc 11
2022-04-19 08:02:17 -04:00
Adrià Arrufat
a76f205bf6
Add webp support (#2565)
* Add BGR(A) to pixel_traits

* add support for reading webp

* Apply Davis' suggestions and fix formatting

* Fix signed/unsigned warning

* Update decoding paths

* update pixel traits documentation

* Add support for writing WebP images

* Simplify image_saver code

* WIP: add tests, PSNR is low but images look good

* Add lossless compression for quality > 100

* Fix build when WebP support is disabled

* Use C++ stream instead of C-style FILE

* Fix indentation

* Use reinterpret_cast instead of C-style cast

* Improve impl::impl_save_webp signature

* Remove empty line

* Use switch statement and clean up code

* Update Copyright and test libwebp on Linux

* Fix formatting in github workflow

* Fix operator== for bgr_alpha_pixel

* Show where the test fails

* Add libwebp to CI for the remaining Linux workflows

* Use filename consistently

* Improve message with wrong pixel type

* Fix tests for WebP images

* Prevent saving images which are too large and improve error messages

* Use max dimension from WebP header directly

* Update documentation, index and release notes

* Update dlib/image_saver/save_webp_abstract.h

Co-authored-by: Martin T. H. Sandsmark <martin.sandsmark@kde.org>
Co-authored-by: Davis E. King <davis685@gmail.com>
2022-04-19 07:52:12 -04:00
Davis E. King
f80703e8e6
Make github actions run the python unit tests (#2517)
* Make github actions run the python unit tests

* why don't the pyhton tests run?

* run python tests

* don't run tests twice

* don't run cmake tests twice

* rename the CMake test to C++ since it's testing the C++ part of the library

And the python build uses cmake too, which makes the naming somewhat
confusing

* work around macos

* oops, fix spelling error
2022-02-20 19:05:02 -05:00