Reformatting data to decrease bandwidth between a video encoder and a buffer

10313880 ยท 2019-06-04

Assignee

Inventors

Cpc classification

International classification

Abstract

A reference picture buffer may supply an asymmetric macroblock to a video encoder to improve the bandwidth between the encoder and buffer. The macroblock width may be sized to match the minimum burst width of the buffer. The size of the macroblock may be kept unchanged by reducing the macroblock height.

Claims

1. A method comprising: bursting only one macroblock per request from a video encoder to a buffer whose minimum burst length is greater than 16 bytes.

2. The method of claim 1 further comprising: providing a macroblock of data from the buffer to the video encoder, said macroblock sized to match the minimum burst length of the buffer; and only supplying from the buffer with data that can be fully utilized by the video encoder.

3. The method of claim 1 including providing a burst transfer of a 32 byte wide by eight row macroblock.

4. The method of claim 1 including using a DDR3 static dynamic random access memory as said buffer.

5. The method of claim 1 including providing an asymmetrically sized macroblock in response to a request from the video encoder to the buffer for reference picture data.

6. The method of claim 1 including storing a top field as one of even or odd rows in the buffer and storing a bottom field as the other of the even or odd rows.

7. The method of claim 2 including selectively reformatting a macroblock for picture-adaptive frame-field encoding or non-picture-adaptive frame-field encoding.

8. The method of claim 1 including using a macroblock whose width is at least equal to the number of bytes associated with the minimum burst length of the buffer.

9. An apparatus comprising: a buffer whose minimum burst length is greater than 16 bytes; and an encoder coupled to said buffer to burst only one macroblock per request to the buffer.

10. The apparatus of claim 9 wherein said encoder provides a burst transfer of a 32 byte wide by 8 row macroblock.

11. The apparatus of claim 9, said buffer to provide a macroblock of data to said encoder, said macroblock size to match the minimum burst length of the buffer and said buffer to only supply data that can be fully utilized by the video encoder.

12. The apparatus of claim 9 wherein said buffer is a DDR3 static dynamic random access memory.

13. The apparatus of claim 9, said encoder to provide an asymmetrically sized macroblock in response to a request from the video encoder to the buffer for reference picture data.

14. The apparatus of claim 9, said buffer storing a top field as one of even or odd rows and storing a bottom field as the other of even or odd rows.

15. The apparatus of claim 11, said encoder to selectively reformat a macroblock of data for picture-adaptive frame-field encoding or non-picture-non-adaptive frame-field encoding.

16. A non-transitory computer readable medium storing instructions executed by a video encoder to: burst only one macroblock per request from the video encoder by a buffer whose minimum burst length is greater than 16 bytes.

17. The medium of claim 16 further storing instructions to provide a macroblock of data from the buffer to the video encoder, said macroblock size to match the minimum burst length of the buffer and only supplying from the buffer with data that can be fully utilized by the video encoder.

18. The medium of claim 16 further storing instructions to provide an asymmetrically sized macroblock in response to a request from the video encoder to the buffer for reference picture data.

19. The medium of claim 16 further storing instructions to store a top field as one of even or odd rows in a buffer and storing a bottom field as the other of even or odd rows.

20. The medium of claim 17 further storing instructions to selectively reformat a macroblock for picture-adaptive frame-field encoding or non-picture-adaptive frame-field encoding.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) FIG. 1 is a schematic depiction of one embodiment of the present invention;

(2) FIG. 2 is a flow chart for one embodiment;

(3) FIG. 3 is a block format in accordance with one embodiment of the present invention; and

(4) FIG. 4 is a block format in accordance with another embodiment of the present invention.

DETAILED DESCRIPTION

(5) In accordance with some embodiments, the aspect ratio of a macroblock stored in a video encoder reference picture buffer may be changed from a conventional width to a width that matches the minimum burst length of some memories, such as DDR3 memories. In some embodiments, the conventional macroblock width of 16 bytes and height of 16 lines may be changed to an asymmetric width of 32 bytes and a height of 8 lines in one embodiment. Then, two consecutive 16 byte lines in a 1616 macroblock are remapped onto one 32 byte line (called a row due to distinguish lines in symmetrical (e.g. 1616) and asymmetrical (e.g. 328) macroblocks) in a 328 macroblock. The new macroblock width of 32 bytes matches the minimum burst length of 32 bytes used by some memories, such as DDR3 memories.

(6) The 1616 macroblock is reformatted as a 328 macroblock so that it can be accessed in the reference picture buffer in eight 32 byte requests. Eight 32 byte requests return exactly 328 or 256 bytes from the memory, resulting in bandwidth efficiency in some embodiments.

(7) In contrast, conventional video encoders using DDR3 memory receive 512 bytes in response to eight requests, resulting in twice the bandwidth consumption compared to some embodiments of the present invention.

(8) Referring to FIG. 1, a video encoding system 10 includes a video encoder 12. The video encoder 12 receives picture data and outputs an encoded stream. The encoder 12 writes out reference pictures as macroblocks, starting with the left hand corner of the picture frame. A bridge 14, that communicates with the video encoder, reformats the symmetrical macroblocks into asymmetrical macroblocks. The bridge may be a memory bridge in one embodiment. The reformatting may involve swizzling in one embodiment. A memory or buffer 15 then stores the reformatted macroblocks. The reference picture asymmetrical macroblocks read from the buffer 15 by the video encoder 12 are reformatted into symmetrical macroblocks by the bridge 14. In one embodiment, the buffer 15 may be any memory that has a minimum burst length longer than the width of the conventional 1616 macroblock, including the DDR3 SDRAM memory with a 32 byte minimum burst length.

