Decoding device, coding device, decoding method, and coding method
By independently controlling the filtering process of the strength and weakness filter and specific weight offset values, the misjudgment problem of block effect in video encoding is solved, and image quality and encoding efficiency are improved.
Patent Information
- Application Number
- JP2024192311
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2011-11-03
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-12
- Estimated Expiration
- 2032-11-02
AI Technical Summary
When existing video encoding technologies remove blocking artifacts, it is difficult to accurately determine whether the edge is caused by quantization, resulting in excessive smoothing or edge residue, affecting image quality.
By independently controlling the strength and weakness filters, the edges are filtered using specific weights and offset values, the filter parameters are adjusted to avoid misjudgment, and precise filtering is performed with the quantized edges.
Improves image quality, reduces excessive smoothing or edge residue, and improves coding efficiency and visual experience.
Smart Images

Figure 2025020277000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a method for encoding and decoding an image, and in particular to a deblocking filtering process used in the deblocking filtering process when decoding an image. [Background technology]
[0002] Currently, most standard video coding algorithms are based on hybrid video coding. Hybrid video coding methods usually combine several different lossless and lossy compression techniques to achieve a desired compression gain. Hybrid video coding is the basis of ITU-T standards (H.26x standards such as H.261 and H.263) as well as ISO / IEC standards (MPEG-X standards such as MPEG-1, MPEG-2, MPEG-4). The latest video coding standard is called H.264 / MPEG-4 Advanced Video Coding (AVC) and is the result of standardization activities by the Joint Video Team (JVT) (a joint team between the ITU-T group and the ISO / IEC MPEG group). This codec is being further developed by the Joint Collaborative Team on Video Coding (JCT-VC) under the name High-Efficiency Video Coding (HEVC) with the aim of improving the efficiency of video coding, especially for high resolutions.
[0003] The video signal input to the encoder is a sequence of images called frames, each frame consisting of a two-dimensional matrix of pixels. All the above mentioned standards based on hybrid video coding include dividing each video frame into smaller blocks of pixels. The size of the blocks depends, for example, on the image content. The coding method may usually be different for each block. For example, in HEVC, the maximum size allowed for such a block is 64x64 pixels. This maximum size is called the maximum coding unit (LCU). In H.264 / MPEG-4 AVC, a macroblock (usually a block of 16x16 pixels) is the basic image element on which coding is performed and which may be further divided into smaller sub-blocks where some coding / decoding steps are applied.
[0004] Typically, the coding steps in hybrid video coding include spatial and / or temporal prediction. Thus, each block to be coded is first predicted using spatially or temporally adjacent blocks, i.e. blocks of a previously coded video frame. A difference block between the block to be coded and the prediction, also called prediction residual block, is then calculated. In a next coding step, the residual block is transformed from the spatial (pixel) domain to the frequency domain. The purpose of the transformation is to reduce the correlation of the input blocks. In a next coding step, the transform coefficients are quantized. In this step, a substantially lossy (irreversible) compression is performed. Usually, the compressed transform coefficient values are further compressed (losslessly) by entropy coding. Furthermore, auxiliary information necessary to reconstruct the coded video signal is coded and provided together with the coded video signal. This information concerns, for example, the spatial and / or temporal prediction, the amount of quantization, etc.
[0005] FIG. 1 shows an example of a typical video encoder 100 compliant with H.264 / MPEG-4 AVC and / or HEVC. A subtractor 105 first subtracts a to-be-encoded block of an input video (input signal s) from a corresponding predicted block
number
[0006] To obtain a decoded (reconstructed) video signal s', a decoding unit is incorporated in the video encoder 100. In line with the encoding step described above, the decoding step includes an inverse quantization and inverse transform (130). The prediction error signal e' thus obtained differs from the original prediction error signal due to quantization errors, also called quantization noise. The decoded prediction error signal e' is then converted into a prediction signal
number
number
[0007] As a result of quantization, quantization noise is superimposed on the reconstructed video signal. Due to block-based coding, the superimposed noise often has blocking characteristics, and block boundaries in the decoded image are noticeable, especially when strong quantization is performed. Blocking artifacts have a negative effect on human visual perception. To reduce these artifacts, a deblocking filter 150 is applied to all reconstructed image blocks. The deblocking filter is applied to the reconstructed signal s'. For example, the deblocking filter in H.264 / MPEG-4 AVC has a locally adaptive capability. When the degree of blocking noise is high, a strong (narrow bandwidth) low-pass filter is used, and when the degree of blocking noise is low, a weak (wide bandwidth) low-pass filter is used. The strength of the low-pass filter is determined by the prediction signal s^ and the quantized prediction error signal e'. The deblocking filter generally smooths the edges of the blocks and improves the subjective quality of the decoded image. In addition, since the filtered parts of the image are used for motion-compensated prediction of the next image, filtering also reduces the prediction error, which can improve the coding efficiency.
[0008] After the deblocking filter, a sample adaptive offset 155 and / or an adaptive loop filter 160 may be applied to the image containing the deblocked signal s''. The deblocking filter improves the subjective quality. On the other hand, the sample adaptive offset (SAO) and the ALF aim to improve the pixel-wise reliability ("objective" quality). In particular, the SAO adds an offset according to the nearest neighbors of a pixel. In particular, the adaptive loop filter (ALF) is used to compensate for image distortion caused by compression. Typically, the adaptive loop filter is a Wiener filter with filter coefficients determined such that the mean square error (MSE) between the reconstructed image s' and the source image s is minimized. The coefficients of the ALF may be calculated and transmitted on a frame-by-frame basis. The ALF can be applied to the whole frame (image of a video sequence) or to local regions (blocks). Additional auxiliary information indicating the region to filter may be transmitted (block-by-block, frame-by-frame, or quadtree-by-quadtree).
[0009] To decode an inter-coded image, a portion of the coded and decoded image must also be stored in the reference frame buffer 170. An inter-coded block is predicted (180) by using motion-compensated prediction. First, a motion detector finds the best match for the current block in the coded and decoded video frames. This best match becomes the prediction signal, and the relative displacement (motion) between the current block and the best match is signaled as motion data in the form of a three-dimensional motion vector. This motion data is included in the side information provided with the coded video data. The three dimensions consist of two spatial dimensions and one spatial dimension. To optimize the prediction accuracy, the motion vectors may be determined at a spatial sub-pixel resolution, such as half pixel resolution or quarter pixel resolution. A spatial sub-pixel resolution motion vector may point to a spatial location in the decoded frame where no real pixel value exists, i.e., a sub-pixel location. Thus, to perform the motion-compensated prediction, a spatial interpolation of such pixel values is required. This may be achieved by an interpolation filter (integrated with the prediction block 180 in FIG. 1).
[0010] In both intra- and inter-coding modes, the difference e between the target input signal and the prediction signal is transformed (110) and quantized (120) to obtain quantized coefficients. Typically, an orthogonal transform is used, such as the two-dimensional discrete cosine transform (DCT) or its integer versions, since this effectively reduces correlation in natural video. After the transform, more bits are spent on coding the low-frequency components than the high-frequency components, since the low-frequency components are usually more important for image quality than the high-frequency components. In the entropy coder, the two-dimensional array of quantized coefficients is transformed into a one-dimensional array, typically by a so-called zigzag scan, in which the two-dimensional array is scanned in a predefined order from the DC coefficient in the upper left corner to the AC coefficient in the lower right corner. Since energy is typically concentrated in the upper left part of the coefficients of the two-dimensional array, which corresponds to low frequencies, a zigzag scan typically results in an array whose last value is zero. This allows efficient encoding using run-length codes, either as part of the actual entropy coding or as a preprocessing step.
[0011] H.264 / MPEG-4 H.264 / MPEG-4 AVC and HEVC have two layers: the video coding layer (VCL) and the network abstraction layer (NAL). The video coding layer provides the coding functionality, as briefly mentioned above. The NAL encapsulates information elements into standard units called NAL units for further use, such as transmission over a channel or storage in a storage device. The information elements are, for example, the coded prediction error signal or other information required for decoding the video signal, such as prediction type, quantization parameters, motion vectors, etc. There are VCL NAL units that contain compressed video data and related information, and there are also non-VCL units that encapsulate additional data, such as parameter sets related to the entire video sequence, or supplemental enhancement information (SEI), which provides additional information used to improve the decoding accuracy.
[0012] FIG. 2 shows an exemplary decoder 200 compliant with the H.264 / MPEG-4 AVC or HEVC video coding standard. The coded video signal (input signal to the decoder) is first sent to an entropy decoder 290 which decodes the quantized coefficients and information elements required for decoding, such as motion data, prediction modes, etc. The quantized coefficients are inverse scanned to obtain a two-dimensional array, which is then input to an inverse quantization and inverse transform unit 230. After inverse quantization and inverse transform (230), a decoded (quantized) prediction error signal e′ is obtained. In the case of no quantization noise and no errors, the decoded (quantized) prediction error signal e′ corresponds to the difference obtained by subtracting the prediction signal from the signal input to the encoder.
[0013] The prediction signal is obtained by either temporal or spatial prediction (280). The decoded information usually further includes information necessary for prediction, such as the prediction type in case of intra prediction, or the motion data in case of motion compensated prediction. The quantized prediction error signal in the spatial domain is then added by an adder 240 to the prediction signal obtained from either the motion compensated prediction or the intraframe prediction (280). The reconstructed image s′ may be passed through a deblocking filter 250, a sample adaptive offset processor 255 and an adaptive loop filter 260, and the resulting decoded signal is stored in a memory 270 and used for the temporal or spatial prediction of subsequent blocks / images.
[0014] When compressing and decompressing an image, blocking artifacts are usually the most annoying to a user. By smoothing the edges between blocks of the reconstructed image, deblocking filtering improves the user's perceptual experience. One of the difficulties of deblocking filtering is to accurately distinguish between edges that are caused by blocking due to the application of a quantizer and edges that are part of the encoded signal. It is desirable to apply a deblocking filter only if edges occur at block boundaries due to compression artifacts. In other cases, application of a deblocking filter may distort the reconstructed signal. Another difficulty is to select an appropriate filter for deblocking filtering. Usually, a decision is made between multiple low-pass filters with different frequency responses, resulting in strong or weak low-pass filtering. To decide whether to apply deblocking filtering and to select an appropriate filter, image data present near the boundary of two blocks is taken into account.
[0015] For example, H.264 / MPEG-4 AVC evaluates the absolute value of the first differential of each of the two adjacent blocks whose boundaries are to be deblocked, and also evaluates the absolute value of the first differential at the edge between the two blocks, as shown for example in section 8.7.2.2 of the H.264 / MPEG-4 AVC standard. HEVC uses a similar mechanism, but also uses the second differential.
[0016] The deblocking filter may decide for each sample at the block boundary whether to filter and with which filter or type of filter. If it is decided to filter, a low-pass filter is applied to smooth the block boundary. The purpose of this decision on whether to filter or not is to filter only those samples that experience a large signal change at the block boundary as a result of the quantization applied to the block-wise processing described in the background section above. This deblocking filtering results in a smoothed signal at the block boundary. The smoothed signal is less annoying to the viewer than blocking artifacts. Those samples that experience a large signal change at the block boundary, belonging to the original signal to be coded, should not be filtered in order to preserve high frequencies and therefore visual sharpness. If the wrong decision is made, the image will be unnecessarily smoothed or the block boundaries will remain distorted. Deblocking filtering is performed on the vertical edges of the blocks (horizontal filtering) and on the horizontal edges of the blocks (vertical filtering).
[0017] FIG 4A illustrates a decision regarding vertical boundaries (whether to filter with a horizontal deblocking filter) and FIG 4B illustrates a decision regarding horizontal boundaries (whether to filter with a vertical deblocking filter). Specifically, FIG 4A illustrates a current block 440 to be decoded and its decoded neighboring blocks 410, 420, and 430. A decision is made for pixel 460 in a line. Similarly, FIG 4B illustrates the same current block 440, with a decision being made for pixel 470 in a column.
[0018] Similar to H.264 / MPEG-4 AVC, the decision of whether to apply a deblocking filter may be performed as follows: Take a line of six pixels 460 as an example, as also shown in Fig. 4, of which the first three pixels p2, p1, p0 belong to the left neighboring block A 430, and the next three pixels q0, q1, q2 belong to the current block B 440. A line 510 indicates the boundary between blocks A and B. Pixels p0 and q0 are pixels of the left neighboring block A and the current block B, respectively, and are adjacent to each other. Pixels p0 and q0 are filtered by the deblocking filter, for example, when the following condition is met:
[0019]
number
number
number
[0020] Here, the following usually holds:
[0021]
number
[0022] These conditions aim to detect whether the difference between p0 and q0 is due to blocking artifacts or not. They correspond to the evaluation of the first differentials within block A, within block B, and between blocks A and B, respectively.
[0023] For example, pixel p1 is filtered if it satisfies the following condition in addition to the above three conditions.
[0024]
number
[0025] A pixel q1 is filtered if, for example, in addition to the first three conditions above, it also satisfies the following condition:
[0026]
number
[0027] These conditions correspond to the first differential in the first block and the first differential in the second block, respectively. In the above conditions, QP denotes a quantization parameter that indicates the amount of quantization to be applied. β and α are scalar constants. In particular, QP NEW is the quantization parameter QP applied to the first block A and the second block B, respectively, as follows: A and Q.P. B The quantization parameter is derived based on
[0028]
number
[0029] Here, ">>1" means to shift one bit to the right.
[0030] The decision may be made only for a selected line or lines within the block, but pixel filtering is optionally performed for all lines 460. Figure 5 shows an example 520, in part formed by line 530, where an HEVC compliant decision is made. Based on line 530, a decision is made whether to filter the entire block or not.
[0031] Another example of deblocking filtering in HEVC is described in Section 8.6.1 of the JCTVC-E603 document of JTC-VC of ITU-T SG16 WP3 and ISO / IEC JTC1 / SC29 / WG11, which is freely available at http: / / wftp3.itu.int / av-arch / jctvc-site / 2011_01_D_Daegu / .
[0032] Two lines 530 are used to determine whether and how to apply deblocking filtering. In the example 520, the third line (index 2) and the sixth line (index 5) are evaluated to perform horizontal deblocking filtering. In particular, evaluating the second derivative within each block results in the following measurements d2 and d5:
[0033]
number
number
[0034] Pixel p belongs to block A, and pixel q belongs to block B. The number immediately after p or q indicates the column index, and the next subscript number indicates the row number within the block. Deblocking is possible for all eight lines shown in example 520 if the following conditions are met:
[0035]
number
[0036] If the above conditions are not met, no deblocking is applied at all. If deblocking is possible, the filter to be used for deblocking is decided. This decision is based on the evaluation of the first derivative between blocks A and B. In particular, for each line i (i is an integer between 0 and 7), it is decided whether to apply a strong or a weak low-pass filter. A strong filter is selected if the following conditions are met:
[0037]
number
number
number
[0038] According to the HEVC model, the "strong filter" is i , p2 i , p1 i , p0 i , q0 i , q1 i , q2 i , q3 i Using sample p2 i , p1 i , p0 i , q0 i , q1 i , q2 i On the other hand, the "weak filter" filters sample p2 i , p1 i , p0 i , q0 i , q1 i , q2 i Using sample p1 i , p0 i , q0 i , q1 i In the above conditions, the parameters β and t c Both are quantization parameters QP Frame , which may be set for slices of an image, etc. Typically, β and t c The value of QP is calculated using a lookup table. Frame It is derived based on
[0039] Note that strong filtering only has an effect on very flat signals, otherwise weak low-pass filtering is more advantageous.
[0040] FIG. 6A shows pixels that are subject to the strong low-pass filtering of conventional hybrid coding. In particular, FIG. 6A shows samples used for filtering. These samples correspond to four adjacent pixels on the left and right side, respectively, of the boundary between blocks AB. These samples are used for filtering, i.e., their values are input to the filtering process. FIG. 6A also shows samples that are modified by the filter. These are the pixel values of the three adjacent pixels that are closest to the boundary between blocks AB, respectively, on the left and right side of the boundary. These values are modified by the filter, i.e., smoothed. In particular, modified sample p0′ in line with index i i , p1' i , p2' i , q0' i , q1' i , q2' i The values are as follows:
[0041]
number
number
[0042] The function Clip(x) is defined as follows:
[0043]
number
[0044] where max_allowed_value is the maximum value that x can take. For PCM coding with k-bit samples, the maximum value is max_allowed_value=2 k -1. For example, for PCM coding with 8-bit samples the maximum value is max_allowed_value=255. For PCM coding with 10-bit samples the maximum value is max_allowed_value=1023.
[0045] Thus, the above formula shows the process of strong filtering that is applied. As can be seen from the above formula, pixel p3 of row i i and q3 i is used in the above equation, i.e., filtering, but is not modified, i.e., not filtered.
[0046] In Fig. 6B, the application of a weak deblocking filter is shown. In particular, the samples used for filtering are shown on the left side (of the drawing) and the samples modified by filtering are shown on the right side. In the weak filtering process, three adjacent pixels close to the boundary between block A and block B are used, and only two adjacent pixels close to the boundary belonging to blocks A and B, respectively, are filtered. To perform the weak filtering, two decisions are made. The first decision is whether the weak filter is applied to all lines or not to a particular line. This decision is based on a value Δ, which is calculated as follows:
[0047]
number
[0048] Based on the calculated Δ,
number
[0049] If filtering is applied, it is done as follows.
[0050]
number
number
number
[0051] The function Clip(x) is defined as above. The function Clip3(x) is defined as follows.
[0052]
number
[0053] The application of filtering is determined, and pixel p0' i and p0' i If it is determined that p1' has been filtered, i and p1' i A further decision is made as to whether to filter or not.
[0054] d p Pixel p1' if and only if <(β / 6) i is filtered. Similarly, d q Pixel q1' only if <(β / 6) i are filtered. The filtering of these pixels is done as follows:
[0055]
number
[0056] In this case, the following is used:
[0057]
number
number
number
[0058] The above discussion regarding the decision and selection of a deblocking filter generally applies to luma samples.
[0059] For chrominance deblocking filtering the following approach is used: The delta values are calculated as follows:
[0060]
number
[0061] The value delta1 is calculated based on the delta value as follows and is used directly for deblocking filtering.
[0062]
number
number
number
[0063] As can be seen from the above sequence of steps of the weak filtering process, the value Δ may be a value obtained by performing several determination and filtering steps. In particular, the calculation of Δ involves: Decide whether to apply a weak filter to a particular line (luminance) p0' i and q0' i (Weak) filtering against p1' i and q1' i The value Δ1 is also used when filtering As can be seen, it is advantageous to calculate the value of Δ as accurately as possible. Summary of the Invention
[0064] In view of these problems of the prior art, it would be advantageous to provide an efficient deblocking filtering approach, in which the parameters for filtering are controlled separately. In a specific approach of the present invention, strong filtering and weak filtering are controlled separately. This is achieved by the features of the independent claims. Preferred embodiments are the subject of the dependent claims. [Brief description of the drawings]
[0065] The accompanying drawings are incorporated into and form a part of the specification illustrating several embodiments of the present invention. The drawings, together with the description of the embodiments, serve to explain the principles of the invention. The purpose of the drawings is only to illustrate preferred and alternative examples of how the invention can be made and used, and should not be construed as limiting the invention to only the embodiments shown and described. Further features and advantages of the present invention will become apparent from the following detailed description of various embodiments of the invention, as illustrated in the accompanying drawings, in which like reference numerals refer to like elements. In the drawings, [Figure 1] FIG. 1 is a block diagram illustrating an example of a video encoder. [Diagram 2] FIG. 2 is a block diagram illustrating an example of a video decoder. [Diagram 3] FIG. 3 is a block diagram illustrating an example of a video encoder that performs separate vertical and horizontal filtering. [Figure 4A] FIG. 4A is a schematic diagram illustrating the application of horizontal deblocking filtering. [Figure 4B] FIG. 4B is a schematic diagram illustrating the application of vertical deblocking filtering. [Diagram 5] FIG. 5 is a schematic diagram illustrating the decision of whether to apply a deblocking filter and the selection of a deblocking filter. [Figure 6A] FIG. 6A is a schematic diagram illustrating an example of pixels near a common boundary of two blocks that are subject to strong and weak deblocking filtering. [Figure 6B] FIG. 6B is a schematic diagram illustrating an example of pixels near a common boundary of two blocks that are subject to strong and weak deblocking filtering. [Figure 7] FIG. 7 is a table showing the results of the rounding process. [Figure 8] FIG. 8 is a schematic diagram illustrating an asymmetric delta quantizer. [Figure 9A] FIG. 9A is a schematic diagram illustrating quantization of delta according to an example of the present invention. [Figure 9B] FIG. 9B is a schematic diagram illustrating quantization of delta according to an example of the present invention. [Figure 10] FIG. 10 is a flow chart illustrating a method according to one embodiment of the present invention. [Figure 11] FIG. 11 illustrates the results achieved by one embodiment of the present invention and compares it with the prior art. [Figure 12] FIG. 12 is a diagram showing the overall configuration of a content supply system that implements a content distribution service. [Figure 13] FIG. 13 is a diagram showing the overall configuration of a digital broadcasting system. [Figure 14] FIG. 14 is a block diagram showing an example of the configuration of a television. [Figure 15] FIG. 15 is a block diagram showing an example of the configuration of an information reproducing / recording unit that reads and writes information from and to a recording medium that is an optical disc. [Figure 16] FIG. 16 is a diagram showing an example of the structure of a recording medium that is an optical disc. [Figure 17A] FIG. 17A is a diagram showing an example of a mobile phone. [Figure 17B] FIG. 17B is a block diagram showing an example of the configuration of a mobile phone. [Figure 18] FIG. 18 is a diagram showing a structure of multiplexed data. [Figure 19] FIG. 19 is a diagram showing a schematic diagram of how each stream is multiplexed in multiplexed data. [Figure 20]FIG. 20 shows in more detail how a video stream is stored in a sequence of PES packets. [Figure 21] FIG. 21 is a diagram showing the structure of TS packets and source packets in multiplexed data. [Figure 22] FIG. 22 is a diagram showing the data structure of a PMT. [Figure 23] FIG. 23 is a diagram showing the internal structure of the multiplexed data information. [Figure 24] FIG. 24 is a diagram showing the internal structure of the stream attribute information. [Diagram 25] FIG. 25 illustrates steps for identifying video data. [Figure 26] FIG. 26 is a diagram showing an example of the configuration of an integrated circuit that realizes the video coding method and the video decoding method according to each embodiment. [Figure 27] FIG. 27 is a diagram showing a configuration for switching the drive frequency. [Figure 28] FIG. 28 is a diagram showing steps of identifying video data and switching the drive frequency. [Figure 29] FIG. 29 is a schematic diagram showing an example of a lookup table in which video data standards and driving frequencies correspond to each other. [Figure 30A] FIG. 30A is a diagram showing an example of a configuration in which modules of a signal processing unit are shared. [Figure 30B] FIG. 30B is a diagram showing another example of a configuration in which modules of a signal processing unit are shared. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0066] As described above, the delta (Δ) value is calculated by the following shift operation:
[0067]
number
[0068] The shift operation can be interpreted as a quantization of the delta values (to perform integer division) and corresponds to the following unquantized delta values:
[0069]
number
[0070] So a shift 4 bits to the right (">>") is a division by 16. The shift operation not only introduces quantization error, but it also causes the resulting delta value after quantization to have an offset relative to zero mean.
[0071] Figure 7 shows partial results of a rounding operation using a shift of 4 bits. The first column of the table in Figure 7 illustrates variables i ranging from -20 to +20. The second column shows the corresponding values of i after adding an offset value of 8. The third column shows a shift of 4 bits corresponding to an integer division of the term (i+8) by 16. As can be seen from the table, the distribution of the obtained values in the third column is asymmetric and does not have zero mean, even if i has zero mean.
[0072] This results in an asymmetric quantizer characteristic as shown in Figure 8. Even though the unquantized delta values have a general symmetric probability distribution, an offset value will result after quantization as described above, leading to the following equation:
[0073]
number
[0074] A delta value is calculated to perform the deblocking filtering process. It is generated as a weighted sum of sample values at the boundary between two adjacent blocks to which a constant offset value is added. In this example, the constant is 8. The result thus obtained is then clipped by shifting it to the right by one or more bits. For a weighted sum of symmetrically distributed sample values, the resulting delta value produces an offset value, i.e. its expected value is not zero.
[0075] To overcome this problem, we add a different constant before right-shifting the weighted sum of sample values. The different constant is chosen such that the expected value of delta is zero. In particular, the quantization of the delta value may be performed as follows:
[0076]
number
[0077] The values a and b are chosen to result in a zero-mean distribution of the delta values.
[0078] For example, according to the first example, a is 7 (a=7) and b is 8 (b=8). Figure 9A shows the resulting symmetric quantizer characteristics for a=7 and b=8. If the probability distribution of the unquantized delta values is symmetric, the quantizer will not produce additional offset values.
[0079]
number
[0080] However, the present invention is not limited to specific values of the parameters a and b. The constants a and b may be arbitrarily selected so that the distribution of the quantized delta values has zero mean. For example, according to the second example, the constant a is 6 (a=6) and the constant b is 9 (b=9). The corresponding quantizer is shown in FIG. 9B. The dead-band width of the quantizer in FIG. 9B is wider than the dead-band width of the quantizer in FIG. 9A. In this way, the dead-band of the quantizer may be controlled by selecting the parameters a and b. As in the example of FIG. 9A, the average value of the quantized delta values has no offset with respect to the average value of the delta values before quantization.
[0081] When using a shift of 4 bits (">>4"), which is usually applied to luminance samples, it is advantageous to choose a=6 and b=9, or a=7 and b=8. On the other hand, when applying a shift of 3 bits (">>3"), values of a=2 and b=5 are advantageous. A shift of 3 bits to the right is usually performed when deblocking chrominance samples. When shifting by 1 bit (">>1"), values of a=0 and b=1 may be advantageously applied.
[0082] As can be seen from the above equation, symmetric quantization of the delta values requires an additional "if" operation to appropriately quantize the delta values. k This may increase the computational load. To efficiently perform such a symmetric quantization of the delta values, this quantization may be combined with a subsequent clipping operation. In the following, the calculation of the delta values and the subsequent operation of comparing the calculated delta values with a threshold t c The following pseudo code illustrates a comparison with
[0083] delta1 = (9*(q0-p0) -3*(q1-p1)+8)>>4 if (delta1>tc) { delta1=tc; } else if (delta1<-tc) { delta1=-tc; }
[0084] This operation involves two comparisons to non-zero values. Two comparisons are performed in each execution of the code. Alternatively, the following pseudocode may accomplish the same function:
[0085] delta1 = (9*(q0-p0) -3*(q1-p1)+8)>>4 if (delta1>0) { if (delta1>tc) { delta1=tc; } } else { if (delta1<-tc) { delta1=-tc; } }
[0086] In this case, one comparison to zero (the sign comparison) is made, and only one of the two comparisons to non-zero digits is made (because the two comparisons to non-zero digits are alternatives).
[0087] According to an embodiment of the present invention, the threshold t for calculating the delta value and for performing the subsequent clipping process is c The comparison with may be accomplished as follows:
[0088] delta = 9*(q0-p0) -3*(q1-p1) if (delta>0) { delta1=(delta+a)>>4; if (delta1>tc) { delta1=tc; } } else { delta1=(delta+b)>>4; if (delta1<-tc) { delta1=-tc; } }
[0089] As can be seen from the pseudocode above, no additional processing is required when comparing with the code above: only one comparison with zero is required, and one of the two further comparisons with non-zero values will be performed during the code execution.
[0090] Figure 10 is a flow diagram illustrating a method according to an embodiment of the present invention. For each line of a block 1010, a decision parameter is calculated. This is done by calculating 1020 a weighted sum of adjacent samples at the boundary between the current block and its neighboring blocks, the samples forming a sample line. A sample line may be a column or a row of a block. The samples may for example be pixels p0 as described above. i , q0 i , p1 i , q1 i In this case, for deblocking vertical boundaries, the samples form the rows of the block. However, the invention is equally applicable to deblocking filtering of horizontal boundaries. In this case, the pixels to be filtered or used for filtering form the columns. After the weighted sum is calculated (1020), an offset value is determined (1030). The offset value depends on the value of the weighted sum. The offset value is added (1040) to the weighted sum. The weighted sum thus obtained after adding the offset value is shifted (1050) to the right by a given number of bits. This shifting results in an integer division. This may be performed separately for the luminance and chrominance samples.
[0091] The decision parameter corresponds to the weighted sum shifted after adding the offset. The decision parameter may further be used to determine (1060) whether a deblocking filter is applied to samples of the current block at the boundary. If it is determined in 1070 that deblocking filtering is applied ("yes" in step 1270), the line is deblocked (1280). That is, the samples of the current block at the boundary (e.g., p0' i ) are filtered. If a different decision is made in 1070 (step 1270 “no”), deblocking filtering is not applied to the same sample and / or the entire line. However, the decision process does not necessarily have to be performed. It may be advantageous to perform the decision process based on decision parameters calculated only for the luminance samples. For the chrominance samples, the decision on whether to apply the deblocking filter or not may be omitted and they may be filtered directly. However, the invention is also not limited to the above-mentioned different handling of luminance and chrominance. In general, no decision process needs to be performed at all and the selection of the filter and / or filtering may be performed based on the decision parameters. The decision parameters may therefore be called “sample modification parameters” since they may be used to modify (filter) the samples.
[0092] According to one embodiment of the present invention, if the weighted sum is positive, the offset value takes a first value. If the weighted sum is negative, the offset value takes a second value different from the first value. If the weighted sum has a value of 0, it may be further defined which of the first value, the second value and the first value is taken. The first value and the second value are advantageously determined such that the average of the weighted sum coincides with the average of the determination parameters. In this way, the integer division operation performed as a shift to the right does not cause an artificial shift of the average value.
[0093] Advantageously, if the predetermined number of bits is 4, the first value is 6 and the second value is 9, or the first value is 7 and the second value is 8. Advantageously, if the predetermined number of bits is 3, the first value is 2 and the second value is 5. In yet another case, if the predetermined number of bits is 1, the first value may be 0 and the second value may be 1. However, the above values may be swapped, i.e. the first value may be the second value and the second value may be the first value. For deblocking filtering of luminance samples, a predetermined value (number of bits to shift) of size 4 is generally used. For filtering of luminance, a shift value of 1 bit is generally used. On the other hand, a predetermined value for a shift of 3 bits is generally used for filtering the chrominance part of the image.
[0094] According to a preferred embodiment of the present invention, the method further comprises the step of calculating a filtering parameter by clipping the absolute value of the decision parameter to a clipping value. The filtering parameter is used for filtering samples at the boundary of the current block. In particular, the filtering is performed by applying the filtering parameter to the samples, and the result may be clipped. In order to simplify the process and reduce the computation load, the decision parameter and the filtering parameter may be calculated by the following steps:
[0095] First, calculate a weighted sum of pixel values of the line. If the weighted sum is greater than 0, offset the weighted sum by a first value and shift it by a certain number of bits to obtain a decision parameter. If the decision parameter is greater than the clipping value, obtain a filtering parameter by clipping the decision parameter to the clipping value. Otherwise, the filtering parameter is equal to the decision parameter.
[0096] On the other hand, if the weighted sum is less than or equal to 0, the weighted sum is offset by a second value and shifted by a predetermined number of bits to obtain the decision parameter. If the decision parameter is less than the negative clipping value, the filtering parameter is obtained by clipping the decision parameter to the negative clipping value. Otherwise, the filtering parameter is equal to the decision parameter. In the above, the clipping value is assumed to be a positive integer.
[0097] As mentioned above, integer processing can result in efficiency and / or quality losses when performing deblocking filtering, and the deblocking process can introduce additional quantization errors.
[0098] According to another aspect of the invention, the ratio of the three choices of strong filtering, weak filtering and no filtering is controlled to control the maximum correction by the deblocking filter in addition to adjusting the subjective quality. This allows the adjustment of the objective quality by limiting the quantization error caused by the deblocking. Thus, the objective quality can be adjusted independently of the subjective quality and is adjusted in an optimal way. In particular, in HM4.0, the threshold t c is determined as follows:
[0099]
number
number
number
number
[0100] Parameter QP max indicates the maximum possible QP value. This value is usually 51, and the QP value of 55 is the upper clipping threshold. max+4. The parameter "bitdepthscale" is a scaling factor and depends on the bit depth of the samples to be deblocked. For example, the input signal may have a bit depth of 8, while the internal bit depth may be 10. The parameter BS indicates the "boundary strength" and its value usually differs between intra-prediction and inter-prediction. For example, for intra-prediction it may take the value 2 or 3, and for inter-prediction it may take the value 0, 1 or 2.
[0101] tctable indicates the range of possible values. For example, Const UChar tctable_8X8
[56] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 6, 6, 7, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14 } ;
[0102] Similarly, the threshold value β is determined as follows:
[0103]
number
number
[0104] For example, "betatable" is defined as follows: Const UChar betatable_8X8
[52] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64 };
[0105] In JCTVC-F143, "CE12: Slice-level deblocking filter parameter adjustment" uses an additional offset value coded in the slice header to adjust the threshold t c It is proposed to seek
[0106]
number
number
[0107] where tctable is the same as above.
[0108] Similarly, JCTVC-F143 proposes adding an additional offset value coded in the slice header to the calculation of threshold β as follows:
[0109]
number
number
[0110] The additional offset value of JCTVC-F143 affects the effectiveness or ineffectiveness of deblocking for the entire block. In particular, a block is filtered only if, as explained in the background section, d = d q + d p < β If deblocking filtering is enabled, the parameter β is further used to adjust the ratio of strong to weak filtering. For each line or column, it determines whether to apply a weak or strong filter, and also the ratio of the second closest pixel to the boundary (p1 i , q1 i ) is used to decide whether to deblock or not. However, it has no effect on the strong filtering process itself.
[0111] When making the decision on whether to apply the weak filter, a threshold t c Also, the parameter t c further includes the calculation of the parameter Delta1 and the sample p0' i and q0' i The parameter t is used for the actual filtering. c further adjusts the maximum correction by the deblocking filter (see the clip3 values a and b of the filtering process described in the Background section).
[0112] According to an embodiment of the present invention, the deblocking filtering is further controlled by advanced parameters that may be transmitted at the picture level, slice level, or sequence level. In particular, the deblocking filtering is controlled by the parameter t c and parameters β (as shown in the background section). These parameters are used to determine the strength of the filtering and / or whether to apply filtering or not. They also have a direct impact on the clipping process during the application of the filters. The decision to apply weak / strong filtering or not mainly affects the subjective image quality, whereas the clipping process is considered to mainly affect the objective quality. The present invention allows separate control of the processes related to objective and subjective quality in deblocking filtering.
[0113] This allows for different deblocking decisions and filtering operations with different offset values that may be presented in the slice header (or embedded in the slice header). c In particular, the first threshold t c1 may be calculated as follows:
[0114]
number
number
[0115] The second threshold t c2 may be defined as follows:
[0116]
number
number
[0117] That is, the calculated offset (tc offset ) and the first value indicated in the bitstream (tc offset、coded ) based on the quantization parameter (QP), the first parameter t c1 is obtained. The calculated offset (tc offset ) and a second value indicated in the bitstream (tc offset2、coded ) based on the quantization parameter (QP), the second parameter t c2 is obtained.
[0118] Two different thresholds t c1 and t c2is used in a series of steps for determining and selecting a deblocking filter as follows: As shown in the prior art, the decision as to whether to apply a deblocking filter or not may be made for an entire block of 8×8 pixels. The decision as to whether to apply a strong or weak deblocking filter for a particular line or column of pixels is made by a first threshold t c1 In particular, a strong filter is applied in the following cases:
[0119]
number
[0120] In all cases, a weak deblocking filter is applied. Therefore, the first parameter (threshold) t c1 is used to control the subjective quality, i.e. to control the application of weak or strong filtering.
[0121] The delta value is calculated similarly to the method shown in the Background of the Invention, namely as follows:
[0122]
number
[0123] The decision as to whether or not to perform weak filtering is also determined by a first threshold t c1 In particular, filtering is only applied if
[0124]
number
[0125] Otherwise, no filtering is applied to line i. If it is decided to apply a weak deblocking filter, then pixel p0', which is at the block boundary, i and q0'i According to this embodiment of the present invention, a threshold t c2 The second value of is used to perform the filtering. The filtering may be performed as follows:
[0126]
number
number
[0127] After filtering the pixels on the boundary between two blocks A and B, pixel p1' of block A that is the second closest to the boundary is i and pixel q1' of block B i In particular, these two pixels are each filtered if and only if:
[0128]
number
number
[0129] Filter pixel p1' i If we decide to filter, we set a second threshold t c2 Using pixel p1' i This is because the second threshold controls the filtering process and affects the clipping process, thereby affecting the objective quality. The filtering may be performed as follows:
[0130]
number
number
[0131] Similarly, pixel q1' i If it is decided to filter, the filtering may be done as follows:
[0132]
number
number
[0133] Therefore, the second parameter (threshold) t c2 are used in the filtering process. In particular, the second parameter controls the maximum (upper) and minimum (lower) clipping values (a and b in the clip3 process, as described above). c1 and t c2 are determined separately. As mentioned above, their values may be different.
[0134] Advantageously, as shown below, the strong filtering is performed using a threshold t c3 Also based on.
[0135]
number
number
number
number
number
number
[0136] The third parameter, t c3controls the filtering of a "strong filter", i.e. a filter applied to the three samples (pixels) closest to the block boundary. In particular, it controls the filtering by setting upper and lower clipping thresholds (-tc3, tc3) to calculate an offset value added to the filtered samples. This offset value is calculated as a weighted sum of the pixels around the boundary of blocks A and B, offset by a given value and shifted by a given number of bits.
[0137] The third threshold t c3 is the second threshold t c2 By directly influencing the filtering process, the third threshold t c3 and the second threshold t c2 However, a threshold t c1 and t c2 In addition to the third value t c3 may be determined.
[0138] Different thresholds t c1 and t c2 The use of these thresholds improves coding efficiency. offset、coded and tc offset2、coded It may be rate-distortion optimized by using
[0139] FIG. 11 shows the improvement in coding efficiency when applying two thresholds according to an embodiment of the present invention, compared with the coding efficiency of HM4.0 and JCTVC-F143. FIG. 11 shows the peak signal to noise ratio (dB) as a function of the data rate. To obtain these results, the video sequence "basketball-pass" was compressed using a quantization parameter with a value of QP=37 and a low-delay and highly efficient prediction structure. The coding efficiency of the present invention is evaluated for an intra-only structure, i.e. spatial prediction, based on the coding conditions usually used in ISO and ITU standardization activities (see document JCTVC-E700: http: / / phenix.int-evry.fr / jct / doc_end_user / current_document.php?id=2454). As can be seen from FIG. 11, tc offset , coded=-5 and β offet , coded It is proposed in JCTVC-F143 to reduce the coding efficiency by adjusting the subjective quality using t = -2. In the above embodiment of the present invention, it is possible to maintain the subjective quality because the first parameter t c1 is the second parameter t c2 At the same time, the objective image quality can be determined by the independent parameter t c2 As mentioned above, the parameter t c1 and t c2 By using two different offset values obtained by rate-distortion optimization, this embodiment of the present invention improves the coding efficiency.
[0140] The invention is not limited to the above mentioned examples, and in general, for each decision step (whether to apply a filter or not, or which filter to apply to a particular sample, line or block) and for each filtering step, separate parameters may be used.
[0141] The individual parameter values allow for more flexible adaptation to image content and characteristics, potentially achieving higher coding efficiency. To reduce the overhead of signaling the individual parameters used to determine and apply the deblocking filtering, the parameters may be further coded by differential coding or by taking advantage of advantageous entropy coding. For example, the first offset value tc offset、coded Explicitly encode the remaining offset values (threshold t c3 may be used to calculate tc offset、coded2 or tc offset、coded3 , or other additional offset values) may be encoded as a difference or mutual difference with the first offset value.
[0142] Alternatively, the threshold t c may be determined as follows:
[0143]
number
number
[0144] Thus, an additional offset value is simply added to the value of tctable. This offset value may be coded and signaled in the slice header. As in the above example, a table offset value may be determined for each filter decision (strong or weak filter) and filtering operation (e.g., clipping control). The additional offset value reduces the value of t c This allows for finer tuning of tctable since it allows for values greater than 14, assuming the example values of tctable above.
[0145] Similarly, more sophisticated adaptation to the threshold β may be performed as follows:
[0146]
number
number
[0147] If the example values of betatable above are assumed, additional values such as β=55 are possible, so the additional offset value β offset , coded may be used to achieve finer adjustment.
[0148] It should be noted that the above example does not limit the present invention to this particular filtering process. For example, the above example has been described mainly with respect to general filtering of luminance samples. However, the present invention is also applicable to filtering as applied to chrominance samples, for example filtering performed without determining whether to filter a particular line in a block. The idea of the above embodiment is to enable separate control of subjective quality and objective quality. In particular, advanced parameters are used to separately control the filtering process performed by determining whether to apply a deblocking filter and controlling the process included in the filtering process, such as clipping. This idea may be applied to only a part of the above process. It should be noted that the above example does not limit the present invention to a particular filtering of HEVC.
[0149] A further embodiment of the invention is summarized as follows: A method for deblocking filtering samples of a current block of an image, comprising the steps of: calculating a weighted sum of adjacent samples forming a sample line at a boundary between the current block and its adjacent blocks, determining sample modification parameters by adding an offset value to the weighted sum depending on the value of the weighted sum and shifting the weighted sum after adding the offset value to the right by a predetermined number of bits, and applying a deblocking filter to the samples including the offset value according to the sample modification parameters.
[0150] Advantageously, the offset value has a first value when the weighted sum is positive and a second value different from the first value when the weighted sum is negative. The first value and the second value are determined such that the average of the sample correction parameters shifted left by a predetermined number of bits coincides with the average of the weighted sum. Specifically, the predetermined number of bits is 4, the first value is 6, and the second value is 9, or the first value is 7 and the second value is 8. Alternatively, the predetermined number of bits is 3, the first value is 2, and the second value is 5. Alternatively, the predetermined number of bits is 1, the first value is 0, and the second value is 1.
[0151] The method may further comprise the steps of calculating a filtering parameter by clipping an absolute value of a sample modification parameter to a clipping value, and filtering the sample including adding the filtering parameter to the sample, where the sample modification parameter and the filtering parameter are calculated by the following steps: calculating a weighted sum; if the weighted sum is greater than zero, offsetting the weighted sum by a first value and shifting a predetermined number of bits to obtain the sample modification parameter; if the sample modification parameter is greater than the clipping value, clipping the sample modification parameter to the clipping value to obtain the filtering parameter; otherwise, the filtering parameter is equal to the sample modification parameter; on the other hand, if the weighted sum is less than or equal to zero, offsetting the weighted sum by a second value and shifting a predetermined number of bits to obtain the sample modification parameter; if the sample modification parameter is less than the negative clipping value, clipping the sample modification parameter to the negative clipping value to obtain the filtering parameter; otherwise, the filtering parameter is equal to the sample modification parameter.
[0152] The method may include a step of determining whether a deblocking filter is applied to the samples of the target block at the boundary based on the sample modification parameters, and / or a step of applying or not applying the deblocking filter to the samples depending on the result of the determining step.
[0153] Another embodiment provides a method for deblocking filtering samples of a current block of an image, comprising the steps of: deciding whether to apply a deblocking filter based on a comparison between a decision value and a predefined threshold; filtering the samples, the step comprising offsetting the samples with sample correction values; and calculating the predefined threshold and the sample correction values, the step comprising adding an offset value to a quantization parameter associated with the samples, the offset value being determined separately for the calculation of the predefined threshold and the calculation of the sample correction values.
[0154] Advantageously, both the offset values calculating the predetermined thresholds and the individual offset values calculating the sample correction values are included in the bitstream of encoded image data.
[0155] Another embodiment presents an apparatus for deblocking filtering samples of a target block of an image, the apparatus comprising: a sum calculation unit for calculating a weighted sum of adjacent samples forming a sample line at the boundary between the target block and its adjacent blocks; an addition unit for adding an offset value determined by the value of the weighted sum to the weighted sum; and a shift unit for shifting the weighted sum after adding the offset value to the right by a predetermined number of bits; a calculation unit for determining sample modification parameters; and a filtering unit for applying a deblocking filter, including an offset operation, to the samples according to the sample modification parameters.
[0156] Advantageously, the offset value has a first value when the weighted sum is positive and a second value different from the first value when the weighted sum is negative, the first and second values being determined such that an average of the sample modification parameters shifted left by a predetermined number of bits coincides with an average of the weighted sum.
[0157] Specifically, the predetermined number of bits is 4, the first value is 6, and the second value is 9, or the first value is 7 and the second value is 8. Or, the predetermined number of bits is 3, the first value is 2, and the second value is 5. Or, the predetermined number of bits is 1, the first value is 0, and the second value is 1.
[0158] Advantageously, the calculation unit calculates the filtering parameter by clipping the absolute value of the sample modification parameter to a clipping value and the filtering of the sample comprises adding the filtering parameter to the sample, wherein the sum calculation unit calculates a weighted sum and the calculation unit calculates the sample modification parameter and the filtering parameter as follows: if the weighted sum is greater than zero, the addition unit offsets the weighted sum by a first value and shifts it by a predetermined number of bits to obtain the sample modification parameter; if the sample modification parameter is greater than the clipping value, the calculation unit clips the sample modification parameter to the clipping value to obtain the filtering parameter; otherwise, the filtering parameter coincides with the sample modification parameter; if the weighted sum is less than or equal to zero, the addition unit offsets the weighted sum by a second value and shifts it by a predetermined number of bits to obtain the sample modification parameter; if the sample modification parameter is less than the negative clipping value, the calculation unit clips the sample modification parameter to the negative clipping value to obtain the filtering parameter; otherwise, the filtering parameter coincides with the sample modification parameter.
[0159] The apparatus may further include a judgment unit that judges whether or not a deblocking filter is to be applied to the samples of the target block at the boundary based on the sample modification parameters, and / or a filtering unit that applies or does not apply the deblocking filter to the samples depending on the judgment result.
[0160] Another embodiment provides an apparatus for deblocking filtering samples of a current block of an image, the apparatus comprising: a decision unit for deciding whether to apply a deblocking filter based on a comparison between a decision value and a predefined threshold, a filtering unit for filtering the samples including offsetting the samples with sample correction values, and a calculation unit for calculating the predefined threshold and the sample correction values including adding an offset value to a quantization parameter associated with the samples, the offset value being determined separately for calculating the predefined threshold and for calculating the sample correction values.
[0161] Advantageously, both the offset values calculating the predetermined thresholds and the individual offset values calculating the sample correction values are included in the bitstream of the encoded image data.
[0162] By recording a program for implementing the configuration of the video coding method (image coding method) or video decoding method (image decoding method) shown in each of the above embodiments on a storage medium, it becomes possible to easily implement the processes shown in each of the above embodiments on an independent computer system. The storage medium may be a magnetic disk, an optical disk, a magneto-optical disk, an IC card, a semiconductor memory, or any other medium capable of recording a program.
[0163] Further, here, application examples of the video coding method (image coding method) and video decoding method (image decoding method) shown in each of the above embodiments and a system using the same will be described. The system is characterized by having an image coding / decoding device consisting of an image coding device using the image coding method and an image decoding device using the image decoding method. Other components of the system can be appropriately changed depending on the case.
[0164] (Embodiment A) 12 is a diagram showing the overall configuration of a content supply system ex100 that realizes a content distribution service. The area where communication services are provided is divided into cells of a desired size, and base stations ex106, ex107, ex108, ex109, and ex110, which are fixed wireless stations, are installed in each cell.
[0165] This content supply system ex100 is connected to the Internet ex101 via an Internet service provider ex102, a telephone network ex104, and base stations ex106 to ex110, and devices such as a computer ex111, a PDA (Personal Digital Assistant) ex112, a camera ex113, a mobile phone ex114, and a game console ex115.
[0166] However, the content supply system ex100 is not limited to the configuration shown in Fig. 12, and any of the elements may be combined and connected. Also, each device may be directly connected to the telephone network ex104 without going through the base stations ex106 to ex110, which are fixed wireless stations. Also, each device may be directly connected to each other via short-distance wireless or the like.
[0167] The camera ex113 is a device capable of shooting moving images, such as a digital video camera, and the camera ex116 is a device capable of shooting still images and moving images, such as a digital camera. The mobile phone ex114 may be any of the following: a GSM (registered trademark) (Global System for Mobile Communications) type, a CDMA (Code Division Multiple Access) type, a W-CDMA (Wideband-Code Division Multiple Access) type, a LTE (Long Term Evolution) type, a HSPA (High Speed Packet Access) mobile phone, or a PHS (Personal Handyphone System).
[0168] In the content supply system ex100, a camera ex113 and the like are connected to a streaming server ex103 through a base station ex109 and a telephone network ex104, thereby enabling live distribution and the like. In live distribution, a user performs encoding processing on content (e.g., a video of a live music performance) shot by the camera ex113 as described in each of the above embodiments (i.e., the camera functions as an image encoding device according to an aspect of the present invention) and transmits the content to the streaming server ex103. Meanwhile, the streaming server ex103 streams the transmitted content data to a client that has made a request. The clients include a computer ex111, a PDA ex112, a camera ex113, a mobile phone ex114, a game machine ex115, and the like that are capable of decoding the encoded data. Each device that receives the distributed data decodes the received data and plays it back (i.e., functions as an image decoding device according to an aspect of the present invention).
[0169] The encoding process of the captured data may be performed by the camera ex113, or by the streaming server ex103 which performs the data transmission process, or the two may share the same role. Similarly, the decoding process of the distributed data may be performed by the client, or by the streaming server ex103, or the two may share the same role. Furthermore, still images and / or video data captured by the camera ex116, not limited to the camera ex113, may be transmitted to the streaming server ex103 via the computer ex111. In this case, the encoding process may be performed by the camera ex116, the computer ex111, or the streaming server ex103, or the two may share the same role.
[0170] Moreover, these encoding and decoding processes are generally processed in an LSIex500 possessed by the computer ex111 or each device. The LSIex500 may be a single chip or may be configured with multiple chips. Note that software for encoding and decoding moving images may be embedded in some kind of recording medium (CD-ROM, flexible disk, hard disk, etc.) that can be read by the computer ex111, etc., and the encoding and decoding processes may be performed using that software. Furthermore, if the mobile phone ex114 has a camera, video data captured by the camera may be transmitted. In this case, the video data is data that has been encoded and processed by the LSIex500 possessed by the mobile phone ex114.
[0171] Furthermore, the streaming server ex103 may be a plurality of servers or a plurality of computers that process, record, and distribute data in a distributed manner.
[0172] In this way, the content supply system ex100 allows the client to receive and play back encoded data. In this way, the content supply system ex100 allows the client to receive, decode, and play back information sent by a user in real time, so that even users without special rights or equipment can realize personal broadcasting.
[0173] In addition, as shown in FIG. 13, the content supply system ex100 is not limited to the example, and at least one of the video coding device (image coding device) or video decoding device (image decoding device) of each of the above-mentioned embodiments can be incorporated into a digital broadcasting system ex200. Specifically, in a broadcasting station ex201, multiplexed data in which music data and the like are multiplexed with video data is transmitted to a satellite ex202 or a communication channel via radio waves. This video data is data coded by the video coding method described in each of the above-mentioned embodiments (i.e., data coded by an image coding device according to one aspect of the present invention). The broadcasting satellite ex202 then transmits radio waves for broadcasting, which are received by a home antenna ex204 capable of receiving satellite broadcasts. The received multiplexed data is decoded and played by a device such as a television (receiver) ex300 or a set-top box (STB) ex217 (i.e., functions as an image decoding device according to one aspect of the present invention).
[0174] The video decoding device or video encoding device shown in each of the above embodiments can also be implemented in a reader / recorder ex218 that reads and decodes multiplexed data recorded on a recording medium ex215 such as a DVD or BD, or encodes a video signal on the recording medium ex215, and may further multiplex the video signal with a music signal and write it in some cases. In this case, the reproduced video signal is displayed on a monitor ex219, and the video signal can be reproduced in another device or system by the recording medium ex215 on which the multiplexed data is recorded. Also, a video decoding device may be implemented in a set-top box ex217 connected to a cable ex203 for cable television or an antenna ex204 for satellite / terrestrial broadcasting, and this may be displayed on a monitor ex219 of the television. In this case, the video decoding device may be incorporated in the television, not in the set-top box.
[0175] 14 is a diagram showing a television (receiver) ex300 using the video decoding method and video encoding method described in each of the above embodiments. The television ex300 includes a tuner ex301 that acquires or outputs multiplexed data in which audio data is multiplexed onto video data via an antenna ex204 that receives the broadcast or a cable ex203, a modulation / demodulation unit ex302 that demodulates the received multiplexed data or modulates the received multiplexed data to be transmitted externally, and a multiplexing / separation unit ex303 that separates the demodulated multiplexed data into video data and audio data or multiplexes the video data and audio data encoded by a signal processing unit ex306.
[0176] The television ex300 also has a signal processing unit ex306 having an audio signal processing unit ex304 and a video signal processing unit ex305 (functioning as an image encoding device or an image decoding device according to an embodiment of the present invention) that decode the audio data and the video data, respectively, or encode the respective information, and an output unit ex309 having a speaker ex307 that outputs the decoded audio signal, and a display unit ex308 such as a display that displays the decoded video signal. The television ex300 also has an interface unit ex317 having an operation input unit ex312 that accepts input of user operations, etc. The television ex300 also has a control unit ex310 that comprehensively controls each unit, and a power supply circuit unit ex311 that supplies power to each unit. The interface unit ex317 may have, in addition to the operation input unit ex312, a bridge ex313 connected to an external device such as a reader / recorder ex218, a slot unit ex314 for enabling a recording medium ex216 such as an SD card to be mounted, a driver ex315 for connecting to an external recording medium such as a hard disk, a modem ex316 for connecting to a telephone network, etc. The recording medium ex216 is a medium that allows information to be electrically recorded by a non-volatile / volatile semiconductor memory element that stores the information. The various units of the television ex300 are connected to each other via a synchronous bus.
[0177] First, a configuration in which the television ex300 decodes and plays back multiplexed data acquired from the outside via the antenna ex204 or the like will be described. The television ex300 receives user operations from a remote controller ex220 or the like, and based on the control of a control unit ex310 having a CPU or the like, separates the multiplexed data demodulated by the modulation / demodulation unit ex302 in the multiplexing / separation unit ex303. Furthermore, the television ex300 decodes the separated audio data in the audio signal processing unit ex304, and decodes the separated video data in the video signal processing unit ex305 using the decoding method described in each of the above embodiments. The decoded audio signal and video signal are output to the outside from the output unit ex309, respectively. When outputting, it is preferable to temporarily store these signals in buffers ex318, ex319, etc. so that the audio signal and the video signal are played back in synchronization. The television ex300 may also read out the multiplexed data not from broadcasting or the like, but from recording media ex215, ex216 such as magnetic / optical disks and SD cards. Next, a configuration in which the television ex300 encodes an audio signal and a video signal and transmits them to the outside or writes them to a recording medium or the like will be described. The television ex300 receives user operations from the remote controller ex220 or the like, and, based on the control of the control unit ex310, encodes the audio signal in the audio signal processing unit ex304 and encodes the video signal in the video signal processing unit ex305 using the encoding method described in each of the above embodiments. The encoded audio signal and video signal are multiplexed in the multiplexing / demultiplexing unit ex303 and output to the outside. When multiplexing, it is preferable to temporarily store these signals in buffers ex320, ex321, etc. so that the audio signal and the video signal are synchronized. Note that the buffers ex318, ex319, ex320, and ex321 may be provided in multiple units as shown in the figure, or one or more buffers may be shared. Furthermore, other than those shown in the figure, data may be stored in a buffer as a buffer to avoid system overflow and underflow, for example, between the modulation / demodulation unit ex302 and the multiplexing / demultiplexing unit ex303.
[0178] Furthermore, in addition to acquiring audio data and video data from broadcasts, recording media, etc., the television ex300 may be configured to accept AV input from a microphone or camera and perform encoding processing on the data acquired from them. Note that while the television ex300 has been described here as being configured to be capable of the above-mentioned encoding processing, multiplexing, and external output, it may be configured not to be able to perform these processes and only be capable of the above-mentioned reception, decoding processing, and external output.
[0179] In addition, when the reader / recorder ex218 reads or writes multiplexed data from a recording medium, the above-mentioned decoding or encoding process may be performed by either the television ex300 or the reader / recorder ex218, or the television ex300 and the reader / recorder ex218 may share the same role.
[0180] As an example, the configuration of the information reproducing / recording unit ex400 when reading or writing data from an optical disk is shown in FIG. 15. The information reproducing / recording unit ex400 includes elements ex401, ex402, ex403, ex404, ex405, ex406, and ex407, which will be described below. The optical head ex401 writes information by irradiating a laser spot onto the recording surface of the recording medium ex215, which is an optical disk, and reads information by detecting reflected light from the recording surface of the recording medium ex215. The modulation recording unit ex402 electrically drives a semiconductor laser built into the optical head ex401 and modulates the laser light according to the recording data. The reproduction demodulation unit ex403 amplifies a reproduction signal obtained by electrically detecting reflected light from the recording surface by a photodetector built into the optical head ex401, separates and demodulates the signal components recorded on the recording medium ex215, and reproduces the necessary information. The buffer ex404 temporarily holds information to be recorded on the recording medium ex215 and information reproduced from the recording medium ex215. The disk motor ex405 rotates the recording medium ex215. The servo control unit ex406 controls the rotational drive of the disk motor ex405 while moving the optical head ex401 to a predetermined information track, and performs a laser spot tracking process. The system control unit ex407 controls the entire information reproduction / recording unit ex400. The above read and write processes are realized by the system control unit ex407 using various information held in the buffer ex404, generating and adding new information as necessary, and recording and reproducing information through the optical head ex401 while cooperating with the modulation recording unit ex402, the reproduction demodulation unit ex403, and the servo control unit ex406. The system control unit ex407 is composed of, for example, a microprocessor, and performs these processes by executing a read and write program.
[0181] In the above, the optical head ex401 has been described as irradiating a laser spot, but it may be configured to perform higher density recording using near-field light.
[0182] FIG. 16 shows a schematic diagram of a recording medium ex215, which is an optical disk. A guide groove is formed in a spiral shape on the recording surface of the recording medium ex215, and address information indicating an absolute position on the disk is recorded in advance on the information track ex230 by changing the shape of the groove. This address information includes information for identifying the position of a recording block ex231, which is a unit for recording data, and a recording block can be identified by reproducing the information track ex230 and reading the address information in a recording and reproducing device. The recording medium ex215 also includes a data recording area ex233, an inner peripheral area ex232, and an outer peripheral area ex234. The area used for recording user data is the data recording area ex233, and the inner peripheral area ex232 and the outer peripheral area ex234, which are located on the inner or outer periphery of the data recording area ex233, are used for specific purposes other than recording user data. The information reproducing / recording unit ex400 reads and writes encoded audio data, video data, or multiplexed data obtained by multiplexing these data, to the data recording area ex233 of such recording medium ex215.
[0183] In the above, the description has been given taking as examples optical discs such as single-layer DVDs and BDs, but the present invention is not limited to these and may be an optical disc with a multi-layer structure that allows recording on other surfaces as well. Also, the present invention may be an optical disc with a structure that allows multi-dimensional recording / playback, such as recording information on the same location on the disc using light of various different wavelengths or recording different layers of information from various angles.
[0184] In the digital broadcasting system ex200, a car ex210 having an antenna ex205 can receive data from a satellite ex202 or the like, and can play video on a display device such as a car navigation system ex211 of the car ex210. Note that the car navigation system ex211 can be configured, for example, as shown in Fig. 14 with a GPS receiver added, and the same can be considered for a computer ex111, a mobile phone ex114, and the like.
[0185] 17A is a diagram showing a mobile phone ex114 using the video decoding method and the video encoding method described in the above embodiment. The mobile phone ex114 includes an antenna ex350 for transmitting and receiving radio waves to and from the base station ex110, a camera unit ex365 capable of taking videos and still images, and a display unit ex358 such as a liquid crystal display for displaying decoded data of the video captured by the camera unit ex365 and the video received by the antenna ex350. The mobile phone ex114 further includes a main body unit having an operation key unit ex366, an audio output unit ex357 such as a speaker for outputting audio, an audio input unit ex356 such as a microphone for inputting audio, a memory unit ex367 for storing the captured video, still images, recorded audio, or the encoded or decoded data of the received video, still images, email, etc., or a slot unit ex364 which is an interface unit with a recording medium for similarly storing data.
[0186] Furthermore, a configuration example of the mobile phone ex114 will be described with reference to Fig. 17B. In the mobile phone ex114, a power supply circuit unit ex361, an operation input control unit ex362, a video signal processing unit ex355, a camera interface unit ex363, an LCD (Liquid Crystal Display) control unit ex359, a modulation / demodulation unit ex352, a multiplexing / separation unit ex353, an audio signal processing unit ex354, a slot unit ex364, and a memory unit ex367 are connected to each other via a bus ex370, in relation to a main control unit ex360 that comprehensively controls each unit of a main body unit having a display unit ex358 and an operation key unit ex366.
[0187] When the end call and power key is turned on by the user's operation, the power supply circuit unit ex361 starts up the mobile phone ex114 into an operable state by supplying power to each unit from the battery pack.
[0188] Based on the control of a main control unit ex360 having a CPU, ROM, RAM, etc., the mobile phone ex114 converts a voice signal collected by a voice input unit ex356 in a voice call mode into a digital voice signal in a voice signal processing unit ex354, performs spectrum spreading processing on this in a modulation / demodulation unit ex352, performs digital-to-analog conversion processing and frequency conversion processing on this in a transmission / reception unit ex351, and transmits it via an antenna ex350. Also, the mobile phone ex114 amplifies reception data received via the antenna ex350 in a voice call mode, performs frequency conversion processing and analog-to-digital conversion processing on this, performs spectrum despreading processing on this in the modulation / demodulation unit ex352, converts it into an analog voice signal in the voice signal processing unit ex354, and outputs this from a voice output unit ex357.
[0189] Furthermore, when sending an e-mail in the data communication mode, the text data of the e-mail input by operating the operation key unit ex366 of the main unit is sent to the main control unit ex360 via the operation input control unit ex362. The main control unit ex360 performs spectrum spreading processing on the text data in the modulation / demodulation unit ex352, performs digital-to-analog conversion processing and frequency conversion processing in the transmission / reception unit ex351, and then transmits the data to the base station ex110 via the antenna ex350. When receiving an e-mail, the received data is processed in roughly the reverse manner, and is output to the display unit ex358.
[0190] When transmitting video, still images, or video and audio in the data communication mode, the video signal processing unit ex355 compresses and encodes the video signal supplied from the camera unit ex365 using the video encoding method described in each of the above embodiments (i.e., functions as an image encoding device according to one aspect of the present invention), and sends the encoded video data to the multiplexing / separation unit ex353. Also, the audio signal processing unit ex354 encodes an audio signal collected by the audio input unit ex356 while the camera unit ex365 is capturing video, still images, etc., and sends the encoded audio data to the multiplexing / separation unit ex353.
[0191] The multiplexing / separation unit ex353 multiplexes the encoded video data supplied from the video signal processing unit ex355 and the encoded audio data supplied from the audio signal processing unit ex354 in a predetermined manner, and the resulting multiplexed data is subjected to spectrum spreading processing in a modulation / demodulation unit (modulation / demodulation circuit unit) ex352, and then transmitted via an antenna ex350 after undergoing digital-to-analog conversion processing and frequency conversion processing in a transmission / reception unit ex351.
[0192] When receiving data of a video file linked to a homepage or the like in the data communication mode, or when receiving an e-mail with video and / or audio attached, in order to decode the multiplexed data received via the antenna ex350, the multiplexing / separation unit ex353 separates the multiplexed data into a bit stream of video data and a bit stream of audio data, and supplies the encoded video data to the video signal processing unit ex355 via the synchronous bus ex370, and supplies the encoded audio data to the audio signal processing unit ex354. The video signal processing unit ex355 decodes the video signal by decoding using a video decoding method corresponding to the video encoding method shown in each of the above embodiments (i.e., functions as an image decoding device according to one aspect of the present invention), and displays, for example, video and still images included in the video file linked to the homepage on the display unit ex358 via the LCD control unit ex359. The audio signal processing unit ex354 also decodes the audio signal, and audio is output from the audio output unit ex357.
[0193] Also, like the television ex300, the terminals such as the mobile phone ex114 may be implemented in three different ways: a transmitting terminal having only an encoder, a transmitting terminal having only a decoder, and a receiving terminal having only a decoder, in addition to a transmitting terminal having both an encoder and a decoder. Furthermore, in the digital broadcasting system ex200, multiplexed data in which music data and the like are multiplexed with video data is received and transmitted, but the data may be multiplexed with text data related to the video in addition to the audio data, or may be video data itself instead of multiplexed data.
[0194] In this way, it is possible to use the video encoding method or video decoding method shown in each of the above embodiments in any of the above-mentioned devices and systems, and by doing so, it is possible to obtain the effects described in each of the above embodiments.
[0195] Furthermore, the present invention is not limited to the above-described embodiment, and various modifications and alterations are possible without departing from the scope of the present invention.
[0196] (Embodiment B) It is also possible to generate video data by switching as necessary between the video coding method or device shown in each of the above embodiments and a video coding method or device conforming to a different standard, such as MPEG-2, MPEG4-AVC, or VC-1.
[0197] Here, when multiple pieces of video data conforming to different standards are generated, it is necessary to select a decoding method corresponding to each standard when decoding. However, since it is not possible to identify which standard the video data to be decoded conforms to, a problem arises in that it is not possible to select an appropriate decoding method.
[0198] To solve this problem, multiplexed data, which is video data multiplexed with audio data, contains identification information indicating which standard the video data complies with. A specific configuration of multiplexed data including video data generated by the video coding method or device shown in each of the above embodiments will be described below. The multiplexed data is a digital stream in the MPEG-2 transport stream format.
[0199] FIG. 18 is a diagram showing the structure of multiplexed data. As shown in FIG. 18, the multiplexed data is obtained by multiplexing one or more of a video stream, an audio stream, a presentation graphics stream (PG), and an interactive graphics stream. The video stream indicates the main video and the sub-video of a movie, the audio stream (IG) indicates the main audio part of the movie and the sub-audio mixed with the main audio, and the presentation graphics stream indicates the subtitles of the movie. Here, the main video indicates a normal video displayed on a screen, and the sub-video indicates a video displayed on a small screen within the main video. The interactive graphics stream indicates an interactive screen created by arranging GUI components on a screen. The video stream is encoded by the moving image encoding method or device shown in each of the above embodiments, or a moving image encoding method or device conforming to conventional standards such as MPEG-2, MPEG4-AVC, and VC-1. The audio stream is encoded by a method such as Dolby AC-3, Dolby Digital Plus, MLP, DTS, DTS-HD, or Linear PCM.
[0200] Each stream included in the multiplexed data is identified by a PID. For example, 0x1011 is assigned to the video stream used for the movie image, 0x1100 to 0x111F to the audio stream, 0x1200 to 0x121F to the presentation graphics stream, 0x1400 to 0x141F to the interactive graphics stream, 0x1B00 to 0x1B1F to the video stream used for the movie secondary video, and 0x1A00 to 0x1A1F to the audio stream used for the secondary audio to be mixed with the main audio.
[0201] 19 is a diagram showing a schematic diagram of how multiplexed data is multiplexed. First, a video stream ex235 consisting of a plurality of video frames and an audio stream ex238 consisting of a plurality of audio frames are converted into PES packet sequences ex236 and ex239, respectively, and then converted into TS packets ex237 and ex240. Similarly, data of a presentation graphics stream ex241 and interactive graphics ex244 are converted into PES packet sequences ex242 and ex245, respectively, and then converted into TS packets ex243 and ex246. The multiplexed data ex247 is constructed by multiplexing these TS packets into one stream.
[0202] Fig. 20 shows in more detail how a video stream is stored in a PES packet sequence. The first row in Fig. 20 shows a video frame sequence of a video stream. The second row shows a PES packet sequence. As indicated by arrows yy1, yy2, yy3, and yy4 in Fig. 20, I-pictures, B-pictures, and P-pictures, which are multiple Video Presentation Units in a video stream, are divided into individual pictures and stored in the payload of a PES packet. Each PES packet has a PES header, and the PES header stores a Presentation Time-Stamp (PTS) that is the display time of the picture and a Decoding Time-Stamp (DTS) that is the decoding time of the picture.
[0203] Fig. 21 shows the format of the TS packet that is finally written to the multiplexed data. The TS packet is a fixed-length packet of 188 bytes consisting of a 4-byte TS header that has information such as a PID that identifies the stream, and a 184-byte TS payload that stores the data, and the above PES packet is divided and stored in the TS payload. In the case of BD-ROM, a 4-byte TP_Extra_Header is added to the TS packet, forming a 192-byte source packet that is written to the multiplexed data. Information such as ATS (Arrival_Time_Stamp) is written in the TP_Extra_Header. The ATS indicates the start time of transfer of the TS packet to the PID filter of the decoder. In the multiplexed data, source packets are lined up as shown in the lower part of Fig. 21, and the number that increments from the beginning of the multiplexed data is called SPN (Source Packet Number).
[0204] In addition to the various streams such as video, audio, and subtitles, the TS packets contained in the multiplexed data also contain a PAT (Program Association Table), PMT (Program Map Table), and PCR (Program Clock Reference). The PAT indicates the PID of the PMT used in the multiplexed data, and the PID of the PAT itself is registered as 0. The PMT has the PID of each stream such as video, audio, and subtitles contained in the multiplexed data, as well as attribute information of the stream corresponding to each PID, and also has various descriptors related to the multiplexed data. The descriptors include copy control information that indicates whether copying of the multiplexed data is permitted or not. The PCR has information on the STC time corresponding to the ATS at which the PCR packet is transferred to the decoder, in order to synchronize the ATC (Arrival Time Clock), which is the time axis of the ATS, with the STC (System Time Clock), which is the time axis of the PTS and DTS.
[0205] FIG. 22 is a diagram explaining the data structure of a PMT in detail. At the beginning of a PMT, a PMT header is placed, which describes the length of the data contained in the PMT, etc. After that, multiple descriptors related to the multiplexed data are placed. The above-mentioned copy control information, etc. are written as descriptors. After the descriptors, multiple pieces of stream information related to each stream included in the multiplexed data are placed. The stream information consists of stream descriptors that describe the stream type to identify the compression codec of the stream, the stream PID, and stream attribute information (frame rate, aspect ratio, etc.). There are as many stream descriptors as there are streams in the multiplexed data.
[0206] When recording on a recording medium, the multiplexed data is recorded together with a multiplexed data information file.
[0207] The multiplexed data information file is management information for multiplexed data as shown in FIG. 23, has one-to-one correspondence with the multiplexed data, and is made up of multiplexed data information, stream attribute information, and an entry map.
[0208] As shown in Fig. 23, the multiplexed data information consists of a system rate, a playback start time, and a playback end time. The system rate indicates the maximum transfer rate of the multiplexed data to the PID filter of the system target decoder, which will be described later. The interval of the ATS contained in the multiplexed data is set to be equal to or less than the system rate. The playback start time is the PTS of the first video frame of the multiplexed data, and the playback end time is set to the PTS of the last video frame of the multiplexed data plus the playback interval of one frame.
[0209] As shown in Fig. 24, the stream attribute information is registered for each PID for each stream included in the multiplexed data. The attribute information has different information for each video stream, audio stream, presentation graphics stream, and interactive graphics stream. The video stream attribute information has information such as what compression codec was used to compress the video stream, the resolution of each picture data constituting the video stream, the aspect ratio, and the frame rate. The audio stream attribute information has information such as what compression codec was used to compress the audio stream, the number of channels included in the audio stream, which language it corresponds to, and the sampling frequency. This information is used for initializing the decoder before the player starts playing.
[0210] In this embodiment, the stream type included in the PMT of the multiplexed data is used. Also, when multiplexed data is recorded on the recording medium, video stream attribute information included in the multiplexed data information is used. Specifically, in the video coding method or device shown in each of the above embodiments, a step or means is provided for setting unique information indicating that the video data is generated by the video coding method or device shown in each of the above embodiments to the stream type included in the PMT or the video stream attribute information. This configuration makes it possible to distinguish between video data generated by the video coding method or device shown in each of the above embodiments and video data that complies with other standards.
[0211] FIG. 25 shows steps of the video decoding method according to the present embodiment. In step exS100, the stream type included in the PMT or the video stream attribute information included in the multiplexed data information is obtained from the multiplexed data. Next, in step exS101, it is determined whether the stream type or the video stream attribute information indicates that the multiplexed data is generated by the video coding method or device shown in each of the above embodiments. If it is determined that the stream type or the video stream attribute information is generated by the video coding method or device shown in each of the above embodiments, in step exS102, decoding is performed by the video decoding method shown in each of the above embodiments. In addition, if the stream type or the video stream attribute information indicates that the data complies with conventional standards such as MPEG-2, MPEG4-AVC, and VC-1, in step exS103, decoding is performed by the video decoding method that complies with the conventional standard.
[0212] In this way, by setting a new unique value in the stream type or video stream attribute information, it is possible to determine whether the video decoding method or device shown in each of the above embodiments is capable of decoding the data when decoding. Therefore, even when multiplexed data conforming to a different standard is input, an appropriate decoding method or device can be selected, making it possible to decode the data without causing an error. In addition, the video encoding method or device, or the video decoding method or device shown in the present embodiment can be used in any of the above-mentioned devices and systems.
[0213] (Embodiment C) The video encoding method and device, and the video decoding method and device shown in each of the above embodiments are typically realized by an LSI, which is an integrated circuit. As an example, FIG. 26 shows the configuration of a single-chip LSIex500. The LSIex500 includes elements ex501, ex502, ex503, ex504, ex505, ex506, ex507, ex508, and ex509, which will be described below, and each element is connected via a bus ex510. When the power supply is on, the power supply circuit unit ex505 supplies power to each unit to start them up in an operable state.
[0214] For example, when performing encoding processing, the LSIex500 inputs AV signals from the microphone ex117, the camera ex113, etc. through the AV I / Oex509 based on the control of a control unit ex501 having a CPUex502, a memory controller ex503, a stream controller ex504, a drive frequency control unit ex512, etc. The input AV signals are temporarily stored in an external memory ex511 such as an SDRAM. Based on the control of the control unit ex501, the stored data is divided into a plurality of times as appropriate according to the processing amount and processing speed, and sent to the signal processing unit ex507, where the audio signal is encoded and / or the video signal is encoded. Here, the encoding processing of the video signal is the encoding processing described in each of the above embodiments. The signal processing unit ex507 further performs processing such as multiplexing the encoded audio data and the encoded video data as the case may be, and outputs the data to the outside from the stream I / Oex506. This output multiplexed data is transmitted to the base station ex107, or written to a recording medium ex215. When multiplexing, it is advisable to temporarily store the data in a buffer ex508 to ensure synchronization.
[0215] In the above, the memory ex511 is described as an external configuration of the LSIex500, but it may be included inside the LSIex500. The buffer ex508 is not limited to one, and may include multiple buffers. Furthermore, the LSIex500 may be formed as a single chip or multiple chips.
[0216] In the above, the control unit ex501 has a CPU ex502, a memory controller ex503, a stream controller ex504, a drive frequency control unit ex512, etc., but the configuration of the control unit ex501 is not limited to this configuration. For example, the signal processing unit ex507 may further include a CPU. By providing a CPU inside the signal processing unit ex507, it is possible to further improve the processing speed. As another example, the CPU ex502 may include the signal processing unit ex507, or a part of the signal processing unit ex507, such as an audio signal processing unit. In such a case, the control unit ex501 is configured to include the CPU ex502 having the signal processing unit ex507 or a part thereof.
[0217] Although we refer to it as LSI here, it may also be called IC, system LSI, super LSI, or ultra LSI depending on the level of integration.
[0218] The method of integration is not limited to LSI, but may be realized by a dedicated circuit or a general-purpose processor. It is also possible to use a field programmable gate array (FPGA) that can be programmed after LSI manufacturing, or a reconfigurable processor that can reconfigure the connections and settings of circuit cells inside the LSI.
[0219] Furthermore, if a new integrated circuit technology that can replace LSI appears due to the progress of semiconductor technology or a derivative technology, it may be possible to integrate the functional blocks using that technology. The application of biotechnology is also a possibility.
[0220] (Embodiment D) When decoding video data generated by the video encoding method or device shown in each of the above embodiments, the amount of processing is expected to increase compared to when decoding video data conforming to conventional standards such as MPEG-2, MPEG4-AVC, and VC-1. Therefore, in the LSIex500, it is necessary to set a driving frequency higher than the driving frequency of the CPUex502 when decoding video data conforming to conventional standards. However, when the driving frequency is increased, a problem occurs in that power consumption increases.
[0221] In order to solve this problem, a video decoding device such as a television ex300 or an LSI ex500 is configured to identify which standard the video data complies with and switch the driving frequency according to the standard. FIG. 27 shows a configuration ex800 in this embodiment. If the video data is generated by the video encoding method or device shown in each of the above embodiments, the driving frequency switching unit ex803 sets the driving frequency high. Then, it instructs the decoding processing unit ex801 that executes the video decoding method shown in each of the above embodiments to decode the video data. On the other hand, if the video data is video data that complies with a conventional standard, it sets the driving frequency low compared to when the video data is generated by the video encoding method or device shown in each of the above embodiments. Then, it instructs the decoding processing unit ex802 that complies with the conventional standard to decode the video data.
[0222] More specifically, the drive frequency switching unit ex803 is composed of the CPU ex502 and the drive frequency control unit ex512 in FIG. 26. The decoding processing unit ex801 that executes the video decoding method shown in each of the above embodiments and the decoding processing unit ex802 that complies with the conventional standard correspond to the signal processing unit ex507 in FIG. 26. The CPU ex502 identifies which standard the video data complies with. Then, based on the signal from the CPU ex502, the drive frequency control unit ex512 sets the drive frequency. Also, based on the signal from the CPU ex502, the signal processing unit ex507 decodes the video data. Here, for example, the identification information described in embodiment B can be used to identify the video data. The identification information is not limited to that described in embodiment B, and may be any information that can identify which standard the video data complies with. For example, if it is possible to identify which standard the video data complies with based on an external signal that identifies whether the video data is used for a television or a disc, the identification may be based on such an external signal. Also, the selection of the drive frequency in the CPUex502 may be based on a lookup table that associates the video data standard with the drive frequency, as shown in Fig. 29. The lookup table is stored in the bufferex508 or the internal memory of the LSI, and the CPUex502 can select the drive frequency by referring to this lookup table.
[0223] FIG. 28 shows steps for carrying out the method of the present embodiment. First, in step exS200, the signal processing unit ex507 acquires identification information from the multiplexed data. Next, in step exS201, the CPU ex502 identifies whether the video data is generated by the encoding method or device shown in each of the above embodiments based on the identification information. If the video data is generated by the encoding method or device shown in each of the above embodiments, in step exS202, the CPU ex502 sends a signal to set the driving frequency to a high frequency to the driving frequency control unit ex512. Then, the driving frequency is set to a high frequency in the driving frequency control unit ex512. On the other hand, if the video data is in accordance with conventional standards such as MPEG-2, MPEG4-AVC, and VC-1, in step exS203, the CPU ex502 sends a signal to set the driving frequency to a low frequency to the driving frequency control unit ex512. Then, in the driving frequency control unit ex512, the driving frequency is set to a low frequency compared to when the video data is generated by the encoding method or device shown in each of the above embodiments.
[0224] Furthermore, by changing the voltage applied to the LSIex500 or a device including the LSIex500 in conjunction with switching the drive frequency, it is possible to further improve the power saving effect. For example, when the drive frequency is set to a low value, it is conceivable to set the voltage applied to the LSIex500 or a device including the LSIex500 to a lower value compared to when the drive frequency is set to a high value.
[0225] In addition, the method of setting the drive frequency is not limited to the above-mentioned setting method, and may be such that the drive frequency is set high when the amount of processing required for decoding is large, and the drive frequency is set low when the amount of processing required for decoding is small. For example, when the amount of processing required for decoding video data conforming to the MPEG4-AVC standard is larger than the amount of processing required for decoding video data generated by the video encoding method or device shown in each of the above-mentioned embodiments, the drive frequency may be set in the opposite manner to the above-mentioned setting method.
[0226] Furthermore, the method of setting the drive frequency is not limited to the configuration of lowering the drive frequency. For example, when the identification information indicates that the video data is generated by the video encoding method or device shown in each of the above embodiments, the voltage to be applied to the LSIex500 or the device including the LSIex500 is set high, and when the identification information indicates that the video data is compliant with conventional standards such as MPEG-2, MPEG4-AVC, VC-1, the voltage to be applied to the LSIex500 or the device including the LSIex500 is set low. As another example, when the identification information indicates that the video data is generated by the video encoding method or device shown in each of the above embodiments, the drive of the CPUex502 is not stopped, and when the identification information indicates that the video data is compliant with conventional standards such as MPEG-2, MPEG4-AVC, VC-1, the drive of the CPUex502 is temporarily stopped because there is a margin for processing. Even when the identification information indicates that the video data is generated by the video encoding method or device shown in each of the above embodiments, the drive of the CPUex502 is temporarily stopped if there is a margin for processing. In this case, it is conceivable to set the stop time shorter than when the video data indicates that it is video data conforming to conventional standards such as MPEG-2, MPEG4-AVC, and VC-1.
[0227] In this way, by switching the drive frequency according to the standard to which the video data conforms, it is possible to achieve power saving. Also, when the LSIex500 or a device including the LSIex500 is driven by a battery, the power saving can extend the battery life.
[0228] (Embodiment E) In the above-mentioned devices and systems, such as televisions and mobile phones, multiple video data conforming to different standards may be input. In order to be able to decode multiple video data conforming to different standards, the signal processing unit ex507 of the LSIex500 must support multiple standards. However, if a signal processing unit ex507 corresponding to each standard is used individually, the circuit size of the LSIex500 will increase, and the cost will also increase.
[0229] In order to solve this problem, a configuration is adopted in which a decoding processing unit for executing the video decoding method shown in each of the above embodiments is partially shared with a decoding processing unit conforming to conventional standards such as MPEG-2, MPEG4-AVC, and VC-1. An example of this configuration is shown in ex900 of FIG. 30A. For example, the video decoding method shown in each of the above embodiments and the video decoding method conforming to the MPEG4-AVC standard share some of the processing contents in processes such as entropy coding, inverse quantization, deblocking filter, and motion compensation. For the common processing contents, a decoding processing unit ex902 conforming to the MPEG4-AVC standard is shared, and a dedicated decoding processing unit ex901 is used for other processing contents specific to one aspect of the present invention that are not conforming to the MPEG4-AVC standard. In particular, since one aspect of the present invention is characterized by inverse quantization, for example, a dedicated decoding processing unit ex901 is used for inverse quantization, and a decoding processing unit is shared for any or all of the other processing such as entropy decoding, deblocking filter, and motion compensation. Regarding sharing of the decoding processing unit, for common processing content, a decoding processing unit for executing the video decoding method shown in each of the above embodiments may be shared, and for processing content specific to the MPEG4-AVC standard, a dedicated decoding processing unit may be used.
[0230] Another example of partially sharing the process is shown in ex1000 in FIG. 30B. In this example, a dedicated decoding processing unit ex1001 corresponding to the process content specific to one aspect of the present invention, a dedicated decoding processing unit ex1002 corresponding to the process content specific to another conventional standard, and a shared decoding processing unit ex1003 corresponding to the process content common to the video decoding method according to one aspect of the present invention and the video decoding method of another conventional standard are used. Here, the dedicated decoding processing units ex1001 and ex1002 are not necessarily specialized for the process content specific to one aspect of the present invention or another conventional standard, and may be capable of executing other general-purpose processes. In addition, the configuration of this embodiment can also be implemented in LSIex500.
[0231] In this way, by sharing a decoding processing unit for processing content common to a video decoding method according to one embodiment of the present invention and a video decoding method according to a conventional standard, it is possible to reduce the circuit size of the LSI and reduce costs.
[0232] In summary, the present invention relates to deblocking filtering applicable for smoothing block boundaries in image or video encoding and decoding. In particular, deblocking filtering is applied to samples at block boundaries according to predefined parameters, which are used to offset the samples as part of the filtering. According to the present invention, the parameters are obtained by calculating a weighted sum of samples around the boundary, offsetting the weighted sum by a value depending on the value of the weighted sum, and shifting the result to the right by a predefined number of bits.
[0233] The present invention relates to deblocking filtering applicable to smoothing block boundaries in image or video encoding and decoding. In particular, deblocking filtering can be weak or strong, and clipping performed in strong filtering and weak filtering is different.
Claims
1. A processing circuit; a memory coupled to the processing circuit; The processing circuitry uses the memory to: selecting a filter for a boundary between the first block and the second block from among a plurality of candidates; performing a deblocking filter process using the selected filter to change values of a plurality of pixels aligned on a straight line perpendicularly intersecting the boundary; the plurality of pixels include a first pixel and a second pixel adjacent to each other across the boundary, the plurality of candidates includes a first filter that modifies values of a first number of the plurality of pixels and a second filter that modifies values of a second number of the plurality of pixels, the second number being greater than the first number; In the deblocking filter process when the first filter is selected, a clipping process is performed to set pixel change amounts of the first pixel and the second pixel to be equal to or greater than a negative first clipping value and equal to or less than a positive first clipping value; In the deblocking filter process when the second filter is selected, a clipping process is performed to set the pixel change amount of each of the first pixel and the second pixel to be equal to or greater than a negative second clipping value and equal to or less than a positive second clipping value; the first clipping value is different from the second clipping value; the first block and the second block are adjacent to each other in the left and right direction, and the boundary is a vertical boundary. Decryption device.
2. A processing circuit; a memory coupled to the processing circuit; The processing circuitry uses the memory to: selecting a filter for a boundary between the first block and the second block from among a plurality of candidates; performing a deblocking filter process using the selected filter to change values of a plurality of pixels aligned on a straight line perpendicularly intersecting the boundary; the plurality of pixels include a first pixel and a second pixel adjacent to each other across the boundary, the plurality of candidates includes a first filter that modifies values of a first number of the plurality of pixels and a second filter that modifies values of a second number of the plurality of pixels, the second number being greater than the first number; In the deblocking filter process when the first filter is selected, a clipping process is performed to set pixel change amounts of the first pixel and the second pixel to be equal to or greater than a negative first clipping value and equal to or less than a positive first clipping value; In the deblocking filter process when the second filter is selected, a clipping process is performed to set the pixel change amount of each of the first pixel and the second pixel to be equal to or greater than a negative second clipping value and equal to or less than a positive second clipping value; the first clipping value is different from the second clipping value; the first block and the second block are adjacent to each other in the left and right direction, and the boundary is a vertical boundary. Encoding device.
3. selecting a filter for a boundary between the first block and the second block from among a plurality of candidates; performing a deblocking filter process using the selected filter to change values of a plurality of pixels aligned on a straight line perpendicularly intersecting the boundary; the plurality of pixels include a first pixel and a second pixel adjacent to each other across the boundary, the plurality of candidates includes a first filter that modifies values of a first number of the plurality of pixels and a second filter that modifies values of a second number of the plurality of pixels, the second number being greater than the first number; In the deblocking filter process when the first filter is selected, a clipping process is performed to set pixel change amounts of the first pixel and the second pixel to be equal to or greater than a negative first clipping value and equal to or less than a positive first clipping value; In the deblocking filter process when the second filter is selected, a clipping process is performed to set the pixel change amount of each of the first pixel and the second pixel to be equal to or greater than a negative second clipping value and equal to or less than a positive second clipping value; the first clipping value is different from the second clipping value; the first block and the second block are adjacent to each other in the left and right direction, and the boundary is a vertical boundary. Decryption method.
4. selecting a filter for a boundary between the first block and the second block from among a plurality of candidates; performing a deblocking filter process using the selected filter to change values of a plurality of pixels aligned on a straight line perpendicularly intersecting the boundary; the plurality of pixels include a first pixel and a second pixel adjacent to each other across the boundary, the plurality of candidates includes a first filter that modifies values of a first number of the plurality of pixels and a second filter that modifies values of a second number of the plurality of pixels, the second number being greater than the first number; In the deblocking filter process when the first filter is selected, a clipping process is performed to set pixel change amounts of the first pixel and the second pixel to be equal to or greater than a negative first clipping value and equal to or less than a positive first clipping value; In the deblocking filter process when the second filter is selected, a clipping process is performed to set the pixel change amount of each of the first pixel and the second pixel to be equal to or greater than a negative second clipping value and equal to or less than a positive second clipping value; the first clipping value is different from the second clipping value; the first block and the second block are adjacent to each other in the left and right direction, and the boundary is a vertical boundary. Encoding method.
Citation Information
Patent Citations
Deblocking filtering
WO2012096610A1
Image processing device and image processing method
WO2013001957A1