Chapter 4

Memory optimization and video processing

Abstract

This chapter describes how to read video data from an attached webcam using Linux's Video4Linux feature. Together with the frame buffer introduced in the previous chapter, this chapter explores several example applications that involve real-time video processing. Examples include the two-dimensional (2D) Gaussian blur, 2D Sobel edge detection, and separable 2D filters.

This chapter focuses on memory optimizations, designed to improve cache performance for codes that exhibit complex but regular access patterns. These optimizations require a class of optimizations called loop tiling, in which loops are restructured in a way that changes the order in which data elements are read. This type ...

Get Embedded Systems now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.