Rolling video buffer apparatus
A system includes a display device configured to display frames of images, a memory coupled to the display device and configured to store image data representing a sequence of the frames, and a memory controller coupled to the memory. The memory controller is configured to split a frame in the sequence of frames into a slice count of frame slices according to an order of respective frame slice numbers, partition the memory into a number of buffer slices in an ordered sequence wherein the number of buffer slices is greater than or equal to the slice count, write each frame slice in the sequence of frames to a next free buffer slice in the ordered sequence of buffer slices, read each written frame slice to the display device to display the written frame slice with other displayed frame slices according to the order of the respective frame slice numbers, and return to a first buffer slice in the ordered sequence after writing a frame slice in a last buffer slice in the ordered sequence.
1 . A system, comprising:
a display device configurable to display frames of images;
a memory coupled to the display device and configurable to store image data representing a sequence of the frames; and
a memory controller coupled to the memory and configurable to:
split each frame in the sequence of frames into a slice count of frame slices according to an order of respective frame slice numbers, each frame of the sequence of frames having the slice count of frame slices;
partition the memory into a number of buffer slices in an ordered sequence, wherein the number of buffer slices is greater than or equal to the slice count;
write each frame slice of each frame in the sequence of frames in the order of the frame slice numbers to a next free buffer slice in the ordered sequence of buffer slices, returning to a first buffer slice in the ordered sequence after writing a frame slice in a last buffer slice in the ordered sequence, wherein the memory is configurable to store frame slices of different frames of the sequence of frames at the same time, in which each frame slice stored in the memory at a given time has a different frame slice number than each of the other frame slices stored in the memory at the given time; and
provide each written frame slice to the display device to display the written frame slice according to the order of the respective frame slice numbers;
wherein, for each of the second and subsequent frames in the sequence of frames, each frame slice is provided to the display device, as that frame slice becomes available, to replace a previously displayed frame slice of a previous frame in the sequence of frames that has a same slice number.
2 . The system of claim 1 , wherein the display device is configurable to display frame slices of different frames of the sequence of frames at the same time.
3 . The system of claim 2 , wherein the memory controller is further configurable to free a buffer slice that is storing the previously displayed frame slice of the previous frame.
4 . The system of claim 2 , wherein frame slices of the frame and the previous frame that have different frame slice numbers are displayed by the display device at a same time.
5 . The system of claim 1 , wherein the frame slices have a same slice size, and wherein the display device is further configurable to display a slice count of frame slices at a same time.
6 . The system of claim 1 , wherein the frame slices are displayed by scrolling an image displayed by the display device according to the order of the respective frame slice numbers, and wherein the scrolling of the displayed image is restarted at each first frame slice of a next frame.
7 . The system of claim 1 , wherein the memory controller is further configurable to:
receive, at a rolling buffer controller of the memory controller, buffer update requests at respective time intervals;
generate, by the rolling buffer controller, a read-side snapshot of buffer parameters in response to each buffer update request;
provide, by the rolling buffer controller, memory addresses for the written frame slice according to the read-side snapshot; and
read image data of the written frame slice according to the memory addresses.
8 . The system of claim 7 , wherein the buffer update requests include a buffer update request for each frame, each color cycle, each bit frame, or each bit slice.
9 . A method comprising:
splitting, by a rolling buffer controller, each frame, in a sequence of frames comprising image data, into a slice count of frame slices;
initializing buffer parameters indicating a current frame start buffer slice, a previous frame start buffer slice, and a written frame slices count;
writing, according to the buffer parameters, a frame slice of the frame slices of the frame to a buffer slice of a frame buffer in a memory that is configurable to store frame slices of different frames of the sequence of frames at the same time, in which each frame slice stored in the memory at a given time has a different frame slice number than each of the other frame slices stored in the memory at the given time;
incrementing the written frame slices count after writing the frame slice;
reading the written frame slice to a display device;
determining, after receiving a buffer update request, whether image data is being read to the display device; and
generating a snapshot of the buffer parameters based on the buffer update request.
10 . The method of claim 9 , wherein updating the buffer parameters incudes setting the previous frame start buffer slice to the current frame start buffer slice and the current frame start buffer slice to a current buffer slice number, and initializing the written frame slices count.
11 . The method of claim 9 , further comprising:
updating the buffer parameters if a synchronization signal is received that indicates a start of each frame is received at a respective time interval; and
incrementing the written frame slices count if writing a frame slice to the buffer slice is completed each time before receiving a synchronization signal for a next frame.
12 . The method of claim 9 , wherein:
the generating of the snapshot of the buffer parameters is performed after the image data is read when it is determined that the image data is being read.
13 . The method of claim 12 , further comprising:
determining if a programmable update segment size is set to a value greater than zero;
copying the written frame slices count from the buffer parameters to the snapshot if the programmable update segment size is not greater than zero; and
if the programmable update segment size is greater than zero:
setting the written frame slices count to a number of new written frame slices rounded down to a closest multiple of the programmable update segment size if a number of new written frame slices is greater than or equal to the programmable update segment size; and
copying the current frame start buffer slice and the previous frame start buffer slice from the buffer parameters to the snapshot.
14 . The method of claim 9 , further comprising:
enabling or disabling a rotation setting for a displayed image;
setting a first direction-flip setting for the displayed image to a first direction or a second direction, wherein the first direction is a left-to-right direction across the displayed image and the second direction is a right-to-left direction across the displayed image;
setting a second direction-flip setting for the displayed image to a third direction or a fourth direction, wherein the third direction is a top-to-bottom direction across the displayed image and the fourth direction is a bottom-to-top direction across the displayed image;
reading rows of observation blocks for the displayed image if the rotation setting is disabled or columns of the observation blocks if the rotation setting is enabled; and
further reading the observation blocks according to a combination of the first direction-flip setting and the second direction-flip setting.
15 . The method of claim 9 , the method further comprising:
partitioning the memory into a number of buffer slices equal to two times the slice count;
splitting the buffer slices into a first group of buffer slices and a second group of buffer slices, each buffer slice including a number of buffer slices equal to the slice count;
writing, at two successive time intervals, the frame slices of a frame and a next frame in the sequence of frames to the first group of buffer slices and the second group of buffer slices, respectively; and
reading, at the two successive time intervals, the written frame slices of the frame and the next frame from the first group of buffer slices and the second group of buffer slices, respectively.
16 . The method of claim 15 , wherein the frame and the next frame are a left-side frame and a right-side frame, respectively, that are projected at a certain rate to display a three-dimensional image.
17 . An apparatus, comprising:
rolling buffer controllers coupled to a memory controller and a memory, wherein each rolling buffer controller is individually configurable with a respective set of parameters, in which each set of parameters specifies a slice size, a frame slice count, and a buffer slice count, wherein each rolling buffer controller of the rolling buffer controllers is configurable, based on the corresponding set of parameters, to:
receive write requests from the memory controller to write frame slices of a frame in a corresponding sequence of frames representing image data;
provide the memory controller with memory addresses for writing the frames slices into respective buffer slices of a frame buffer in the memory, wherein the frame buffer includes a respective group of buffer slices for each rolling buffer controller of the rolling buffer controllers;
receive buffer update requests;
generate, in response to each buffer update request, a read-side snapshot of buffer parameters of the frame buffer for tracking the frame slices in the respective buffer slices of the corresponding group of buffer slices;
receive read requests from the memory controller to read the frame slices from the respective buffer slices of the corresponding group of buffer slices; and
provide, according to the read-side snapshot, the memory controller with the memory addresses of the respective buffer slices of the corresponding group of buffer slices storing the frame slices; and
a link controller coupled to the rolling buffer controllers and configurable to specify which of the rolling buffer controllers are linked, wherein each of the linked rolling buffer controllers is configurable to obtain the set of parameters from each of the other linked rolling buffer controllers.
18 . The apparatus of claim 17 , wherein the frame includes subframes that are split into a same number of frame slices, different numbers of frame slices, or different sizes of frame slices and that are stored into respective groups of buffer slices in the frame buffer, wherein sequences of the frame slices and the groups of buffer slices are tracked by respective rolling buffer controllers according to respective buffer parameters, and wherein the rolling buffer controllers are linked to obtain a written frame slices count from the buffer parameters of one of the rolling buffer controllers.
19 . The apparatus of claim 17 , wherein the rolling buffer controllers are coupled to a first light modulator and a second light modulator, wherein, of the sequences of frames, a first sequence of frames is for the first light modulator and a second sequence of frames is for the second light modulator, wherein, of the groups of buffer slices, a first group of buffer slices is for storing frame slices of the first sequence of frames and a second group of buffer slices is for storing frame slices of the second sequence of frames, and wherein, in response to the buffer update requests, a first rolling buffer controller, of the rolling buffer controller, maintains first buffer parameters for the first group of buffer slices at fixed first values, and a second rolling buffer controller, of the rolling buffer controllers, maintains second buffer parameters for the second group of buffer slices at fixed second values.
20 . The apparatus of claim 17 , wherein the rolling buffer controllers are coupled to a first light modulator and a second light modulator, wherein, of the sequence of frames, a first sequence of frames is for the first light modulator and a second sequence of frames is for the second light modulator, wherein, of the groups of buffer slices, a first group of buffer slices is for storing frame slices of the first sequence of frames and a second group of buffer slices for storing frame slices of the second sequence of frames, and wherein a number of buffer slices in the first group of buffer slices and the second group of buffer slices is greater than a slice count of the frame slices in the frames.