Image encoding methods and their image encoders
By using a frame buffer to store reconstructed frames and utilizing the encoded bitstream to store I-frame information in the image coding method, the problem of excessive storage space occupation in the prior art is solved, and efficient utilization of storage space is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NOVATEK MICROELECTRONICS CORP
- Filing Date
- 2022-01-27
- Publication Date
- 2026-06-02
AI Technical Summary
Existing image encoding techniques require additional frame buffers or larger storage space to store I-frames and key P-frames, resulting in excessive storage space consumption.
An image coding method is adopted, which uses a frame buffer to store reconstructed frames and uses the encoded bitstream to store I-frame information, reducing the need for additional storage space. The key P-frame is used as a reference frame by the decoder to restore the I-frame information from the encoded bitstream.
This effectively reduces storage space usage, requiring only about 1/10 of the storage space to store I-frame content, thus improving storage efficiency.
Smart Images

Figure CN114845107B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an image encoding method and an image encoder thereof, and more particularly to an image encoding method that reduces memory usage and an image encoder thereof. Background Technology
[0002] Conventional image coding methods encode the current frame by referencing the previous frame. Existing coding techniques propose a Group of Pictures (GOP) coding structure. In addition to referencing the previous frame, this coding scheme also references a specially reserved intra-frame (I-frame) from a longer period of time as a long-term reference frame. In the structure of the group of pictures, a group can be considered as a series of predictive frames (P-frames) starting from an I-frame.
[0003] In image processing, I-frames typically have a large bitstream. Therefore, to reduce the overall bit rate, the spacing between I-frames (i.e., the group length) can be increased to reduce the total number of I-frames. For example, an I-frame can be set every 4 to 5 seconds, with the time interval varying depending on the application. However, extending the I-frame interval has the following drawbacks: since each P-frame to be displayed needs to be directly or indirectly referenced to an I-frame for reconstruction, it is often difficult to quickly find a suitable I-frame to generate the image during video playback or skipping. To solve this problem, a key P-frame can be set every few P-frames in the group, such as... Figure 1 As shown, the decoding of key P-frames does not refer to the previous frame, but directly refers to the I-frames in the same group. Therefore, during playback search, the content of the image frame can be quickly obtained as long as the key P-frame is found.
[0004] However, to achieve the aforementioned bitrate reduction, in addition to using a frame buffer to store the previous frame, the system (e.g., video encoder, video decoder, or video codec) needs to allocate additional frame buffers or more storage space to store I-frames for encoding and decoding subsequent critical P-frames. In other words, the previous frame can be used as a reference frame for decoding general P-frames, while the I-frame can be used as a reference frame for decoding critical P-frames. In this case, the system requires two frame buffers to store the reference frames, or the frame buffers should be larger enough to accommodate at least two frames, with the additional buffers occupying a significant amount of storage space. Therefore, improvements to the existing technology are necessary. Summary of the Invention
[0005] Therefore, the main objective of this invention is to provide an image encoding method and a related image encoder to reduce storage space usage and solve the above-mentioned problems.
[0006] An embodiment of the present invention discloses a method for an image encoder, the method comprising the following steps: receiving a series of input frames; performing at least one of intra-prediction and inter-prediction on the series of input frames to generate at least one of an intra-coded frame (I-frame, hereinafter referred to as an I-frame), a predictive coded frame (P-frame, hereinafter referred to as a P-frame), and a key predictive coded frame (Key P-frame, hereinafter referred to as a key P-frame); generating an encoded bitstream for a first input frame in the series of input frames that is determined to be the I-frame; and performing the inter-prediction on a second input frame in the series of input frames that is determined to be a key P-frame based on a first reference frame obtained from the encoded bitstream of the first input frame.
[0007] Another embodiment of the present invention discloses an image encoder, comprising a receiving circuit, an intra-frame prediction circuit, an inter-frame prediction circuit, and an entropy encoding circuit. The receiving circuit receives a series of input frames. The intra-frame prediction circuit performs an intra-frame prediction on a first input frame, which is determined to be an I-frame, from the series of input frames. The inter-frame prediction circuit performs an inter-frame prediction on a second input frame, which is determined to be a key P-frame, from the series of input frames based on a first reference frame obtained from an encoded bitstream of the first input frame. The entropy encoding circuit generates the encoded bitstream of the first input frame. Attached Figure Description
[0008] Figure 1 This is a schematic diagram of the coding structure of an image group.
[0009] Figure 2 This is a schematic diagram of a typical image encoder.
[0010] Figure 3 The diagram illustrates how a series of input frames are processed by an image encoder to generate reconstructed frames and encoded bitstreams, as well as an image encoding method for the reconstructed frames.
[0011] Figure 4This invention illustrates how a series of input frames are used to generate reconstructed frames and encoded bitstreams through an image encoder, along with related image encoding methods.
[0012] Figure 5 This is a schematic diagram of an image encoder according to an embodiment of the present invention.
[0013] Figure 6 An exemplary embodiment of the decoding circuit of this invention is shown.
[0014] Figure 7 This is a flowchart of the coding process in Embodiment 1 of the present invention.
[0015] The reference numerals in the attached figures are explained as follows:
[0016] 20, 50 image encoder
[0017] 202 Inter-frame Prediction Circuit
[0018] 204 and 606 Intra-frame Prediction Circuits
[0019] 206 Mode Determines Circuit
[0020] 208 Residual Calculation Circuit
[0021] 210 Compression Circuit
[0022] 212 Entropy Encoding Circuit
[0023] 214 Decompression Circuit
[0024] 216 Combined Circuit
[0025] 218, 608 Deblocking Filter Circuit
[0026] 220 and 520 frame buffers
[0027] 500 Decoding Circuit
[0028] 510 stream buffer
[0029] 602 Entropy Decoding Circuit
[0030] 604 Inverse Quantization and Inverse Conversion Circuit
[0031] 70 Coding Process
[0032] Steps 700-710 Detailed Implementation
[0033] Please refer to Figure 2 , Figure 2This is a schematic diagram of a typical image encoder 20. For each received input frame, the image encoder 20 can choose to process the input frame using either an intra-prediction mode or an inter-prediction mode to obtain a predicted frame. The image encoder 20 can calculate the difference between the input frame and the predicted frame to generate a residual frame. After compressing the residual frame, entropy coding is then performed to generate an encoded bitstream. Figure 2 As shown, the image encoder 20 includes an inter-frame prediction circuit 202, an intra-frame prediction circuit 204, a mode determination circuit 206, a residual calculation circuit 208, a compression circuit 210, an entropy coding circuit 212, a decompression circuit 214, a combination circuit 216, a deblocking filter circuit 218, and a frame buffer 220. These circuits in the image encoder 20 operate on a block-based basis, meaning that image data is divided into multiple macroblocks for processing. The block size can be, for example, 8*8 pixels or 16*16 pixels. The image encoder 20 may also include a receiver or receiving circuit (not shown) for receiving a series of input frames from a video source.
[0034] The inter-frame prediction circuit 202 can be used to receive a reference frame from the frame buffer 220 and perform inter-frame prediction on the input frame accordingly. For example, the inter-frame prediction circuit 202 may include a motion estimation unit and a motion compensation unit. The motion estimation unit can perform motion estimation on the input frame based on the reference frame and provide the motion estimation information to the motion compensation unit, which then performs motion compensation based on the received motion estimation information to generate an inter-frame predicted frame.
[0035] Intra-prediction circuit 204 can be used to perform intra-prediction on the input frame to generate an intra-predicted frame. Motion estimation in the intra-prediction operation is performed based on the image content between macroblocks within the input frame, without referencing other reference frames.
[0036] The mode determination circuit 206 can receive relevant prediction mode information for the current input frame and, based on the prediction mode information, select to output a prediction frame generated by the inter-frame prediction circuit 202 or the intra-frame prediction circuit 204. More specifically, if the mode determination circuit 206 determines the prediction mode to be intra-frame prediction mode, it can output the intra-frame prediction frame generated by the intra-frame prediction circuit 204 as the prediction frame; if the mode determination circuit 206 determines the prediction mode to be inter-frame prediction mode, it can output the inter-frame prediction frame generated by the inter-frame prediction circuit 202 as the prediction frame.
[0037] When the residual calculation circuit 208 receives a prediction frame, it can generate a residual frame based on the prediction frame (which can be an intra-frame prediction frame or an inter-frame prediction frame) and the input frame. For example, the residual calculation circuit 208 can calculate the difference between the input frame and the prediction frame to generate the residual frame.
[0038] Compression circuit 210 can be used to compress residual frames, including conversion and quantization. The conversion operation converts the residual frame into conversion coefficients, and the quantization operation quantizes the conversion coefficients according to the quantization parameter (QP) and outputs the quantized conversion coefficients to entropy encoding circuit 212.
[0039] Next, the entropy coding circuit 212 performs entropy coding based on the quantization transformation coefficients corresponding to the residual frame and the associated image prediction mode information, thereby generating an encoded bitstream. For example, in intra-frame prediction mode, the entropy coding circuit 212 performs entropy coding based on the associated intra-frame prediction mode information to generate an encoded bitstream. Examples of entropy coding include, but are not limited to, Context-Based Adaptive Binary Arithmetic Coding (CABAC) and Variable-Length Coding (VLC). Since the encoded bitstream is based on residual information extracted from the difference between the input frame and the prediction frame, and this residual information is further compressed, the amount of data in the encoded bitstream corresponding to an input frame is usually much smaller than the amount of data in the input frame itself.
[0040] The quantization conversion coefficients can also be output to the decompression circuit 214, which can be used to decompress the quantization conversion coefficients. The decompression operation includes inverse quantization and inverse conversion. The inverse quantization operation can convert the quantization conversion coefficients into a reconstructed version of the conversion coefficients, and the inverse conversion operation can be performed on the inverse quantization conversion coefficients to reconstruct the residual information of the residual frame.
[0041] When the combining circuit 216 receives residual information from the decompression circuit 214, it can combine the residual information with the predicted frame to generate a reconstructed frame. For example, the combining circuit 216 can add residual information to the predicted frame to generate a reconstructed frame.
[0042] The reconstructed frame can be provided as a reference to the intra-frame prediction circuit for intra-frame prediction operations. The reconstructed frame can also be processed by the deblocking filter circuit 218, which can store the deblocked reconstructed frame in the frame buffer 220 as a reference frame required for encoding subsequent input frames.
[0043] Please refer to Figure 3 , Figure 3 This illustrates a series of input frames processed by an image encoder (such as...). Figure 2 The image encoder 20 generates reconstructed frames and encoded bitstreams, as well as an image encoding method for the reconstructed frames. In this example, the series of input frames can be viewed as a Group of Pictures (GOP) structure. The first (earliest) input frame in the group is determined as an intra-frame (I-frame, hereinafter referred to as an I-frame), and the subsequent input frames are determined as predictive frames (P-frames, hereinafter referred to as P-frames). Among these P-frames, a portion of the input frames at predetermined time intervals are determined as key predictive frames (Key P-frames, hereinafter referred to as key P-frames), where the predetermined time interval can be defined as the number of input frames between one key P-frame and the next. Each input frame can be processed by the image encoder to generate a reconstructed frame according to the image encoding process described above.
[0044] If the currently received input frame is determined to be an I-frame, the prediction mode information indicates that intra-frame prediction needs to be performed. The mode determination circuit 206 can select the intra-predicted frame generated by the intra-prediction circuit 204 as the prediction frame based on the prediction mode information. At this time, the encoding operation does not refer to any other reference frames.
[0045] If the currently received input frame is determined to be a P-frame (or a key P-frame), the prediction mode information indicates that a reference frame needs to be referenced to perform inter-frame prediction. The mode determination circuit 206 can select the inter-frame prediction frame generated by the inter-frame prediction circuit 202 as the prediction frame based on the prediction mode information. It should be noted that image coding is block-based data processing, and the residual frames, intra-frame prediction frames, inter-frame prediction frames, and reconstructed frames mentioned above are all generated block by block.
[0046] like Figure 3As shown, the reconstructed frame generated after encoding an I-frame can be stored in a frame buffer L. Frame buffer L can be considered a long-term reference frame buffer, which can be part of frame buffer 220 in the image encoder 20. The next frame is a P-frame. For the P-frame, the image encoder 20 can retrieve the previous reconstructed frame from frame buffer L as a reference frame to perform inter-frame prediction and generate a new reconstructed frame. This new reconstructed frame is then stored in a frame buffer R (or reference frame buffer), which can be another part of frame buffer 220 in the image encoder 20. The image encoder 20 can use the previous reconstructed frame in frame buffer R as a reference frame to perform inter-frame prediction to generate each subsequent P-frame, and generate a new reconstructed frame, which is then stored in frame buffer R to replace the previous reconstructed frame. If an input frame is determined to be a key P-frame, the reconstructed frame generated from the I-frame and stored in frame buffer L can be used as a reference frame to perform inter-frame prediction, generate a new reconstructed frame, and then store it in frame buffer R to replace the previous reconstructed frame.
[0047] In other words, within the same image group, the content of frame buffer R is continuously updated, while frame buffer L only stores the reconstructed data corresponding to the I-frame. The content of frame buffer L remains unchanged until the next I-frame (i.e., the I-frame in the next image group) arrives and generates the corresponding reconstructed frame.
[0048] like Figure 3 As shown, in addition to the reconstructed frames, the residual frames for each input frame can also be compressed to generate an encoded bitstream. As mentioned above, the data size of the encoded bitstream is typically much smaller than that of the input frames, and the data size of the reconstructed frames is equal to that of the input frames. Therefore, the data size of the encoded bitstream is also much smaller than that of the reconstructed frames. Generally, the encoded bitstream is generated using a compression ratio greater than 10:1, making its data size less than 1 / 10 of the data size of the input frames and reconstructed frames.
[0049] In such Figure 3 In the memory arrangement shown, the image encoder needs to set up two frame buffers (or one frame buffer that can hold two frames) to store reference frames, which requires a large amount of storage space. To save memory usage, embodiments of the present invention provide an image encoding scheme that can be used for image encoding processing of the aforementioned image groups.
[0050] Please refer to Figure 4 , Figure 4 This invention illustrates an embodiment of the invention where a series of input frames are passed through an image encoder (such as...). Figure 5The image encoder 50 generates reconstructed frames and encoded bitstreams, along with associated image encoding methods. Similarly, this series of input frames can be viewed as a group of images, consisting of an I-frame, several key P-frames, and multiple P-frames. In this example, the storage space arranged by the image encoder includes a frame buffer R (second memory unit) and a bitstream buffer E (first memory unit). The frame buffer R is similar to... Figure 3 In the example, the frame buffer R is used to store the image content of the reconstructed frame as a reference frame. The bitstream buffer E is used to store the encoded bitstream generated by the entropy coding circuit.
[0051] More specifically, when the input frame to the image encoder is treated as an I-frame, the reconstructed frame of the I-frame can be stored in the frame buffer R, and the encoded bitstream can be stored in the bitstream buffer E. More specifically, the image encoder can perform intra-frame prediction on the I-frame using intra-frame prediction circuitry to generate an intra-predicted frame (which is output as the predicted frame to the residual calculation circuitry). The residual frame of the input frame treated as an I-frame is generated based on the predicted frame and the input frame. The residual frame can be further quantized / dequantized and transformed / detransformed to generate a reconstructed frame, while entropy coding is also performed to generate the encoded bitstream.
[0052] When an input frame is considered a P-frame and is not a critical P-frame, the image encoder can obtain the previous reconstructed frame from the frame buffer R as a reference frame to perform inter-frame prediction, so as to generate a new reconstructed frame about the P-frame, and then store the new reconstructed frame in the frame buffer R.
[0053] Within the same image group, key P-frames require I-frames as reference frames for inter-frame prediction. It's important to note that the information in the I-frame is carried by the encoded bitstream stored in the bitstream buffer E. Therefore, when an input frame determined to be a key P-frame is received, the encoded bitstream stored in the bitstream buffer E can be decoded for reconstruction, and the decoder can be used to achieve this. In one embodiment, when the image encoder processes the P-frame preceding a key P-frame, the decoder can decode the encoded bitstream stored in the bitstream buffer E, and the decoded encoded bitstream is then stored in the frame buffer R, as shown below. Figure 4 As shown. At this time, the frame buffer R does not need to be used to store the contents of the previous reconstructed frame, so the reconstructed frame about the I-frame generated after decoding the encoded bitstream can be written into the frame buffer R. For this key P-frame, the image encoder can obtain the reconstructed frame about the I-frame from the frame buffer R as a reference frame for inter-frame prediction, and generate a new reconstructed frame about this key P-frame, and then store it in the frame buffer R for use in the next P-frame.
[0054] In this way, for the processing of general P-frames, the image encoder can directly use the frame data stored in the frame buffer R as a reference frame; while for the processing of critical P-frames, the image encoder can use the decoder to decode the encoded bitstream stored in the bitstream buffer E to retrieve the reconstructed frame about the I-frame, and then write it into the frame buffer R as a reference frame, thereby completing the image processing operation.
[0055] Based on the above-described coding structure for image groups, there is no need to arrange as... Figure 3 The two frame buffers shown (including frame buffer L and frame buffer R); according to... Figure 4 In the image coding method shown, the frame buffer L, originally used to store reconstructed frames about I-frames, can be replaced by a smaller bitstream buffer E to provide a long-term reference frame. More specifically, Figure 3 The frame buffer L shown is used to store uncompressed image data in the reconstructed frame, but Figure 4 The bitstream buffer E shown only needs to store the encoded bitstream containing compressed data, and the amount of data in the encoded bitstream is much smaller than that of the reconstructed frame. For example, a 4-megapixel image frame produces a reconstructed frame with approximately 6 megabytes (MB), while the corresponding compressed / encoded bitstream is approximately 500-800 kilobytes (KB) or less, depending on the compression ratio. Thus, compared to the original storage space, the image encoder only needs to use about 1 / 10 of the storage space to store the image content information of the I-frame (in bitstream format), along with a decoder. When a key P-frame wants to use the I-frame as a reference frame, the decoder can decode the encoded bitstream stored in the bitstream buffer E to retrieve the reconstructed frame for the I-frame. This decoder can be implemented using an existing decoder in the system (e.g., when the system is a video codec with decoding capabilities), or an additional decoder can be added.
[0056] Please refer to Figure 5 , Figure 5 This is a schematic diagram of the image encoder 50 according to an embodiment of the present invention. Figure 5 As shown, the structure of the image encoder 50 is similar to Figure 2The structure of image encoder 20 is similar, so signals or components with similar functions are represented by the same symbols. The difference between image encoder 50 and image encoder 20 is that image encoder 50 also includes a decoding circuit 500, and an additional bitstream buffer 510 can be built into image encoder 50 or configured in conjunction with image encoder 50. Furthermore, in image encoder 50, the frame buffer 220 in image encoder 20 can be replaced by a smaller frame buffer 520. More specifically, the frame buffer 520 in image encoder 50 is required to accommodate the previous P-frame; while the frame buffer 220 in image encoder 20 is required to accommodate the previous P-frame and a reconstructed frame of a long-term reference frame (i.e., an I-frame). Therefore, the size of frame buffer 220 is twice that of frame buffer 520.
[0057] In the image encoder 50, the encoded bitstream of I-frames generated by the entropy encoding circuit 212 can be stored in the bitstream buffer 510. When the image encoder 50 receives an input frame determined to be a key P-frame, the decoding circuit 500 (or decoder) receives the encoded bitstream from the bitstream buffer 510 and decodes it to generate a reference frame. This reference frame can be stored in the frame buffer 520 for use in performing inter-frame prediction on the key P-frame. The detailed operation of other circuit modules / blocks in the image encoder 50 is similar to that of the image encoder 50. Figure 2 The image encoder 20 in the image encoder will not be described in detail here.
[0058] Please refer to Figure 6 , Figure 6 An exemplary embodiment of the decoding circuit 500 of this invention is shown. For example... Figure 6 As shown, the decoding circuit 500 includes an entropy decoding circuit 602, an inverse quantization and inverse conversion circuit 604, an intra-frame prediction circuit 606, and a deblocking filter circuit 608. The encoded bitstream obtained from the bitstream buffer can be received by the entropy decoding circuit 602, which can decode the encoded bitstream to generate quantization conversion coefficients. Examples of the entropy decoding circuit 602 include, but are not limited to, a context-adaptive binary arithmetic codec (CABAC) decoder and a variable-length decoder (VLD). The quantization conversion coefficients can be further inversely quantized and inverse converted by the inverse quantization and inverse conversion circuit 604 to restore the quantization conversion coefficients and retrieve the residual frame. Then, the intra-frame prediction circuit 606 can perform intra-frame prediction based on the residual frame to generate a reconstructed frame. The reconstructed frame can be further converted into a deblocked reconstructed frame by the deblocking filter circuit 608. This (deblocked) reconstructed frame can then be used as a long-term reference frame for key P-frames in the image group.
[0059] It is worth noting that, Figure 6 The structure shown is only one of many implementations of the decoding circuit 500. In one embodiment, the image encoder may be an integrated circuit (IC), and the decoding circuit may be an additional decoder built into the IC. In another embodiment, the image encoder may be included in an image codec IC, and the decoding circuit may be a component of the image codec IC related to the image decoder. In fact, any decoding circuit that can be used in the image encoder can be used as long as it is capable of processing the encoded bitstream and restoring the encoded bitstream to a reconstructed frame carrying information of the original image frame.
[0060] It should also be noted that one of the main objectives of this invention is to provide an image encoding method and a related image encoder to reduce storage space usage. Those skilled in the art will be able to make modifications or variations accordingly, and are not limited thereto. For example, the image encoder may be an H.264 encoder configured with a decoding circuit, such as... Figure 5 The structure is shown. In another embodiment, the image encoder may also be an H.265 encoder or other encoding circuit configured with a decoding circuit, wherein the decoding circuit can be used to decode the encoded bitstream corresponding to the I-frame to generate a reference frame.
[0061] The circuit module of the image encoder and decoding circuit proposed in this invention can be implemented in various suitable ways, such as software, firmware, hardware or a combination thereof. Its implementation may include one or more of the following: digital signal processor (DSP), microprocessor, discrete logic circuit, and application specific integrated circuit (ASIC).
[0062] The above description of the operation of an image encoder can be summarized as an encoding process 70, such as... Figure 7 As shown. Encoding process 70 can be implemented in an image encoder, such as... Figure 5 The image encoder 50 in the image encoder includes the following steps:
[0063] Step 700: Begin.
[0064] Step 702: Receive a series of input frames.
[0065] Step 704: Perform at least one of intra-frame prediction and inter-frame prediction on the series of input frames to generate at least one of an I-frame, a P-frame, and a key P-frame.
[0066] Step 706: Generate an encoded bitstream for the first input frame that is determined to be an I-frame in the series of input frames.
[0067] Step 708: Perform inter-frame prediction on a second input frame that is determined to be a key P frame in the series of input frames, based on a first reference frame obtained from the coded bitstream of the first input frame.
[0068] Step 710: End.
[0069] According to encoding process 70, the encoded bitstream of the first input frame (i.e., the I-frame) can be stored in a bitstream buffer. This encoded bitstream can be decoded to generate the first reference frame, which can be stored in a frame buffer. This eliminates the need for storage space for long-term reference frames, thus reducing the use of the frame buffer. In other words, the long-term reference frame is stored in the format of an encoded bitstream, which is generated after compression and encoding. Therefore, the amount of data in the encoded bitstream is much smaller than the amount of data in the input frame or the reconstructed frame. Other detailed implementation and operation methods of encoding process 70 can be found in the above paragraphs and will not be repeated here.
[0070] In summary, this invention proposes an image coding method and a related image encoder. The image coding method can be used for the coding structure of image groups, where a group includes an I-frame, several key P-frames, and multiple P-frames. In the image group coding scheme, P-frames can be processed by referencing information from previous frames and through inter-frame prediction, while key P-frames in the same group can be processed by referencing information from I-frames and through inter-frame prediction. Information from previous frames can be stored in a frame buffer, while information from I-frames is carried by the encoded bitstream and stored in a bitstream buffer, without requiring additional storage space in the frame buffer. In this case, the storage space required by the image encoder includes a frame buffer for storing one frame and a bitstream buffer for storing the encoded bitstream. Since the encoded bitstream is generated after compression and encoding, the amount of data in the encoded bitstream is much less than the amount of data in the original input frame. Therefore, compared to the existing method of storing the reconstructed I-frame in a long-term reference frame buffer, the image coding method of this invention can significantly reduce the use of storage space.
[0071] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for an image encoder, comprising: Receive a series of input frames; Perform at least one of intra-frame prediction and inter-frame prediction on the series of input frames to generate at least one of an intra-coded frame (hereinafter referred to as I-frame), a predictive coded frame (hereinafter referred to as P-frame), and a key predictive coded frame (hereinafter referred to as key P-frame). An encoded bitstream is generated for the first input frame that is determined to be the I-frame in the series of input frames, and the encoded bitstream is stored in a bitstream buffer of the image encoder; The encoded bitstream stored in the bitstream buffer is decoded to generate a first reference frame, and the first reference frame is stored in a frame buffer of the image encoder. A reconstructed frame corresponding to the first input frame that is determined to be the I-frame is stored in the frame buffer; as well as Based on the first reference frame obtained from the frame buffer, the inter-frame prediction is performed on a second input frame that is determined to be a key P-frame in the series of input frames; The step of generating the encoded bitstream for the first input frame, which is determined to be the I-frame in the series of input frames, includes: The intra-frame prediction is performed on the first input frame that is determined to be the I-frame in the series of input frames to generate an intra-frame predicted frame. Based on the intra-predicted frame and the first input frame, a residual frame is generated; and Entropy coding is performed based on the quantization conversion coefficients corresponding to the residual frame and the associated intra-frame prediction mode information to produce the coded bitstream for the first input frame.
2. The method as described in claim 1, characterized in that, Also includes: Based on a second reference frame obtained from the frame buffer, the inter-frame prediction is performed on a third input frame in the series of input frames that is determined to be the P frame, wherein the second reference frame is a reconstructed frame generated by the image encoder encoding a previous input frame preceding the third input frame.
3. The method as described in claim 1, characterized in that, The first input frame and the second input frame belong to an image group.
4. The method as described in claim 1, characterized in that, The step of decoding the encoded bitstream stored in the bitstream buffer to generate the first reference frame is performed by a decoding circuit built into the image encoder.
5. The method as described in claim 1, characterized in that, The steps of decoding the encoded bitstream stored in the bitstream buffer to generate the first reference frame include: Entropy decoding, dequantization, and inverse transformation are performed on the encoded bitstream to produce a restored residual data; and The intra-frame prediction is performed based on the restored residual data to reconstruct the first reference frame.
6. An image encoder, comprising: A receiving circuit used to receive a series of input frames; An intra-frame prediction circuit is used to perform intra-frame prediction on the first input frame that is determined to be an intra-frame coded frame (hereinafter referred to as an I-frame) in the series of input frames; An inter-frame prediction circuit is used to perform an inter-frame prediction on a second input frame that is determined to be a key predictive coded frame in a series of input frames, based on a first reference frame obtained from a coded bitstream of the first input frame. An entropy coding circuit is used to generate the coded bitstream for the first input frame; A stream buffer is used to store the encoded stream; A decoding circuit is used to decode the encoded bitstream stored in the bitstream buffer to generate the first reference frame; A deblocking filter circuit is used to generate a reconstructed frame corresponding to the first input frame that is determined to be the I-frame; A frame buffer is used to store the first reference frame and the reconstructed frame; and A residual calculation circuit is used to generate a residual frame based on an intra-frame prediction frame and the first input frame. The intra-frame prediction circuit performs intra-frame prediction on the first input frame that is determined to be the I-frame in the series of input frames to generate the intra-frame prediction frame, and the entropy coding circuit performs entropy coding according to the quantization conversion coefficients corresponding to the residual frame and the related intra-frame prediction mode information to generate the coded bitstream for the first input frame.
7. The image encoder as described in claim 6, characterized in that, The inter-frame prediction circuit is also used to perform the inter-frame prediction on a third input frame, which is determined to be a predictive coded frame in the series of input frames, based on a second reference frame obtained from the frame buffer, wherein the second reference frame is a reconstructed frame generated by the image encoder encoding a previous input frame preceding the third input frame.
8. The image encoder as described in claim 6, characterized in that, The first input frame and the second input frame belong to an image group.
9. The image encoder as described in claim 6, characterized in that, The decoding circuit is also used to perform the following steps: Entropy decoding, dequantization, and inverse transformation are performed on the encoded bitstream to produce a restored residual data; and The intra-frame prediction is performed based on the restored residual data to reconstruct the first reference frame.