Skip to content

Commit b35e786

Browse files
author
Alain Volmat
committed
video: add H264 estimate in video_estimate_fmt_size
Add rough estimate of a worth case H264 output size. Signed-off-by: Alain Volmat <[email protected]>
1 parent 751e976 commit b35e786

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/video/video_common.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,11 @@ int video_estimate_fmt_size(struct video_format *fmt)
456456
fmt->pitch = 0;
457457
fmt->size = fmt->width * fmt->height * 2;
458458
break;
459+
case VIDEO_PIX_FMT_H264:
460+
/* Rough estimate for the worst case */
461+
fmt->pitch = 0;
462+
fmt->size = fmt->width * fmt->height * 2;
463+
break;
459464
default:
460465
/* Uncompressed format */
461466
fmt->pitch = fmt->width * video_bits_per_pixel(fmt->pixelformat) / BITS_PER_BYTE;

0 commit comments

Comments
 (0)