Skip to content

Commit

Permalink
(Continued)
Browse files Browse the repository at this point in the history
  • Loading branch information
wberube committed Aug 20, 2024
1 parent 9673fb2 commit 702c681
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/hal/hisi/v1_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ int v1_video_create(char index, hal_vidconfig *config)
attrib->profile = MIN(config->profile, 1);
attrib->byFrame = 0;
attrib->fieldOn = 0;
attrib->mainStrmOn = index ? 0 : 1;
attrib->mainStrmOn = 1;
attrib->priority = 0;
attrib->fieldOrFrame = 0;
attrib->pic.width = config->width;
Expand Down
8 changes: 7 additions & 1 deletion src/hal/hisi/v1_vb.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,11 @@ inline static unsigned int v1_buffer_calculate_venc(short width, short height, v
unsigned int bufSize = CEILING_2_POWER(width, alignWidth) *
CEILING_2_POWER(height, alignWidth) *
(pixFmt == V1_PIXFMT_YUV422SP ? 2 : 1.5);
return bufSize;
unsigned int headSize = 16 * height;
if (pixFmt == V1_PIXFMT_YUV422SP)
headSize *= 2;
else if (pixFmt == V1_PIXFMT_YUV420SP)
headSize *= 3;
headSize >>= 1;
return bufSize + headSize;
}

0 comments on commit 702c681

Please sign in to comment.