Fix BGR pixelformat block size

This commit is contained in:
Martin Piatka
2019-02-07 12:45:51 +01:00
parent e785f05696
commit 7aef2a7448
2 changed files with 2 additions and 1 deletions

View File

@@ -231,6 +231,7 @@ void Shared_mem::put_frame(struct video_frame *frame){
int src_line_len = vc_get_linesize(desc.width, frame->color_spec);
int block_size = get_pf_block_size(frame->color_spec);
assert(block_size > 0);
int dst = 0;
for(unsigned y = 0; y < desc.height; y += scaleF){
for(int x = 0; x + scaleF * block_size <= src_line_len; x += scaleF * block_size){

View File

@@ -164,7 +164,7 @@ static const struct codec_info_t codec_info[] = {
[VP9] = {"VP9", "Google VP9",
to_fourcc('V','P','9','0'), 0, 1.0, 8, 0, FALSE, TRUE, TRUE, FALSE, "vp9"},
[BGR] = {"BGR", "Blue Green Red 24bit",
to_fourcc('B','G','R','2'), 1, 3.0, 8, 0, TRUE, FALSE, FALSE, FALSE, "bgr"},
to_fourcc('B','G','R','2'), 1, 3.0, 8, 3, TRUE, FALSE, FALSE, FALSE, "bgr"},
[J2K] = {"J2K", "JPEG 2000",
to_fourcc('M','J','2','C'), 0, 1.0, 8, 0, FALSE, TRUE, FALSE, FALSE, "j2k"},
[J2KR] = {"J2KR", "JPEG 2000 RGB",