Isaac Connor
32a842e81e
Return instead of panic in Delta and Blend
2026-01-19 14:40:28 -06:00
Isaac Connor
9ee497f708
Add toString
2026-01-16 15:44:30 -05:00
Isaac Connor
17a633087c
Create a constructor that takes an allocation parameter so that we can give a larger allocation than buffer size
2026-01-16 15:37:10 -05:00
Isaac Connor
ec913cfc50
When overlaying a greyscale onto rgb32, only set the red field so we don't get white.
2026-01-16 15:29:39 -05:00
Isaac Connor
82554e0f20
Fix compiler complain
2025-12-28 13:09:37 -05:00
Isaac Connor
027fcdaf58
Add debugging to figure out cause of crash
2025-10-23 12:37:08 -04:00
Isaac Connor
643fe97b25
Deprecate zm_av_frame_alloc
2025-09-18 14:48:52 -04:00
Isaac Connor
eaf34434e3
Add constructor and assign direct for avframe
2025-09-18 09:59:39 -04:00
Isaac Connor
e1898c483b
Adjust debug level add AVPixelFormat Image::AVPixFormat(AVPixelFormat new_pixelformat)
2025-09-18 09:42:03 -04:00
Isaac Connor
4757d711ef
Change various cases of int img_buffer_size to size_t
2025-07-19 14:18:32 -04:00
Isaac Connor
69e3694854
Must use struct here as there is a name collision with flock()
2025-04-08 20:06:16 -04:00
Isaac Connor
220d7beb46
Individually set flock options, to simplifybsd support.
2025-04-08 10:21:38 -04:00
Isaac Connor
a993ddb584
POpulateFrame can be const
2024-07-09 08:13:16 -04:00
Aaron Kling
c4683d90a9
Format code using astyle google format
...
Commands used:
astyle --style=google --indent=spaces=2 --keep-one-line-blocks src/*.cpp
astyle --style=google --indent=spaces=2 --keep-one-line-blocks src/*.h
2024-03-26 13:43:58 -05:00
Isaac Connor
31091d0fd3
Handle out of bounds access to global_edges if it is empty
2024-01-29 13:12:30 -05:00
Isaac Connor
27cfd11d95
Increase debug log leve
2023-12-19 10:54:35 -05:00
Isaac Connor
ffb8d68c74
When reading a jpeg, and the dimensions don't match, update the image dimension values so that the image at least looks right.
2023-10-01 10:28:36 -04:00
Alejandro Criado-Pérez
543683aa4c
Corrections on cpp and h files
2023-08-13 01:27:19 +02:00
Isaac Connor
c510745317
Allow specifying width and height so that we can scale to alower res
2023-08-02 13:56:06 -04:00
Isaac Connor
4b20109b69
Use the same open semantics regardless of blocking or non so that we always have an fd to lock. Fixes logging of unable to lock jpeg in streaming with buffering
2023-07-25 16:35:28 -04:00
Isaac Connor
15d9ec32de
Add advisory locking around image writing. So that someone can potentially wait for the image to be fully written to. Hopefully will resolve issues with zmes and incomplete images
2023-07-13 14:25:56 -04:00
Isaac Connor
2b34fa67db
Add jpeg writing from YUV subpixelformat
2023-06-09 16:42:33 -04:00
Isaac Connor
1d51f1b146
Fix missing c_str()
2023-02-02 12:16:43 -05:00
Isaac Connor
9a999d1465
replace const char * with std::string and save filename in the object when created by filename. Long term, we may represent an image by filename and load the image on demand. For potential use with sendfile.
2023-02-01 14:31:59 -05:00
Isaac Connor
ae66782ddb
Use 32byte aligned buffer size when allocating an image buffer to make ffmpeg happy. Fixes a crash when width = 1080. When linesizes are different, copy line by line instead of the whole buffer all at once.
2022-11-30 13:18:13 -05:00
Isaac Connor
658ca44c32
Don't panic if no font file found. Perhaps we can continue with diminished function
2022-10-14 14:04:06 -04:00
Isaac Connor
8558ade8f1
Merge branch 'master' into misc_fixes
2022-08-25 18:33:06 -04:00
Doug Nazar
74f8e43b12
Cast operand to larger destination size to avoid possible overflow issues.
2022-07-31 00:48:27 -04:00
Doug Nazar
f4dd897ef4
Convert AVFrame* to custom unique_ptr (av_frame_ptr).
...
Switch all owning AVFrame* variables to av_frame_ptr for
automatic cleanup.
Use AVBufferRef to store frame data in AVFrame where appropriate
so that it can be freed automatically with it's AVFrame.
Handle allocation errors.
2022-07-30 13:21:11 -04:00
Doug Nazar
3b21153757
Fix various printf formats for 32bit, 32bit w/_FILE_OFFSET_BITS=64 and 64-bit
2022-07-16 03:18:18 -04:00
Isaac Connor
e6de9c3e01
A polygon must have 3 vertices at minimum
2022-07-14 10:06:26 -04:00
Isaac Connor
59577133ef
parenthesis
2022-06-08 23:28:54 -04:00
Isaac Connor
0fcc237fd5
Only call update_function_pointers if size might have changed
2022-06-07 17:19:54 -04:00
Isaac Connor
678abad57c
remove debug
2022-06-07 11:58:32 -04:00
Isaac Connor
02cca8e57b
Handle no vertices in Fill. Prevents crash when a zone is entirely outside the image
2022-05-17 15:05:08 -04:00
Isaac Connor
0cdb926e9e
Remove unused variable
2022-05-10 09:30:13 -04:00
Isaac Connor
442dff3f8a
Implement a Scale(new_width, new_height) using sw_scale.
2022-05-06 11:43:35 -04:00
Isaac Connor
db2854a7ac
Improve error message when sws_scale fails
2022-05-04 10:00:40 -04:00
Isaac Connor
cc1368ba2c
Move code for AVPixFormat to .cpp instead .h. Add const's so we can use it on cost Image * vars
2022-03-26 20:31:33 -04:00
Isaac Connor
fc541ac57d
fix potential double lock of jpeg mutex
2022-02-18 17:11:18 -05:00
Isaac Connor
28f3cb18e4
Make std function warning into a debug. Warning will happen if they are actually used
2022-02-18 15:59:00 -05:00
Isaac Connor
91b536b868
Change the test for slow functions to mod4. The unrolled and SSE function work on 4 pixels at a time or 16 or 12 bytes depending on colours.This will improve cpu use on resolutions like 1280x800
2022-02-14 09:43:48 -05:00
Isaac Connor
6e7e6d9e8e
small code cleanup, add Warnings when using slow blend functions.
2022-02-11 18:06:43 -05:00
Isaac Connor
4d90a816f8
Put a lock around jpeg writing. libjpeg is not thread safe
2022-01-25 16:22:33 -05:00
Isaac Connor
dec440ead1
Unset holdbuffer so that when we connect, we reset the shm buffer pointer. cleanup initializers in Image
2022-01-19 15:01:37 -05:00
Isaac Connor
a0c34f0d96
Fix. cppcheck was wrong about divider being able to go into deeper scope.
2022-01-10 18:33:01 -05:00
Isaac Connor
f0c6413dc8
solve ccpcheck complaints
2022-01-09 14:43:23 -05:00
Isaac Connor
0119ff46aa
Remove redundant debug
2021-11-03 17:03:54 -04:00
Isaac Connor
58f933ba1e
Add missing update_function_pointers so that we use SSE blend functions. Significantly reduces cpu use in motion detection.
2021-09-13 15:03:42 -04:00
Peter Keresztes Schmidt
5fda85bf2e
Image: Codestyle changes
2021-09-12 11:38:44 +02:00