Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed Nov 5, 2023
1 parent f066634 commit 4e96744
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions highgui/src/jpeg_encoder_rk_mpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -693,10 +693,7 @@ int jpeg_encoder_rk_mpp_impl::encode(const unsigned char* bgrdata, std::vector<u
{
my_memcpy((unsigned char*)mapped_ptr + i * hor_stride, bgrdata + i * width, width);
}
for (int i = 0; i < height; i++)
{
my_memset((unsigned char*)mapped_ptr + height * hor_stride, 128, height * hor_stride / 2);
}
my_memset((unsigned char*)mapped_ptr + height * hor_stride, 128, height * hor_stride / 2);
}
if (format == MPP_FMT_BGR888)
{
Expand Down Expand Up @@ -825,10 +822,7 @@ int jpeg_encoder_rk_mpp_impl::encode(const unsigned char* bgrdata, const char* o
{
my_memcpy((unsigned char*)mapped_ptr + i * hor_stride, bgrdata + i * width, width);
}
for (int i = 0; i < height; i++)
{
my_memset((unsigned char*)mapped_ptr + height * hor_stride, 128, height * hor_stride / 2);
}
my_memset((unsigned char*)mapped_ptr + height * hor_stride, 128, height * hor_stride / 2);
}
if (format == MPP_FMT_BGR888)
{
Expand Down

0 comments on commit 4e96744

Please sign in to comment.