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

Feature - Images & animations #140

Merged
merged 96 commits into from
Apr 7, 2021
Merged

Conversation

ladislas
Copy link
Member

Main PR to bring LKCoreVideo, LKCoreAudio and LKAVKit to LekaOS

@ladislas ladislas force-pushed the feature/images_and_animations branch 2 times, most recently from d95757b to be9053d Compare February 12, 2021 16:14
drivers/LKCoreVideo/source/st_sdram.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_sdram.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_sdram.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_sdram.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_sdram.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_sdram.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_sdram.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/LKCoreLCD.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/LKCoreLCD.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/LKCoreLCD.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/LKCoreLCD.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/LKCoreLCD.cpp Outdated Show resolved Hide resolved
@ladislas ladislas force-pushed the feature/images_and_animations branch from 4ac4bb8 to 179af94 Compare February 19, 2021 11:58
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_decode_polling.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_decode_polling.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_decode_polling.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_decode_polling.cpp Outdated Show resolved Hide resolved
@ladislas ladislas force-pushed the feature/images_and_animations branch from 500d1b2 to f628ba8 Compare February 22, 2021 22:31
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_decode_polling.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_decode_polling.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_decode_polling.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_decode_polling.cpp Outdated Show resolved Hide resolved
@ladislas ladislas force-pushed the feature/images_and_animations branch from f628ba8 to 3259ce0 Compare February 23, 2021 09:50
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_decode_polling.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_decode_polling.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_decode_polling.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_decode_polling.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_decode_polling.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_decode_polling.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_decode_polling.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_decode_polling.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_decode_polling.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_decode_polling.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_decode_polling.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_decode_polling.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/tests/LKCoreDMA2D_test.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/tests/LKCoreDMA2D_test.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/tests/LKCoreDMA2D_test.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/tests/LKCoreDMA2D_test.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/tests/LKCoreDMA2D_test.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/tests/LKCoreDMA2D_test.cpp Outdated Show resolved Hide resolved
@ladislas ladislas force-pushed the feature/images_and_animations branch from 3d69e3d to ef5d245 Compare March 3, 2021 16:26
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/tests/LKCoreDMA2D_test.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/tests/LKCoreDMA2D_test.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/tests/LKCoreDMA2D_test.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/tests/LKCoreDMA2D_test.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/tests/LKCoreDMA2D_test.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/tests/LKCoreDMA2D_test.cpp Outdated Show resolved Hide resolved
@ladislas ladislas force-pushed the feature/images_and_animations branch from 64f0cc2 to 9926d88 Compare March 9, 2021 06:44
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/tests/LKCoreDMA2D_test.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/tests/LKCoreDMA2D_test.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/source/st_jpeg_utils.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/tests/LKCoreDMA2D_test.cpp Outdated Show resolved Hide resolved
drivers/LKCoreVideo/tests/LKCoreDMA2D_test.cpp Outdated Show resolved Hide resolved
@ladislas ladislas force-pushed the feature/images_and_animations branch from 7230cfc to 2451506 Compare March 9, 2021 17:05
uint32_t DataCount, uint32_t *ConvertedDataCount)
{
uint32_t numberMCU;
uint32_t i, j, currentMCU, xRef, yRef;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scope of the variable yRef can be reduced.

uint32_t numberMCU;
uint32_t i, j, currentMCU, xRef, yRef;

uint32_t refline;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scope of the variable refline can be reduced.


int32_t c_red, c_blue, c_green;

uint8_t *pOutAddr, *pChrom;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scope of the variable pChrom can be reduced.

*/
void JPEG_InitPostProcColorTables(void)
{
int32_t index, i;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scope of the variable index can be reduced.


for (i = 0; i <= 255; i++) {
index = (i * 2) - 256;
CR_RED_LUT[i] = ((((int32_t)((1.40200 / 2) * (1L << 16))) * index) + ((int32_t)1 << (16 - 1))) >> 16;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shifting a negative value is technically undefined behaviour

index = (i * 2) - 256;
CR_RED_LUT[i] = ((((int32_t)((1.40200 / 2) * (1L << 16))) * index) + ((int32_t)1 << (16 - 1))) >> 16;

CB_BLUE_LUT[i] = ((((int32_t)((1.77200 / 2) * (1L << 16))) * index) + ((int32_t)1 << (16 - 1))) >> 16;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shifting a negative value is technically undefined behaviour

@codecov
Copy link

codecov bot commented Mar 9, 2021

Codecov Report

Merging #140 (23464b6) into develop (5351ad2) will decrease coverage by 0.23%.
The diff coverage is 99.72%.

❗ Current head 23464b6 differs from pull request most recent head 3acb567. Consider uploading reports for the commit 3acb567 to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #140      +/-   ##
===========================================
- Coverage   100.00%   99.76%   -0.24%     
===========================================
  Files           18       61      +43     
  Lines          232     1677    +1445     
===========================================
+ Hits           232     1673    +1441     
- Misses           0        4       +4     
Impacted Files Coverage Δ
drivers/LKCoreVideo/tests/LKCoreLTDC_test.cpp 94.44% <94.44%> (ø)
drivers/LKCoreFatFs/include/LKCoreFatFsBase.h 100.00% <100.00%> (ø)
drivers/LKCoreLL/include/LKCoreLL.h 100.00% <100.00%> (ø)
drivers/LKCoreLL/tests/LKCoreLL_test.cpp 100.00% <100.00%> (ø)
...rivers/LKCoreSTM32Hal/include/LKCoreSTM32HalBase.h 100.00% <100.00%> (ø)
drivers/LKCoreVideo/include/internal/CGColor.h 100.00% <100.00%> (ø)
drivers/LKCoreVideo/include/internal/CGPixel.h 100.00% <100.00%> (ø)
drivers/LKCoreVideo/include/internal/LKCoreDMA2D.h 100.00% <100.00%> (ø)
...ers/LKCoreVideo/include/internal/LKCoreDMA2DBase.h 100.00% <100.00%> (ø)
drivers/LKCoreVideo/include/internal/LKCoreDSI.h 100.00% <100.00%> (ø)
... and 76 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5351ad2...3acb567. Read the comment docs.

Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 5087 lines exceeds the maximum allowed for the inline comments feature.

Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR diff size of 7865 lines exceeds the maximum allowed for the inline comments feature.

@ladislas ladislas force-pushed the feature/images_and_animations branch from 6253de2 to 29ef108 Compare April 2, 2021 15:51
ladislas and others added 2 commits April 7, 2021 11:26
🩹 (otm8009a): Use std::byte for bitwise operation
🩹 (jpeg): Remove redundant cast
🩹 (dma2d): Fix implicit conversion loses
🩹 (jpeg): Add tests recommanded by sonarcloud
🩹 (hal): Remove unused acces specifier
🩹 (hal): Use =default as default implementation
🩹 const non-mutable member function
🩹 (ll): Remove unused namespace
🩹 (dsi): Avoid implicit conversion
🩹 (lcd) Add missing final keyword
🩹 (font): Add const in fontGetPixelBytes argument
🩹 (otm8009a): Replace "/*" by "//"
🩹 (otm8009a): Nested namespace

🩹 (sonarcloud): Fix implicit conversion loses integer precision

https://sonarcloud.io/project/issues?id=leka_LekaOS&issues=AXiE6yzYQJJ2tBYqGH4h&open=AXiE6yzYQJJ2tBYqGH4h&pullRequest=140

🩹 (sonarcloud): Fix Use "=default" instead of the default implementation of this special member functions

https://sonarcloud.io/project/issues?id=leka_LekaOS&issues=AXiE6y3oQJJ2tBYqGH5j&open=AXiE6y3oQJJ2tBYqGH5j&pullRequest=140

🩹 (sonarcloud): Fix Add the "explicit" keyword to this constructor

🩹 (sonarcloud): Explicitly use reinterpret_cast instead of C-style cast

🩹 (sonarcloud): Fix Merge this "if" statement with the enclosing one

https://sonarcloud.io/project/issues?id=leka_LekaOS&issues=AXiE6ywSQJJ2tBYqGH2k&open=AXiE6ywSQJJ2tBYqGH2k&pullRequest=140

🩹 (sonarcloud): Fix field '_dsi' will be initialized after field '_backlight'

🩹 (sonarcloud): Define command array as const

🩹 (sonarcloud): Fix duplicated blocks of code must be removed

🩹 (sonarcloud): Fix Concatenate this namespace with the nested one

🩹 (sonarcloud): Fix Remove the misleading "/*" characters

🩹 (sonarcloud): Fix Rename this namespace to match the regular expression
@ladislas ladislas force-pushed the feature/images_and_animations branch from 23464b6 to 3acb567 Compare April 7, 2021 09:27
@sonarcloud
Copy link

sonarcloud bot commented Apr 7, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 19 Code Smells

99.5% 99.5% Coverage
2.1% 2.1% Duplication

@ladislas ladislas merged commit f7a9266 into develop Apr 7, 2021
@ladislas ladislas deleted the feature/images_and_animations branch April 11, 2021 13:26
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

Successfully merging this pull request may close these issues.

2 participants