myrao / libyuv

Automatically exported from code.google.com/p/libyuv
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

row buffers - single alloc #300

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Some functions allocate more than one buffer per function.
Merge into one alloc call.

E.g. Sobel

// 3 rows with edges before/after.                        
const int kRowSize = (width + kEdge + 15) & ~15;          
align_buffer_64(row_y, kEdge + kRowSize * 3 + kEdge);     
align_buffer_64(row_sobelx, width + kEdge);               
align_buffer_64(row_sobely, width + kEdge);               

Original issue reported on code.google.com by fbarch...@google.com on 29 Dec 2013 at 10:16

GoogleCodeExporter commented 9 years ago
These are the affected calls:
convert_from_argb.cc:  align_buffer_64(row_u, halfwidth);
convert_from_argb.cc:  align_buffer_64(row_v, halfwidth);
convert_from_argb.cc:  align_buffer_64(row_u, halfwidth);
convert_from_argb.cc:  align_buffer_64(row_v, halfwidth);
convert_from_argb.cc:  align_buffer_64(row_y, width);
convert_from_argb.cc:  align_buffer_64(row_u, (width + 1) / 2);
convert_from_argb.cc:  align_buffer_64(row_v, (width + 1) / 2);
convert_from_argb.cc:  align_buffer_64(row_y, width);
convert_from_argb.cc:  align_buffer_64(row_u, (width + 1) / 2);
convert_from_argb.cc:  align_buffer_64(row_v, (width + 1) / 2);
planar_functions.cc:  align_buffer_64(row_y, kEdge + kRowSize * 3 + kEdge);
planar_functions.cc:  align_buffer_64(row_sobelx, width + kEdge);
planar_functions.cc:  align_buffer_64(row_sobely, width + kEdge);
row_common.cc:  align_buffer_64(row_y, width);
row_common.cc:  align_buffer_64(row_u, (width + 1) / 2);
row_common.cc:  align_buffer_64(row_v, (width + 1) / 2);
row_common.cc:  align_buffer_64(row_y, width);
row_common.cc:  align_buffer_64(row_u, (width + 1) / 2);
row_common.cc:  align_buffer_64(row_v, (width + 1) / 2);
row_common.cc:  align_buffer_64(row_y, width);
row_common.cc:  align_buffer_64(row_u, (width + 1) / 2);
row_common.cc:  align_buffer_64(row_v, (width + 1) / 2);
row_common.cc:  align_buffer_64(row_y, width);
row_common.cc:  align_buffer_64(row_u, (width + 1) / 2);
row_common.cc:  align_buffer_64(row_v, (width + 1) / 2);

Original comment by fbarch...@google.com on 29 Dec 2013 at 10:21

GoogleCodeExporter commented 9 years ago
r931 fixes planar_functions.cc

Original comment by fbarch...@google.com on 30 Dec 2013 at 7:19

GoogleCodeExporter commented 9 years ago
r932 fixes the rest.

Original comment by fbarch...@google.com on 30 Dec 2013 at 10:38