Legal claims defining the scope of protection. Each claim is shown in both the original legal language and a plain English translation.
1. A video coding processing method, applied to an electronic device, and comprising: identifying a to-be-coded macroblock in a to-be-coded video frame; obtaining an inter-frame coding cost of the to-be-coded macroblock based on at least one inter-frame coding scheme, a quantity of the at least one inter-frame coding scheme being less than a total quantity of inter-frame coding schemes, or a coding cost corresponding to the inter-frame coding scheme being error information obtained based on a coded video frame and the to-be-coded video frame; obtaining an intra-frame coding cost of the to-be-coded macroblock based on at least one intra-frame coding scheme, a quantity of the at least one intra-frame coding scheme being less than a total quantity of intra-frame coding schemes, or a coding cost corresponding to the intra-frame coding scheme being error information obtained based on a coded macroblock in the to-be-coded video frame and the to-be-coded video frame; comparing the inter-frame coding cost with the intra-frame coding cost to obtain a comparison result; obtaining, based on the comparison result, a probability of performing intra-frame predictive coding on the to-be-coded macroblock and a probability of performing inter-frame predictive coding on the to-be-coded macroblock; determining a coding scheme of the to-be-coded macroblock based on the probability of the intra-frame predictive coding and the probability of the inter-frame predictive coding, the coding scheme comprising the intra-frame predictive coding and the inter-frame predictive coding; and coding the to-be-coded macroblock according to the coding scheme.
This invention relates to video coding techniques, specifically optimizing the selection of coding schemes for macroblocks in video frames. The problem addressed is the computational inefficiency in traditional video coding, where all possible inter-frame and intra-frame coding schemes are evaluated, leading to high processing overhead. The solution involves a probabilistic approach to reduce the number of evaluated schemes while maintaining coding efficiency. The method identifies a macroblock in a video frame to be coded. For inter-frame coding, it calculates the coding cost using a subset of available inter-frame schemes or error information derived from previously coded frames. Similarly, for intra-frame coding, it computes the cost using a subset of intra-frame schemes or error information from neighboring coded macroblocks. The inter-frame and intra-frame costs are compared to determine probabilities for selecting intra-frame or inter-frame predictive coding. Based on these probabilities, the optimal coding scheme is chosen, and the macroblock is encoded accordingly. This approach reduces computational complexity by avoiding exhaustive evaluation of all possible coding schemes while maintaining coding quality.
2. The video coding processing method according to claim 1 , further comprising: determining the coding scheme of the to-be-coded macroblock as the inter-frame predictive coding when the comparison result indicates that the intra-frame coding cost is greater than A multiplied by the inter-frame coding cost, wherein A is a coefficient greater than a first value; or determining the coding scheme of the to-be-coded macroblock as the intra-frame predictive coding when the comparison result indicates that the inter-frame coding cost is greater than B multiplied by the intra-frame coding cost, wherein B is a coefficient greater than a second value.
This invention relates to video coding, specifically optimizing the selection between intra-frame and inter-frame predictive coding for macroblocks in a video sequence. The problem addressed is efficiently determining the most efficient coding scheme to minimize computational cost while maintaining video quality. The method involves comparing the coding costs of intra-frame and inter-frame predictive coding for a macroblock and selecting the coding scheme based on weighted comparisons. If the intra-frame coding cost exceeds a threshold (A times the inter-frame coding cost), where A is a coefficient greater than a predefined first value, the macroblock is coded using inter-frame prediction. Conversely, if the inter-frame coding cost exceeds another threshold (B times the intra-frame coding cost), where B is a coefficient greater than a predefined second value, the macroblock is coded using intra-frame prediction. The coefficients A and B introduce flexibility in the decision-making process, allowing for adaptive tuning based on video content characteristics. This approach improves coding efficiency by dynamically adjusting the selection criteria, reducing unnecessary computations and improving compression performance.
3. The video coding processing method according to claim 1 , wherein the obtaining, based on the comparison result, a probability of performing the intra-frame predictive coding on the to-be-coded macroblock and a probability of performing the inter-frame predictive coding on the to-be-coded macroblock comprises: obtaining coding schemes of K neighboring coded macroblocks of the to-be-coded macroblock, wherein K is a positive integer; and obtaining the probability of the intra-frame predictive coding and the probability of the inter-frame predictive coding based on the comparison result and the coding schemes of the K neighboring coded macroblocks.
This invention relates to video coding, specifically improving the efficiency of predictive coding by dynamically determining the likelihood of using intra-frame or inter-frame predictive coding for a macroblock based on neighboring macroblocks. The problem addressed is the suboptimal selection of coding schemes, which can lead to inefficient compression and higher bitrate. The method involves analyzing the coding schemes of K neighboring macroblocks (where K is a positive integer) that have already been encoded. These neighboring macroblocks provide contextual information about which coding scheme (intra-frame or inter-frame) was most effective in the surrounding area. The method then compares the characteristics of the to-be-coded macroblock with these neighboring macroblocks to determine the probability of selecting intra-frame or inter-frame predictive coding. This probability-based approach ensures that the coding decision aligns with the local video content, improving compression efficiency and reducing bitrate. By leveraging the coding schemes of neighboring macroblocks, the method adapts to spatial correlations in the video, making the coding process more efficient. This dynamic selection reduces the need for exhaustive mode decisions and improves overall video compression performance.
4. The video coding processing method according to claim 3 , wherein the obtaining the probability of the intra-frame predictive coding and the probability of the inter-frame predictive coding based on the comparison result and the coding schemes of the K neighboring coded macroblocks comprises: setting the probability of the inter-frame predictive coding to a first value when the comparison result indicates that the intra-frame coding cost is greater than A multiplied by the inter-frame coding cost, and determining the probability of the intra-frame predictive coding based on a location of the to-be-coded macroblock in the to-be-coded video frame and the coding schemes of the K neighboring coded macroblocks, wherein A is a coefficient greater than a first value; or setting the probability of the intra-frame predictive coding to a second value when the comparison result indicates that the inter-frame coding cost is greater than B multiplied by the intra-frame coding cost, and determining the probability of the inter-frame predictive coding based on a location of the to-be-coded macroblock in the to-be-coded video frame and the coding schemes of the K neighboring coded macroblocks, wherein B is a coefficient greater than a second value.
This invention relates to video coding, specifically improving the selection of predictive coding schemes for macroblocks in video frames. The problem addressed is efficiently determining whether to use intra-frame (within-frame) or inter-frame (between-frame) predictive coding for a macroblock, balancing computational cost and coding efficiency. The method involves comparing the coding costs of intra-frame and inter-frame predictive coding for a macroblock and adjusting the probabilities of selecting each coding scheme based on the comparison. If the intra-frame coding cost exceeds a threshold (A times the inter-frame cost), the inter-frame coding probability is set to a predefined first value, while the intra-frame probability is determined based on the macroblock's location and the coding schemes of neighboring macroblocks. Conversely, if the inter-frame coding cost exceeds a threshold (B times the intra-frame cost), the intra-frame coding probability is set to a predefined second value, and the inter-frame probability is determined similarly. The coefficients A and B are greater than their respective predefined values, ensuring the thresholds are meaningful. Neighboring macroblocks' coding schemes influence the probability adjustments, improving adaptive decision-making. This approach optimizes coding efficiency by dynamically adjusting probabilities based on cost comparisons and spatial context.
5. The video coding processing method according to claim 4 , wherein the determining the probability of the intra-frame predictive coding based on a location of the to-be-coded macroblock in the to-be-coded video frame and the coding schemes of the K neighboring coded macroblocks comprises: setting the probability of the intra-frame predictive coding to a third value when the to-be-coded macroblock is located at an edge of the to-be-coded video frame; or setting the probability of the intra-frame predictive coding to a fourth value when the to-be-coded macroblock is not located at an edge of the to-be-coded video frame and a quantity of coded macroblocks using the intra-frame predictive coding in the K neighboring coded macroblocks is less than a third value.
Video coding involves compressing video data to reduce storage and transmission requirements while maintaining quality. A key challenge is efficiently selecting predictive coding modes, such as intra-frame (within-frame) or inter-frame (between-frames) prediction, to optimize compression. Intra-frame prediction exploits spatial redundancy within a single frame, while inter-frame prediction leverages temporal redundancy across frames. The choice of mode impacts compression efficiency and computational cost. This invention addresses the problem of dynamically determining the probability of using intra-frame predictive coding for a macroblock (a block of pixels) in a video frame based on its location and the coding schemes of neighboring macroblocks. The method adjusts the probability based on two conditions: (1) if the macroblock is at the edge of the frame, the probability is set to a predefined third value, likely favoring intra-frame coding due to reduced temporal correlation at edges. (2) If the macroblock is not at the edge and fewer than a specified number of neighboring macroblocks use intra-frame coding, the probability is set to a fourth value, potentially reducing intra-frame usage to avoid over-reliance on spatial prediction. The neighboring macroblocks are previously coded blocks within a defined range (K) of the current macroblock. This adaptive approach balances compression efficiency and computational complexity by dynamically adjusting prediction strategies based on local frame characteristics.
6. The video coding processing method according to claim 5 , wherein the determining the probability of the intra-frame predictive coding based on a location of the to-be-coded macroblock in the to-be-coded video frame and the coding schemes of the K neighboring coded macroblocks further comprises: setting the probability of the intra-frame predictive coding to the second value when the to-be-coded macroblock is not located at the edge of the to-be-coded video frame and the quantity of coded macroblocks using the intra-frame predictive coding among the K neighboring coded macroblocks is greater than or equal to the third value.
This invention relates to video coding, specifically improving intra-frame predictive coding decisions in video compression. The problem addressed is efficiently determining whether to use intra-frame prediction for a macroblock based on its position and the coding schemes of neighboring macroblocks, optimizing compression efficiency and computational resources. The method involves analyzing a to-be-coded macroblock in a video frame and its K neighboring coded macroblocks. If the macroblock is not at the frame's edge and a sufficient number (third value) of its neighboring macroblocks use intra-frame prediction, the probability of selecting intra-frame prediction for the current macroblock is set to a predefined second value. This adaptive approach balances prediction accuracy and computational cost by leveraging spatial correlations while avoiding unnecessary intra-coding at frame edges where inter-frame prediction may be more effective. The solution dynamically adjusts prediction strategies based on local coding patterns, improving compression efficiency without excessive processing overhead.
7. The video coding processing method according to claim 6 , wherein the coding scheme further comprises: simultaneously performing the intra-frame predictive coding and the inter-frame predictive coding; or first performing the inter-frame predictive coding and then determining, based on a result of the inter-frame predictive coding, whether the intra-frame predictive coding needs to be performed; and when the probability of the inter-frame predictive coding is the first value, the determining the coding scheme of the to-be-coded macroblock based on the probability of the intra-frame predictive coding and the probability of the inter-frame predictive coding comprises: determining, when the probability of the intra-frame predictive coding is the third value, the coding scheme of the to-be-coded macroblock as the first performing the inter-frame predictive coding and then determining, based on a result of the inter-frame predictive coding, whether the intra-frame predictive coding needs to be performed; or determining the coding scheme of the to-be-coded macroblock as the inter-frame predictive coding when the probability of the intra-frame predictive coding is the fourth value; or determining, when the probability of the intra-frame predictive coding is the second value, the coding scheme of the to-be-coded macroblock as the simultaneously performing the intra-frame predictive coding and the inter-frame predictive coding.
This invention relates to video coding techniques, specifically methods for selecting predictive coding schemes for macroblocks in video frames. The problem addressed is optimizing the choice between intra-frame (spatial) and inter-frame (temporal) predictive coding to improve compression efficiency and quality. The method involves analyzing probabilities associated with each coding type to determine the optimal approach for a given macroblock. The coding scheme selection process can operate in multiple modes. One mode involves performing both intra-frame and inter-frame predictive coding simultaneously. Another mode first performs inter-frame predictive coding and then conditionally applies intra-frame coding based on the inter-frame results. The decision is guided by predefined probability thresholds. If the inter-frame coding probability meets a first threshold, the system may prioritize inter-frame coding. If the intra-frame probability meets a second threshold, both coding types are performed concurrently. If the intra-frame probability meets a third threshold, the system defaults to inter-frame coding first, with intra-frame coding applied only if needed. This adaptive approach balances computational efficiency and coding accuracy by dynamically adjusting the predictive strategy based on statistical likelihoods.
8. The video coding processing method according to claim 4 , wherein the determining the probability of the inter-frame predictive coding based on a location of the to-be-coded macroblock in the to-be-coded video frame and the coding schemes of the K neighboring coded macroblocks comprises: setting the probability of the inter-frame predictive coding to a fifth value when the to-be-coded macroblock is located at an edge of the to-be-coded video frame; or setting the probability of the inter-frame predictive coding to a sixth value when the to-be-coded macroblock is not located at an edge of the to-be-coded video frame and a quantity of coded macroblocks using the intra-frame predictive coding in the K neighboring coded macroblocks is greater than or equal to a fourth value.
This invention relates to video coding, specifically improving inter-frame predictive coding efficiency by dynamically adjusting prediction probabilities based on macroblock location and neighboring macroblock coding schemes. The method addresses the challenge of optimizing predictive coding decisions in video compression, where static probability assignments can lead to suboptimal performance. The technique determines the probability of inter-frame predictive coding for a to-be-coded macroblock by analyzing its position within the video frame and the coding schemes of adjacent macroblocks. If the macroblock is at the frame edge, the inter-frame prediction probability is set to a predefined fifth value. If the macroblock is not at the edge and a sufficient number (at least a fourth value) of neighboring macroblocks use intra-frame coding, the inter-frame prediction probability is set to a predefined sixth value. This adaptive approach improves coding efficiency by leveraging spatial and contextual information, reducing redundant computations, and enhancing compression performance. The method integrates with broader video coding systems that use macroblock-based partitioning and predictive coding techniques.
9. The video coding processing method according to claim 8 , wherein the determining the probability of the inter-frame predictive coding based on a location of the to-be-coded macroblock in the to-be-coded video frame and the coding schemes of the K neighboring coded macroblocks further comprises: setting the probability of the inter-frame predictive coding to the first value when the to-be-coded macroblock is not located at the edge of the to-be-coded video frame and the quantity of coded macroblocks using the intra-frame predictive coding in the K neighboring coded macroblocks is less than the fourth value.
This invention relates to video coding, specifically improving inter-frame predictive coding decisions in video compression. The problem addressed is efficiently determining whether to use inter-frame or intra-frame predictive coding for a macroblock in a video frame, based on its position and the coding schemes of neighboring macroblocks. The method involves analyzing the location of the macroblock within the frame and the coding schemes of K neighboring macroblocks. If the macroblock is not at the edge of the frame and fewer than a specified number (fourth value) of the neighboring macroblocks use intra-frame predictive coding, the probability of selecting inter-frame predictive coding is set to a predefined first value. This approach optimizes coding efficiency by dynamically adjusting the likelihood of inter-frame prediction based on spatial context, reducing computational overhead and improving compression performance. The method leverages spatial correlations in video frames to make more informed coding decisions, enhancing overall video quality and compression ratios.
10. The video coding processing method according to claim 9 , wherein the coding scheme further comprises: simultaneously performing the intra-frame predictive coding and the inter-frame predictive coding; or first performing the intra-frame predictive coding and then determining, based on a result of the intra-frame predictive coding, whether the inter-frame predictive coding needs to be performed; and when the probability of the intra-frame predictive coding is the second value, the determining the coding scheme of the to-be-coded macroblock based on the probability of the intra-frame predictive coding and the probability of the inter-frame predictive coding comprises: determining, when the probability of the inter-frame predictive coding is the fifth value, the coding scheme of the to-be-coded macroblock as the first performing the intra-frame predictive coding and then determining, based on a result of the intra-frame predictive coding, whether the inter-frame predictive coding needs to be performed; or determining the coding scheme of the to-be-coded macroblock as the intra-frame predictive coding when the probability of the inter-frame predictive coding is the sixth value; or determining, when the probability of the inter-frame predictive coding is the first value, the coding scheme of the to-be-coded macroblock as the simultaneously performing the intra-frame predictive coding and the inter-frame predictive coding.
This invention relates to video coding techniques, specifically methods for selecting coding schemes for macroblocks in video frames. The problem addressed is optimizing the selection between intra-frame (spatial) and inter-frame (temporal) predictive coding to improve compression efficiency and reduce computational overhead. The method involves determining probabilities for intra-frame and inter-frame predictive coding and using these probabilities to select an optimal coding scheme for each macroblock. The coding scheme may involve either performing both intra-frame and inter-frame predictive coding simultaneously, or first performing intra-frame predictive coding and then conditionally performing inter-frame predictive coding based on the intra-frame result. When the probability of intra-frame coding reaches a predefined second value, the selection process further evaluates the probability of inter-frame coding. If the inter-frame probability is a fifth value, the method first performs intra-frame coding and then decides whether to perform inter-frame coding based on the intra-frame result. If the inter-frame probability is a sixth value, only intra-frame coding is performed. If the inter-frame probability is a first value, both intra-frame and inter-frame coding are performed simultaneously. This adaptive approach aims to balance coding efficiency and computational complexity.
11. The video coding processing method according to claim 1 , wherein the identifying a to-be-coded macroblock in a to-be-coded video frame comprises: performing downsampling of a ratio on the to-be-coded video frame, to obtain a pre-coded video frame; segmenting the pre-coded video frame into a plurality of macroblocks; and determining the plurality of macroblocks as the to-be-coded macroblock one by one.
This invention relates to video coding, specifically improving efficiency in identifying and processing macroblocks for encoding. The problem addressed is the computational overhead in analyzing high-resolution video frames, which can slow down encoding processes. The solution involves a multi-step approach to reduce processing complexity. First, the method performs downsampling on the original video frame by a specified ratio, creating a lower-resolution pre-coded frame. This reduces the data volume while preserving essential structural information. Next, the downsampled frame is segmented into multiple macroblocks, which are then processed sequentially. Each macroblock is analyzed to determine its suitability for encoding, ensuring only relevant blocks are further processed. This approach minimizes unnecessary computations by working with a reduced-resolution version of the frame before detailed encoding. The method is particularly useful in real-time or resource-constrained environments where processing efficiency is critical. By downsampling before segmentation, the technique balances accuracy and performance, making it suitable for applications requiring fast video encoding without significant quality loss.
12. The video coding processing method according to claim 11 , wherein the performing downsampling of a ratio on the to-be-coded video frame, to obtain a pre-coded video frame comprises: performing the downsampling of the ratio on the to-be-coded video frame, to obtain a target video frame; and adjusting the target video frame, to obtain the adjusted pre-coded video frame, so that a length of the pre-coded video frame is an integer multiple of a length of the to-be-coded macroblock, and a width of the pre-coded video frame is an integer multiple of a width of the to-be-coded macroblock.
This invention relates to video coding, specifically improving the efficiency of encoding video frames by downsampling them before processing. The problem addressed is ensuring that downsampled video frames maintain compatibility with macroblock-based encoding, where macroblocks are fixed-size blocks used in video compression standards like MPEG or H.264. The method involves downsampling a video frame by a specified ratio to produce a target video frame. This target frame is then adjusted to ensure its dimensions are integer multiples of the macroblock dimensions. The adjustment ensures that the pre-coded frame can be divided evenly into macroblocks, preventing misalignment or wasted processing. This step is critical for maintaining encoding efficiency and compatibility with existing video compression standards. By enforcing integer multiples of macroblock dimensions, the method avoids partial macroblocks, which could lead to inefficiencies or errors in the encoding process. The adjusted pre-coded frame is then used for further video coding, improving compression performance while maintaining compatibility with standard video encoding pipelines. This approach is particularly useful in scenarios where video frames need to be resized or adapted for efficient encoding without losing structural integrity.
13. A video coding processing apparatus, comprising: a processor and a memory connected to the processor, the memory storing machine-readable instructions executable to the processor, and the processor executing the machine-readable instructions to perform the following operations: identifying a to-be-coded macroblock in a to-be-coded video frame; obtaining an inter-frame coding cost of the to-be-coded macroblock based on at least one inter-frame coding scheme, a quantity of the at least one inter-frame coding scheme being less than a total quantity of inter-frame coding schemes, or a coding cost corresponding to the at least one inter-frame coding scheme being error information obtained based on a coded video frame and the to-be-coded video frame; obtaining an intra-frame coding cost of the to-be-coded macroblock based on at least one intra-frame coding scheme, a quantity of the at least one intra-frame coding scheme being less than a total quantity of intra-frame coding schemes, or a coding cost corresponding to the at least one intra-frame coding scheme being error information obtained based on a coded macroblock in the to-be-coded video frame and the to-be-coded video frame; comparing the inter-frame coding cost with the intra-frame coding cost, to obtain a comparison result; obtaining, based on the comparison result, a probability of performing intra-frame predictive coding on the to-be-coded macroblock and a probability of performing inter-frame predictive coding on the to-be-coded macroblock; determining a coding scheme of the to-be-coded macroblock based on the probability of the intra-frame predictive coding and the probability of the inter-frame predictive coding, the coding scheme comprising the intra-frame predictive coding and the inter-frame predictive coding; and coding the to-be-coded macroblock according to the coding scheme.
The invention relates to video coding, specifically a method for selecting between intra-frame and inter-frame predictive coding for macroblocks in a video frame. The system addresses the challenge of efficiently determining the optimal coding scheme by reducing computational complexity while maintaining coding accuracy. The apparatus includes a processor and memory storing instructions to perform the following steps. First, a macroblock in a video frame is identified for coding. The system then calculates an inter-frame coding cost using a subset of available inter-frame coding schemes or error information derived from previously coded frames. Similarly, an intra-frame coding cost is computed using a subset of intra-frame coding schemes or error information from coded macroblocks within the same frame. The inter-frame and intra-frame costs are compared to determine their relative efficiency. Based on this comparison, probabilities for selecting intra-frame or inter-frame coding are derived. The final coding scheme is chosen based on these probabilities, and the macroblock is encoded accordingly. This approach optimizes coding decisions by leveraging partial cost calculations and probabilistic selection, reducing computational overhead while maintaining coding quality.
14. The video coding processing apparatus according to claim 13 , wherein the processor further executes the machine-readable instructions to perform the following operations: determining the coding scheme of the to-be-coded macroblock as the inter-frame predictive coding when the comparison result indicates that the intra-frame coding cost is greater than A multiplied by the inter-frame coding cost, wherein A is a coefficient greater than a first value; or determining the coding scheme of the to-be-coded macroblock as the intra-frame predictive coding when the comparison result indicates that the inter-frame coding cost is greater than B multiplied by the intra-frame coding cost, wherein B is a coefficient greater than a second value.
This invention relates to video coding, specifically optimizing the selection of coding schemes for macroblocks in video frames. The problem addressed is efficiently choosing between intra-frame (within-frame) and inter-frame (between-frame) predictive coding to minimize computational cost while maintaining video quality. Intra-frame coding encodes a macroblock using data from the same frame, while inter-frame coding uses data from a reference frame. The challenge is determining which method is more efficient for a given macroblock without excessive computation. The apparatus includes a processor that compares the coding costs of intra-frame and inter-frame methods for a macroblock. If the intra-frame cost exceeds a threshold (A times the inter-frame cost), where A is a coefficient greater than a predefined first value, the macroblock is encoded using inter-frame prediction. Conversely, if the inter-frame cost exceeds another threshold (B times the intra-frame cost), where B is a coefficient greater than a predefined second value, the macroblock is encoded using intra-frame prediction. The thresholds A and B are adjustable to balance coding efficiency and quality. This adaptive approach reduces unnecessary computations by dynamically selecting the more efficient coding method based on cost comparisons.
15. The video coding processing apparatus according to claim 13 , wherein the obtaining, based on the comparison result, a probability of performing the intra-frame predictive coding on the to-be-coded macroblock and a probability of performing the inter-frame predictive coding on the to-be-coded macroblock comprises: obtaining coding schemes of K neighboring coded macroblocks of the to-be-coded macroblock, wherein K is a positive integer; and obtaining the probability of the intra-frame predictive coding and the probability of the inter-frame predictive coding based on the comparison result and the coding schemes of the K neighboring coded macroblocks.
This invention relates to video coding, specifically improving the efficiency of predictive coding for macroblocks in video frames. The problem addressed is determining the optimal coding scheme (intra-frame or inter-frame prediction) for a macroblock by leveraging information from neighboring macroblocks. Intra-frame prediction uses spatial redundancy within a frame, while inter-frame prediction exploits temporal redundancy across frames. The challenge is selecting the most efficient scheme dynamically to reduce computational overhead and improve compression. The apparatus obtains coding schemes of K neighboring macroblocks (where K is a positive integer) that have already been coded. These neighboring macroblocks provide contextual information about which coding scheme was effective in similar regions of the frame. The apparatus then compares the current macroblock's characteristics (e.g., texture, motion) with those of the neighboring macroblocks. Based on this comparison and the coding schemes of the K neighbors, it calculates probabilities for intra-frame and inter-frame predictive coding. This probabilistic approach ensures that the coding decision is informed by both local spatial patterns and historical coding choices, improving accuracy and efficiency. The method reduces redundant computations by avoiding exhaustive testing of all possible coding schemes for each macroblock.
16. The video coding processing apparatus according to claim 15 , wherein the obtaining the probability of the intra-frame predictive coding and the probability of the inter-frame predictive coding based on the comparison result and the coding schemes of the K neighboring coded macroblocks comprises: setting the probability of the inter-frame predictive coding to a first value when the comparison result indicates that the intra-frame coding cost is greater than A multiplied by the inter-frame coding cost, and determining the probability of the intra-frame predictive coding based on a location of the to-be-coded macroblock in the to-be-coded video frame and the coding schemes of the K neighboring coded macroblocks, wherein A is a coefficient greater than a first value; or setting the probability of the intra-frame predictive coding to a second value when the comparison result indicates that the inter-frame coding cost is greater than B multiplied by the intra-frame coding cost, and determining the probability of the inter-frame predictive coding based on a location of the to-be-coded macroblock in the to-be-coded video frame and the coding schemes of the K neighboring coded macroblocks, wherein B is a coefficient greater than a second value.
This invention relates to video coding, specifically improving the selection of predictive coding schemes for macroblocks in video frames. The problem addressed is efficiently determining whether to use intra-frame (within-frame) or inter-frame (between-frames) predictive coding to optimize compression while minimizing computational overhead. The apparatus compares the coding costs of intra-frame and inter-frame predictive coding for a macroblock. Based on this comparison, it dynamically adjusts the probabilities of selecting intra-frame or inter-frame coding. If the intra-frame coding cost exceeds a scaled inter-frame coding cost (scaled by a coefficient A), the inter-frame coding probability is set to a predefined first value, while the intra-frame probability is determined based on the macroblock's position in the frame and the coding schemes of neighboring macroblocks. Conversely, if the inter-frame coding cost exceeds a scaled intra-frame coding cost (scaled by a coefficient B), the intra-frame coding probability is set to a predefined second value, and the inter-frame probability is determined similarly. This adaptive approach balances coding efficiency and computational complexity by leveraging both cost-based decisions and spatial context from neighboring macroblocks.
17. The video coding processing apparatus according to claim 16 , wherein the determining the probability of the intra-frame predictive coding based on a location of the to-be-coded macroblock in the to-be-coded video frame and the coding schemes of the K neighboring coded macroblocks comprises: setting the probability of the intra-frame predictive coding to a third value when the to-be-coded macroblock is located at an edge of the to-be-coded video frame; or setting the probability of the intra-frame predictive coding to a fourth value when the to-be-coded macroblock is not located at an edge of the to-be-coded video frame and a quantity of coded macroblocks using the intra-frame predictive coding in the K neighboring coded macroblocks is less than a third value.
Video coding systems use predictive coding to reduce data redundancy, where intra-frame prediction encodes a macroblock based on neighboring macroblocks within the same frame. A challenge in video coding is efficiently determining whether to use intra-frame prediction for a given macroblock, as incorrect decisions can degrade compression efficiency. This invention addresses this by dynamically adjusting the probability of intra-frame prediction based on the macroblock's location and the coding schemes of neighboring macroblocks. The apparatus determines the probability of intra-frame prediction for a to-be-coded macroblock by analyzing its position and the coding methods of nearby macroblocks. If the macroblock is at the edge of the video frame, the probability is set to a predefined third value. If the macroblock is not at the edge and fewer than a specified number of neighboring macroblocks use intra-frame prediction, the probability is set to a fourth value. This adaptive approach improves coding efficiency by leveraging spatial context, reducing unnecessary intra-frame predictions in areas where they are less effective. The method ensures optimal compression by dynamically adjusting prediction strategies based on local frame characteristics.
18. A non-transitory computer-readable storage medium, the storage medium storing machine-readable instructions, and the machine-readable instructions being capable of being executed by a processor to perform the following operations: identifying a to-be-coded macroblock in a to-be-coded video frame; obtaining an inter-frame coding cost of the to-be-coded macroblock based on at least one inter-frame coding scheme, a quantity of the at least one inter-frame coding scheme being less than a total quantity of inter-frame coding schemes, or a coding cost corresponding to the at least one inter-frame coding scheme being error information obtained based on a coded video frame and the to-be-coded video frame; obtaining an intra-frame coding cost of the to-be-coded macroblock based on at least one intra-frame coding scheme, a quantity of the at least one intra-frame coding scheme being less than a total quantity of intra-frame coding schemes, or a coding cost corresponding to the at least one intra-frame coding scheme being error information obtained based on a coded macroblock in the to-be-coded video frame and the to-be-coded video frame; comparing the inter-frame coding cost with the intra-frame coding cost, to obtain a comparison result; obtaining, based on the comparison result, a probability of performing intra-frame predictive coding on the to-be-coded macroblock and a probability of performing inter-frame predictive coding on the to-be-coded macroblock; determining a coding scheme of the to-be-coded macroblock based on the probability of the intra-frame predictive coding and the probability of the inter-frame predictive coding, the coding scheme comprising the intra-frame predictive coding and the inter-frame predictive coding; and coding the to-be-coded macroblock according to the coding scheme.
This invention relates to video compression techniques, specifically optimizing the selection of coding schemes for macroblocks in video frames. The problem addressed is the computational inefficiency of evaluating all possible inter-frame and intra-frame coding schemes for each macroblock, which can be resource-intensive. The solution involves a probabilistic approach to determine the most efficient coding method. The system identifies a macroblock in a video frame to be coded and evaluates its coding cost using a subset of inter-frame coding schemes or error information derived from previously coded frames. Similarly, it assesses the intra-frame coding cost using a subset of intra-frame schemes or error information from already coded macroblocks within the same frame. The inter-frame and intra-frame costs are compared, and based on this comparison, probabilities for intra-frame and inter-frame predictive coding are calculated. The macroblock is then coded using the scheme with the higher probability, which may be either intra-frame or inter-frame predictive coding. This method reduces computational overhead by avoiding exhaustive evaluation of all possible coding schemes while maintaining coding efficiency.
Unknown
September 29, 2020
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.