(9) Of course, it is possible in the future that even larger burst lengths may be utilized and, in such case, corresponding adjustments in block asymmetry may be made. For example, if a reference picture buffer used 64 byte minimum burst lengths, the height or number of rows in the macroblock would simply be cut in half so that the reformatted macroblocks would be 644 pixels.

(10) Referring to FIG. 2, a sequence 17, which may be implemented by the bridge 14, in one embodiment, may be hardware, software, or firmware. In software embodiments, the sequence 17 may be implemented by instructions stored on a non-transitory computer readable medium. Those instructions may be executed by a suitable processor. For example, in a software embodiment, a storage may store the instructions. The storage may be a magnetic, optical, or semiconductor memory. Thus, for example, as one embodiment, the bridge 14 may include a storage that stores the instructions and a processor which executes them. In another embodiment, the sequence may be implemented as part of the encoder 12.

(11) The sequence 17, shown in FIG. 2, initially determines (block 18) the type of coding involved. The bridge 14 typically already knows the mode the encoder 12 is in. If the coding needs reference pictures, as determined in diamond 20, then the reference pictures are stored in the buffer 14 as 328 macroblocks of a first type (block 22) in one embodiment. The reformatting in this case merely involved combining two lines at a time from the 1616 macroblock to form each row of the 328 macroblock.

(12) Otherwise, if the check at diamond 20 fails, a check at diamond 24 determines whether the system is using picture-adaptive frame-field encoding. If so, macroblocks are handled in 328 in format of a second type, as indicated in block 26. In picture-adaptive frame-field encoding, a frame may be written progressively and read back interlaced, as either a top or bottom field. A frame may also be written as interlaced and read back as progressive.

(13) In another embodiment, a check at 28 may also be done for macroblock-adaptive frame-field (MBAFF) coding. In such case, the asymmetrical macroblock can be optimized for this type of encoding, in some embodiments, as indicated in block 30.

(14) Thus, referring to FIG. 3, the first type of reference block format is depicted. It has a length from 0 to 31, or 32 bytes, and a depth of 8 rows. The symbol ln corresponds to the progressive macroblock line number. Thus, FIG. 3 shows the arrangement of rows within each 328 macroblock of a first set of five macroblocks of a total of sixteen macroblocks. The remaining macroblocks simply repeat the sequence depicted.

(15) For the picture-adaptive frame-field encoding accesses (also known as picture-level frame/field coding), the format shown in FIG. 4 may be utilized. T.sub.n refers to the top field (that includes the odd lines of the frame of a macroblock) at line n and B.sub.n refers to the bottom field (that includes the even lines of the macroblock) at line n.

(16) As shown in FIG. 4, the top and bottom field lines are remapped onto the 328 macroblock format to optimize the bandwidth efficiency for picture-adaptive frame-field encoding in one embodiment. The first row includes two even lines (L2 and L0) from the 1616 macroblock. The second row includes two odd lines (L3 and L1) from the 1616 macroblock. Thus, the odd rows make up the top field and the even rows make up the bottom field.

(17) In picture-adaptive frame-field encoding, the video encoder 12 can read by frame (progressively) or by field (for interlaced pictures). If the 328 macroblocks in the reference picture are referenced for field based coding, then the encoder fetches the first, third, fifth, and seventh rows for the top field coding and separately fetches the second, fourth, sixth, and eighth rows for the bottom field coding. If the 328 macroblocks in the reference picture are referenced for frame based coding, then the coder fetches the first, second, third, and eighth rows in the field bases and frame based coding examples.

(18) All of the 328 macroblock lines requested are used by the encoder, in one embodiment, thereby optimizing the bandwidth in some embodiments. The 32 bytes from each row of the 328 macroblock may be comprised of consecutive field lines in some embodiments. Using consecutive field lines ensures that the field encoding for all 32 byte bursts are from the same field, top or bottom.

(19) In PAFF, if the macroblock is read out of the buffer 15 progressively, then the read out lines will be out of order. In one embodiment, the bridge 14 is responsible for reordering the lines so that the encoder 12 is oblivious to the reformatting.

(20) References throughout this specification to one embodiment or an embodiment mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one implementation encompassed within the present invention. Thus, appearances of the phrase one embodiment or in an embodiment are not necessarily referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be instituted in other suitable forms other than the particular embodiment illustrated and all such forms may be encompassed within the claims of the present application.

(21) While the foregoing talks about a 328 macroblock, typically the size of a luminance macroblock, a chrominance macroblock may be treated in the same way. Generally, a chrominance macroblock is 324 macroblock since there is twice the luminance data as chrominance data. Thus, the present invention applies to both luminance and chrominance macroblocks.

(22) While the present invention has been described with respect to a limited number of embodiments, those skilled in the art will appreciate numerous modifications and variations therefrom. It is intended that the appended claims cover all such modifications and variations as fall within the true spirit and scope of this present invention.