Encoding a video using a reduced range of pixel values
Patent Information
- Application Number
- CN202610544754.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-04-30
- Filing Date
- 2026-04-23
- Publication Date
- 2026-10-30
AI Technical Summary
这一拉伸可能导致可见的伪影,尤其是在具有逐渐的颜色变化或亮度变化的区域中
Smart Images

Figure CN123020795A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to video coding, and more specifically, to video coding of video using a reduced range of pixel values. Background Technology
[0002] Video standards such as BT.709, commonly used in HDTV systems, define how video should be encoded and displayed. The BT.709 standard defines the use of a reduced range of pixel values (typically 16 to 235 for luminance and 16 to 240 for chroma), instead of the full range of 0 to 255. This reduced range provides headroom for signal processing and helps avoid clipping during transmission and display.
[0003] When downscaled video is displayed on a full-scale monitor, the monitor typically stretches pixel values to fill the full 0-255 range (often also performing a conversion from YCbCr to RGB space). This stretching can cause visible artifacts, especially in areas with gradual color or brightness changes. For example, a smooth gradient may appear uneven, with some brightness steps appearing larger than others. This effect is most noticeable in the darker areas of the image, where the eye is more sensitive to small differences.
[0004] Therefore, there is a need to improve this aspect. Summary of the Invention
[0005] In view of the foregoing, it would be advantageous to resolve or at least mitigate one or more of the disadvantages discussed above, as set forth in the appended independent patent claims.
[0006] According to a first aspect of this disclosure, a method is provided for encoding video using a reduced range of pixel values, wherein the reduced range is a subset of the full range that information units for pixel values can represent. The method includes: defining a first range of pixel values of a video within the reduced range; for each pixel of the video, a conversion from the reduced range to the full range of pixel values generates a second range of pixel values of the video within the full range, wherein the span of the second range is greater than the span of the first range, such that when converted to the second range, the differences between pixel values within the first range are amplified; identifying a first group of one or more blocks of an image frame of the video within the reduced range, wherein pixels exceeding a predetermined threshold in the first group of one or more blocks have pixel values within the first range of pixel values; determining a basic compression value for each block of the image frame; determining a reduced compression value for each block in the first group of one or more blocks of the image frame, each reduced compression value being lower than the corresponding basic compression value by a predetermined compression offset; and encoding the image frame using the corresponding reduced compression values of the first group of one or more blocks and the corresponding basic compression values of all other blocks.
[0007] For example, if the reduced range is 16-235 and the full range is 0-255 (therefore, the reduced range is a subset of the full range), some pixel value ranges within the reduced range, such as 31 to 32, may be unevenly stretched when converted to the full range. In this case, 31 and 32 might map to 17 and 19 respectively in the full range, causing a single-step difference in the reduced range to appear as a two-step difference after conversion. In other words, small differences in pixel values within certain portions of the reduced range become visually magnified when stretched to the full range. This distortion tends to occur at regular intervals, approximately every 7 steps in the example above within the reduced range.
[0008] As used herein, the term "differences between pixel values in the first pixel value range are amplified when converted to the second pixel value range" refers to the effect that occurs when pixel values encoded in a reduced range (e.g., 16-235) are converted to the full range (e.g., 0-255) by linear stretching. Due to the scaling factor between the two ranges, a single step difference between two adjacent pixel values in the first pixel value range may result in a multi-step difference in the converted second pixel value range.
[0009] The inventors have recognized that it is possible to preserve subtle variations and reduce the visibility of abrupt transitions between blocks by identifying image regions whose pixel values, at least a predetermined threshold portion, fall within a range of first pixel values known to cause differential amplification when stretched to the full range, and by applying lower compression to these blocks. This selective compression method smooths out-of-tone gradients and improves the overall visual quality of the encoded video.
[0010] The identification of flat image regions is achieved using a threshold (a predetermined threshold portion), where it can be assumed or determined that at least a threshold portion (e.g., 75%, 80%, 90%, etc.) of pixels lie within a first pixel value range. These regions may be more prone to visible artifacts such as banding (i.e., unwanted visible staircases or stripes in areas that should appear as smooth gradients). By applying lower compression to such regions, the method helps maintain smooth gradients and reduces the risk of boundary widening between blocks in the first group and the remaining blocks, thereby improving visual quality when decoding the video within the reduced range later.
[0011] In some examples, identifying a block in a first group of one or more blocks includes: determining that the average pixel value of the block is within a predetermined distance of a first pixel value range; and determining that the statistical distribution of the pixel values of the block is below a predetermined distribution.
[0012] Using the average pixel value to check whether a block falls within a first pixel value range or is within a predetermined distance (e.g., 0-2 pixel values) from the first pixel range, in conjunction with assessing whether the statistical distribution (e.g., variance) is below a predetermined threshold, offers several advantages. Since the mean and variance are typically calculated during encoding, this example is computationally efficient and avoids the overhead of explicitly checking each pixel within the first pixel value range, instead using already available values: the average pixel value and variance. It can also reliably identify flat regions (low variance) within the problematic value range, where visual artifacts are more likely to occur after range stretching.
[0013] In some examples, identifying a block in a first group of one or more blocks includes: comparing the pixel value of each pixel with the pixel value of its nearest neighbor, identifying a transition from one pixel value in a first pixel value range to another pixel value in the first pixel value range; and determining that the block is in the first group of one or more blocks if the number of transitions identified in the block is higher than a predetermined number.
[0014] This method enables the identification of blocks with frequent changes in values within a first pixel value range that may be particularly susceptible to the effects of stretching when stretched to the full extent.
[0015] In some examples, the pixel value is a luminance value, the reduced range of the pixel value is a reduced range of the luminance value, and the first pixel value range defines the luminance pixel value. In these examples, each pixel value in the first pixel value range is below a predetermined darkness threshold of the reduced range of luminance values.
[0016] By focusing on brightness values below a predetermined darkness threshold, this example targets visually dark areas where the human eye is particularly sensitive to tonal inconsistencies. Due to low contrast and / or limited light variation, artifacts such as banding may be more noticeable in these areas.
[0017] In some examples, pixel values are chroma values, the reduction range of pixel values is the reduction range of chroma values, and the first pixel value range defines the chroma pixel values.
[0018] By targeting chroma values, this example can resolve color banding artifacts that can occur in areas with subtle color shifts, such as skies, skin tones, or out-of-focus backgrounds. These areas may appear visually smooth, but will still suffer from enlarged color steps when the chroma values in the reduced range are stretched to the full range.
[0019] In some examples, the base compression value and the reduced compression value are quantization parameter (QP) values. QP values can be supported by many video encoders. The QP value controls the degree of quantization applied during encoding, where a higher QP means a higher degree of compression, and a lower QP means a lower degree of compression.
[0020] In some examples, the method further includes: determining a base denoising value for each block of an image frame; determining a reduced denoising value for each block of a first group of one or more blocks, each reduced denoising value being lower than the corresponding base denoising value by a predetermined denoising offset; and applying denoising to the image frame using the corresponding reduced denoising values of the first group of one or more blocks and the corresponding base denoising values of all other blocks.
[0021] Applying reduced noise reduction before compressing the first group of blocks helps preserve subtle pixel variations that might otherwise be smoothed out, thus reducing the risk of increased banding or transitions between blocks after range stretching.
[0022] In some examples, jitter is added to one or more blocks in the first group before the image frame is encoded.
[0023] Adding dithering before encoding the first group of blocks (and typically after applying any noise reduction) can help eliminate visible banding by introducing controlled noise, making the transitions between pixel values appear smoother.
[0024] According to a second aspect of this disclosure, the above objective is achieved by an apparatus for encoding video using a reduced range of pixel values, wherein the reduced range is a subset of the full range that can be represented by information units for pixel values, the apparatus including circuitry configured to perform: a limiting function configured to limit a first range of pixel values of a video pixel within the reduced range, and for the video pixel, a conversion from the reduced range of pixel values to the full range to generate a second range of pixel values of the video pixel within the full range, wherein the span of the second pixel range is greater than the span of the first pixel range, such that when converted to the second pixel value range, the difference between pixel values within the first pixel value range is amplified; The recognition function is configured to recognize a first group of one or more blocks of an image frame in a reduced range, wherein pixels exceeding a predetermined threshold in the first group of one or more blocks have pixel values within a first pixel value range; a basic compression determination function is configured to determine a basic compression value for each block of the image frame; a reduced compression determination function is configured to determine a reduced compression value for each block of the first group of one or more blocks in the image frame, each reduced compression value being lower than the corresponding basic compression value by a predetermined compression offset; and an encoding function is configured to encode the image frame using the corresponding reduced compression value of the first group of one or more blocks and the corresponding basic compression values of all other blocks.
[0025] In some examples, the recognition function is further configured to recognize a block in a first group of one or more pixel blocks if the following conditions are met: the average pixel value of the block is within a predetermined distance of a first pixel value range; and the statistical distribution of the pixel values of the block is lower than a predetermined distribution.
[0026] In some examples, the device is a camera, and the camera further includes an image sensor configured to capture image frames of video.
[0027] In some examples, the device further includes circuitry configured to perform a transmission function that transmits encoded image frames as encoded video.
[0028] According to a second aspect of this disclosure, the above objective is achieved by an apparatus for encoding video using a reduced range of pixel values, wherein the reduced range is a subset of the full range that can be represented by information units for pixel values, the apparatus including circuitry configured to perform: a limiting function configured to limit a first range of pixel values of a video pixel within the reduced range, and for the video pixel, a conversion from the reduced range of pixel values to the full range to generate a second range of pixel values of the video pixel within the full range, wherein the span of the second pixel range is greater than the span of the first pixel range, such that when converted to the second pixel value range, the difference between pixel values within the first pixel value range is amplified; The recognition function is configured to recognize a first group of one or more blocks of an image frame in a reduced range, wherein pixels exceeding a predetermined threshold in the first group of one or more blocks have pixel values within a first pixel value range; a basic compression determination function is configured to determine a basic compression value for each block of the image frame; a reduced compression determination function is configured to determine a reduced compression value for each block of the first group of one or more blocks in the image frame, each reduced compression value being lower than the corresponding basic compression value by a predetermined compression offset; and an encoding function is configured to encode the image frame using the corresponding reduced compression value of the first group of one or more blocks and the corresponding basic compression values of all other blocks.
[0029] In some examples, the recognition function is further configured to recognize blocks in a first group of one or more pixel blocks if the following conditions are met: the average pixel value of the block falls within a first pixel value range; and the statistical distribution of the pixel values of the block is lower than a predetermined distribution.
[0030] In some examples, the device is a camera, and the camera further includes an image sensor configured to capture image frames of video.
[0031] In some examples, the device further includes circuitry configured to perform a transmission function that transmits encoded image frames as encoded video.
[0032] According to a third aspect of the invention, the above-mentioned objective is achieved by a system for processing video using a reduced range of pixel values, wherein the reduced range is a subset of the complete range that can be represented by information units for pixel values, the system comprising: a transmitting means including means according to the second aspect, configured to transmit encoded video over a network; a receiving means including circuitry configured to receive encoded video over a network and decode encoded video into decoded video; and a display means including circuitry configured to display decoded video.
[0033] In some examples, the circuitry of the receiving device is further configured to perform a range conversion function, which is configured to convert the pixel values of the decoded video from a reduced range of pixel values to the full range.
[0034] The second and third aspects may generally have the same features and advantages as the first aspect. It should be further noted that, unless otherwise expressly stated, this disclosure relates to all possible combinations of features. Attached Figure Description
[0035] The above and additional objects, features and advantages of this disclosure will be better understood through the following illustrative and non-limiting detailed description of embodiments of the present disclosure with reference to the accompanying drawings, in which the same reference numerals will be used for similar elements, wherein:
[0036] Figure 1 This illustrates the conversion of pixel values between the reduced range and the full range according to an embodiment;
[0037] Figure 2 The compressed values of a block of pixels according to an embodiment are shown;
[0038] Figure 3 The pixel values of the blocks of identified pixels according to the embodiment are shown;
[0039] Figure 4 A system for processing video using a reduced range of pixel values, according to an embodiment, is shown.
[0040] Figure 5 A flowchart illustrating a method for encoding video using a reduced range of pixel values, according to an embodiment, is shown. Detailed Implementation
[0041] Some video coding systems rely on standardized, reduced ranges of pixel values (such as those defined in BT.709) for encoding pixel values. These reduced ranges are designed to provide compatibility and clearance for processing. However, when such video signals are displayed on devices with a full range of displayable values, the pixel values in the reduced range are typically stretched to fit the full range of displayable values. This stretching can cause (especially in certain portions of the reduced range) to widen the differences between originally adjacent pixel values, resulting in degraded visual quality.
[0042] This disclosure addresses this problem by adjusting the compression applied to different parts of an image based on whether a given region is likely to be affected by such an amplification effect. Specifically, it identifies blocks in an image frame whose pixel values, at least in a predetermined portion, fall within a problematic subrange of the reduction range. These blocks are then encoded using a lower compression value compared to other blocks in the image. This selective adjustment of compression helps preserve important pixel-level details, mitigates visual artifacts, and thus improves the overall perceptual quality of the encoded video. This will now be combined with... Figures 1 to 5 This describes techniques for encoding and other processing video using a reduced range of pixel values.
[0043] Figure 1 The reduced pixel value range 102, forming a subset (or subrange) of the full pixel value range 104, is illustrated as an example. In this example, the reduced range spans pixel values from 16 to 235, while the full range spans from 0 to 255. Reduced ranges are commonly used in video coding standards such as BT.709, which specify limited range encoding for compatibility and handling clearance.
[0044] Although BT.709 (and the 16-235 and 0-255 ranges used for 8-bit encoding) are referred to throughout this disclosure as employing a reduced pixel range (which may differ from...) Figure 1 The reduction range described herein is a representative example of a standard (reduced range 102), but it should be understood that the techniques described herein are equally applicable to any coding standard that utilizes a reduced range of pixel values on the encoder side. This includes, but is not limited to, BT.601 (for SDTV), BT.2020 (for UHDTV), and modern video codecs such as H.264 / AVC, HEVC, AV1, and JPEG, all of which support a limited range mode through metadata or format constraints. Accordingly, the techniques described herein can be widely applied to enhance visual quality in any case where a reduced range of pixel values is used on the encoding side. Furthermore, the reduction range can vary depending on the type of pixel value, such that, for example, the reduction range used for the chroma component can differ from the reduction range applied to the luma component.
[0045] The difference between the reduced pixel value range and the full pixel value range can be used to identify one or more first pixel value ranges 106 within the reduced range 120. When pixel values within this first pixel value range 106 are converted 110, 112 to the full range 104, they produce a corresponding second (larger) pixel value range 108 in the full range 104. In this sense, each first pixel value range 106 can be considered problematic.
[0046] like Figure 1As illustrated, the span of the second pixel value range 108 is larger than the span of the first pixel value range 106, resulting in a widening of the difference between the converted pixel values. For example, pixel value 31 in the reduced range 102 might be converted to 17 in the full range 104, while value 32 might be converted to value 19. Thus, what was initially a single-step difference (31 to 32) in the reduced range 102 becomes a multi-step difference (17 to 19) in the full range 104, potentially leading to visible artifacts such as banding in the final displayed image.
[0047] Identification of one or more problematic ranges of pixel values within the reduced range 102 can be based on the relationship between the reduced range 102 and the corresponding full range 104. The reduced range 102 is typically defined as a subset of the full range 102 and is intended to represent the valid pixel values during encoding as discussed above. When these reduced values are later displayed on a device operating with the full range of pixel values 104, a transformation, typically linear scaling, is applied to map the reduced range 102 to the full range 104.
[0048] When mapping adjacent pixel values from the reduced range 102 to 110, 112 and then to the full range 104, this scaling introduces inconsistent step sizes. Specifically, there exists a portion 106 of the reduced range 102 where a single step change between two adjacent pixel values results in a two-step or larger change in the full range 104, leading to a visually enlarged shift. These portions of the reduced range 102 are referred to herein as the first pixel value range 106 or the problematic pixel value range 106.
[0049] For example, such as Figure 1 As in the example, consider a reduced range of pixel values from 16 to 235 and a full range of pixel values from 0 to 255. The reduced range 102 has 219 possible values, while the full range 104 has 256 values. When the reduced values are linearly scaled to fit the full range 104, the scaling factor becomes approximately 255 / 219 ≈ 1.164. This means that each step in the reduced range 102 will map 110, 112 to slightly more than one step in the full range 104. As a result, some pairs of adjacent values in the reduced range 102 (such as 31 and 32) will map 110, 112 to values in the full range 104 that are separated by two or more steps (such as 17 and 19).
[0050] These types of stretching occur periodically across the reduction range 102. Regions of disproportionate (expanded) step sizes within the full range 104 can be identified by analyzing the mapping function, for example, by multiplying pixel values within the reduction range by a scaling factor (e.g., approximately 1.164 in the case of mapping 16–235 to 0–255) and then applying rounding operations (e.g., lower or upper bounds) to obtain integer output values. Specifically, certain intervals 106 in the reduction range 102 will map to multi-step intervals 108 in the full range 104.
[0051] In the example where the reduction range spans from 16 to 235 and the full range spans from 0 to 255, this effect occurs approximately once every 7 steps. That is, for approximately every seven consecutive values in the reduction range 102, there is typically at least one pair of pixel values that results in a two-step difference in the full range 104.
[0052] Generally, regardless of the specific values or bit depth used, this analysis can be applied to any pair of reduced and full ranges. The key is to identify intervals within the reduced range where the transformed output range exhibits increased step size or non-uniformity, thus indicating areas that are prone to visually enlarging adjacent pixel values when displayed.
[0053] Then, as will be described now, the scope of these identifications can be used to guide coding decisions such as compression adjustment, dithering, or noise reduction to improve visual quality.
[0054] Figure 2 The image frame is shown as an example of a block 206 of pixels. In video coding, image frames are typically divided into blocks 206, also known as coding blocks, macroblocks, or coding units. Block 206 is, for example (as will be combined below) Figure 3 (Further described) Rectangular regions of pixels 302 processed together during compression. These blocks serve as basic units for operations such as transformation, quantization, prediction, motion compensation, and preprocessing steps such as noise reduction. This block-based structure enables efficient and localized control over both compression and image quality improvement during encoding. Each pixel 302 (i.e., a unit of information) has one or more associated pixel values 304. Depending on the encoding format and color representation used, the pixel values can represent different types of image information. For example, pixel values can correspond to the luminance component (Y) representing brightness, one or more chrominance components (Cb, Cr or U, V) representing color difference, or color channel values such as red, green, and blue (R, G, B) in an RGB-based format.
[0055] As described herein, pixel value 304 of pixel 302 is used to determine whether block 206 is considered problematic, that is, to determine whether block 206 belongs to the first group of blocks affected by the stretching of pixel values from the reduced range to the full range. Blocks identified in this way are more likely to exhibit visual artifacts due to the amplified differences between the transformed pixel values.
[0056] If it can be determined that pixels 302 in block 206 that exceed a predetermined threshold have pixel values 304 within a first pixel value range, then block 206 is considered problematic. This can be determined by explicitly counting the number of pixels in the block whose values fall within the first pixel value range and then comparing that count to a threshold derived from the total number of pixels in the block. If the count exceeds the threshold, block 206 is classified as part of a first group of blocks. This method provides accurate identification but may involve additional computational work. However, this type of conversion counting can be implemented efficiently in hardware.
[0057] In other embodiments, this classification is based on values already available during encoding, thereby reducing computational overhead. In this case, a block is considered problematic if both of the following conditions are met:
[0058] The average pixel value in the block is within a predetermined distance from the range of the first pixel value; and
[0059] The statistical distribution (e.g., variance or standard deviation) of pixel values in a block is below a predetermined threshold, indicating a low level of variation.
[0060] This method efficiently identifies blocks with concentrated pixel values near problematic regions, which typically correspond to flat or uniform regions where stretching artifacts are more pronounced, without requiring pixel-by-pixel evaluation.
[0061] For example, the predetermined distance can be in the range of 0 to 2 pixel values. Similarly, the predetermined threshold for variance can be in the range of 1 to 2. However, the threshold and distance can be background-dependent and can be determined based on the application.
[0062] For example, in Figure 2 In the diagram, the pixel values of block 206 are: (31, 32, 31, 31, 32, 34, 32, 31, 32, 31, 32, 32, 28, 31, 32, 31, 31). These values have a mean of approximately 31.3 and a variance of approximately 1.1, indicating that these values are concentrated near the problematic subrange (in this case, within a distance of 0) and are tightly clustered, making block 206 a candidate to be included in the first group of blocks.
[0063] In several other examples, this classification is based on detecting local transitions between pixel values within a block. Specifically, the method involves comparing each pixel value with the pixel values of its nearest neighbors (e.g., adjacent pixels in the horizontal and vertical directions) and identifying transitions from one pixel value to another, where both values fall within the range of a first pixel value. If the number of such identified transitions exceeds a predetermined threshold, the block is classified as part of a first group of blocks. This method focuses on local structural and pattern variations within the pixel data, rather than relying on statistical metrics like mean and variance. Figure 2 In the example, the number of transitions between pixel values within the first range of pixel values (e.g., 31 to 32, or vice versa) is 11. These transitions occur between (horizontally or vertically) adjacent pixels where both values are within the specified range but are not equal. The threshold can be defined, for example, as a percentage or ratio of the number of transitions divided by the number of pixels.
[0064] Furthermore, similar to the pixel value counting operation described above, this type of transition counting can be implemented efficiently in hardware.
[0065] In some examples, pixel values are luminance values, reduction ranges are reduction ranges of luminance values, and a first pixel value range defines a subrange of luminance values. In this case, the classification technique described herein (for identifying problematic blocks) is specifically applied to luminance information, which typically represents the luminance of each pixel and is important for perceived visual detail and contrast.
[0066] In a further example, the first pixel value range can be limited to the dark regions of the luminance scale. That is, each pixel value in the first pixel value range is below a predetermined darkness threshold or contrast threshold within the reduced range of luminance values. In darker and / or low-contrast regions, artifacts such as banding or enlarged block boundaries are typically more noticeable. By focusing on these darker / low-contrast luminance values, the correction measures (compression, noise reduction, jitter) described herein can be applied where they are most likely to improve perceptual quality. This can reduce the impact on the bitrate of the encoded video caused by the reduced compression values.
[0067] In other examples, pixel values are chroma values, reduction ranges are reduction ranges of chroma values, and a first pixel value range defines a subrange of chroma values. In this case, the classification technique described herein (for identifying problematic blocks) is specifically applied to the chroma information.
[0068] Once block 206 has been identified as problematic, various strategies can be applied to mitigate the visual impact caused by stretching pixel values from the reduced range to the full range. This will now be combined with... Figure 3 This will be described.
[0069] Figure 3 An image frame 202 of the video discussed above, under reduced resolution, is shown as an example. The image frame comprises multiple blocks 204, 206 of pixels. Figure 3 In the diagram, the problematic block 206 is identified by a striped pattern. Figure 3 In the middle, the remaining block 204 (which is not considered problematic) is marked with a dashed line pattern.
[0070] As discussed above, determining adaptive compression values for blocks 204 and 206 of image frame 202 is a favorable strategy for reducing the visual impact caused by stretching pixel values from the reduced range to the full range. For example, a base compression value can be determined for each block 204 and 206 of image frame 202 based on standard coding parameters such as bit rate target, motion complexity, and texture detail. The base compression values can differ between blocks 204 and 206, thus reflecting the varying content characteristics of the entire image frame 202. These base compression values reflect the default compression settings that the encoder would apply to the image blocks under normal conditions without considering the potential problems of converting the reduced range to the full range as discussed herein.
[0071] Then, a reduced compression value is determined for each of the problematic blocks 206 by reducing the base compression value (i.e., the compression level that would otherwise be applied to the corresponding block) by a predetermined compression offset. The predetermined offset can be a fixed value, or it can be a proportional reduction (e.g., reducing the QP value by a fixed value as discussed below), where a predetermined ratio is applied to the base compression value.
[0072] The base compression value and the reduced compression value can be defined as quantization parameter (QP) values. For example, a problematic block can have its QP value reduced by a fixed amount from its base value.
[0073] Then, the image frame 202 is encoded using the corresponding reduced compression value of the problematic block 206 and the corresponding basic compression values of all other blocks 204.
[0074] Additionally or alternatively, other techniques can be applied to reduce the visual impact caused by stretching pixel values from the reduced range to the full range. One such technique involves adjusting the noise reduction level in a manner similar to the adaptive compression strategy described above. Specifically, a basic noise reduction value can be determined for each block 204, 206 of image frame 202 based on standard coding criteria such as block texture or motion activity.
[0075] For block 206 identified as problematic (i.e., the block in the first group), the reduced noise reduction value is determined by decreasing the corresponding base noise reduction value by a predetermined noise reduction offset. This offset can be fixed, or it can be a proportional reduction based on the corresponding base noise reduction value determined for block 206.
[0076] Then, noise reduction is applied to the image frame using the reduced noise reduction value of the problematic block 206 and the basic noise reduction values of all other blocks 204. This selective approach can help improve the overall visual quality of the encoded video / image frame.
[0077] Another additional or alternative technique involves applying dithering to the problematic block 206 before encoding the image frame. Dithering introduces controlled noise to disrupt uniform areas or abrupt transitions and can help improve the overall visual quality in the encoded video / image frame.
[0078] Figure 4 A device 402 configured to implement the techniques described herein is shown by way of example. In some embodiments, device 402 may be a camera 404. In some embodiments, device 402 may be part of a system 400, which further includes a client device 450 configured to receive and display video 416 encoded by device 402. This will now be combined with... Figure 5 The flowchart shown illustrates the components and functions of device 402 and system 400.
[0079] Therefore, apparatus 402 is used to encode video using a reduced range of pixel values, wherein the reduced range is a subset of the full range that can be represented by information units for pixel values. Apparatus 402 includes circuitry configured to perform the functions described herein. For example, the apparatus may include memory (non-transitory computer-readable medium) 408 storing instructions 410 executable by one or more processors 406, wherein, when executed, the instructions cause one or more processors to perform the operations and functions described herein.
[0080] These operations may include a limiting function configured to limit a first range of pixel values of the S502 video within a reduced range, wherein for the pixel range of the video, a conversion from the reduced range of pixel values to the full range produces a second range of pixel values of the video within the full range, wherein the span of the second pixel range is greater than the span of the first pixel range, such that when converted to the second pixel value range, the difference between pixel values within the first pixel value range is amplified.
[0081] These operations may include a recognition function configured to identify one or more blocks within a reduced range of image frames of the S504 video, wherein pixels exceeding a predetermined threshold have pixels within a first pixel value range; the recognition function may achieve the above combination. Figure 2 The technology described.
[0082] These operations may include a basic compression determination function, which is configured to determine the basic compression value for each block of an S510 image frame.
[0083] These operations may include a reduced compression determination function configured to determine a reduced compression value for each block in a first group of one or more blocks in an S512 image frame, each reduced compression value being lower than the corresponding base compression value by a predetermined compression offset.
[0084] These operations may include an encoding function configured to encode an image frame using a corresponding reduced compression value of one or more blocks in a first group and a corresponding basic compression value of all other blocks S514.
[0085] The basic compression determination function, the reduced compression determination function, and the encoding function can achieve the techniques described in this article (e.g., the combination of the above). Figure 3 The techniques described herein. These operations may further include those described herein (e.g., in combination with the above). Figure 3 The functions described herein for determining (basic and reduced) noise reduction values and for applying the noise reduction to image frames using S506. These operations may further include those described herein (e.g., in combination with the above). Figure 3 (Described) is a function used to add jitter S508 to one or more blocks in the first identified group.
[0086] These operations may include a transmission function configured to transmit encoded image frames as encoded video 416. In these embodiments, system 400 may include a transmission device 412 (e.g., implemented in device 402, or a device 412 separate from device 402) configured to transmit encoded video 416 via a network such as a local area network (LAN), the Internet, or a wireless communication link. Transmission device 412 may be implemented using various hardware configurations such as a dedicated network interface, a system-on-a-chip (SoC) with integrated transmission capabilities, or a standalone networked device connected to device 402. Depending on the application environment, it may support wired or wireless communication protocols including Ethernet, Wi-Fi, 4G / 5G, or other suitable transmission technologies.
[0087] In the example where device 402 is camera 404, camera 404 further includes an image sensor 414 configured to capture image frames of video.
[0088] System 400 may further include client device 452. Similar to device 402, client device 452 may include circuitry configured to perform the functions described herein. For example, client device 452 may include memory (non-transitory computer-readable medium) 454 storing instructions 458 executable by one or more processors 456, wherein, when executed, the instructions cause one or more processors 454 to perform the operations and functions described herein.
[0089] These operations may include a receiving function configured to receive encoded video 416 over a network and a decoding function configured to decode the received encoded video 416 into decoded video. For this purpose, system 400 includes a receiving device 452 (implemented in client device 450 or implemented as a standalone device) containing circuitry configured to receive encoded video 452 over a network. The receiving device 452 may be implemented using various hardware configurations such as a dedicated network interface, a system-on-a-chip (SoC) with integrated receiving capabilities, or a standalone networking device connected to client device 450. Depending on the application environment, it may support wired or wireless communication protocols including Ethernet, Wi-Fi, 4G / 5G, or other suitable transmission technologies.
[0090] The client device 450 may further include a display 458. For this reason, the operations implemented in the client device 450 may include display functions for displaying the decoded video on the display 458.
[0091] The operations implemented in the client device 450 may include a range conversion function configured to convert the pixel values of the decoded video from a reduced range of pixel values to the full range.
[0092] The above embodiments should be understood as illustrative examples of this disclosure. Further embodiments of this disclosure are contemplated. For example, encoding and decoding can be performed using any encoding standard such as H.264 / AVC, H.265 / HEVC, AV1, VP9, VVC (H.266), or JPEG-based formats. The techniques described herein are not limited to any particular codec and can be applied in any situation where range stretching display behavior uses a range of pixel values. It should be understood that any feature described with respect to any embodiment can be used alone or in combination with other described features, and can also be used in combination with one or more features of any other embodiment or any combination of one or more features of any other embodiment. Furthermore, equivalents and modifications not described above may be employed without departing from the scope of this disclosure as defined by the appended claims.
Claims
1. A method for encoding video using a reduced range of pixel values, wherein, The reduction range is a subset of the complete range that can be represented by information units used for pixel values, and the method includes: A first pixel value range of the video's pixels is defined within the reduction range. For the pixels of the video, the first pixel value range is identified based on a scaling factor associated with a transformation from the reduced range of pixel values to the full range, the transformation producing a second pixel value range of the video's pixels within the full range, wherein the span of the second pixel value range is greater than the span of the first pixel value range, such that two adjacent pixel values in the first pixel value range are mapped to pixel values separated by two or more steps in the second pixel value range. Identify a first group or more blocks of image frames in the video within the reduction range, wherein pixels exceeding a predetermined threshold in the first group or more blocks have pixel values within the first pixel value range; A base compression value is determined, which is the default compression setting applied by the encoder for each block of the image frame; For each block in the first group of one or more blocks in the image frame, a reduced compression value is determined, each reduced compression value being lower than the corresponding base compression value by a predetermined compression offset, wherein the compression offset is one of a fixed reduction and a proportional reduction; and The image frame is encoded using the corresponding reduced compression values of one or more blocks in the first group and the corresponding basic compression values of all other blocks. The basic compression value and the reduced compression value are quantization parameter values.
2. The method according to claim 1, wherein, Identifying blocks in the first group of one or more blocks includes: Determine that the average pixel value of the block is within a predetermined distance from the range of the first pixel values; and The variance of the pixel values of the block is determined to be lower than a predetermined variance.
3. The method according to claim 1, wherein, Identifying blocks in the first group of one or more blocks includes: The pixel value of each pixel is compared with the pixel value of its nearest neighbor to identify a transition from one pixel value within the first pixel value range to another pixel value within the first pixel value range; and If the number of transformations identified in a block is higher than a predetermined number, then the block is determined to be identified as being in one or more blocks in the first group.
4. The method according to claim 1, wherein, The pixel value is a brightness value, the reduction range of the pixel value is the reduction range of the brightness value, and the first pixel value range defines the brightness pixel value.
5. The method according to claim 4, wherein, Each pixel value in the first pixel value range is lower than a predetermined darkness threshold of the reduced range of the brightness values.
6. The method according to claim 1, wherein, The pixel value is a chroma value, the reduction range of the pixel value is the reduction range of the chroma value, and the first pixel value range defines the chroma pixel value.
7. The method of claim 1, further comprising: The noise reduction is applied to the image frame, wherein less noise reduction is applied to the first group of one or more blocks compared to the noise reduction applied to all other blocks.
8. The method according to claim 1, wherein, Dithering is added to one or more blocks in the first group before the image frame is encoded.
9. An apparatus for encoding video using a reduced range of pixel values, wherein, The reduction range is a subset of the complete range that can be represented by information units for pixel values, and the device includes circuitry configured to perform: A limiting function is configured to limit a first range of pixel values for the video within the reduction range, wherein for the pixel of the video, the first range of pixel values is identified based on a scaling factor associated with a transformation from the reduction range of pixel values to the full range, the transformation producing a second range of pixel values for the video within the full range, wherein the span of the second range of pixel values is greater than the span of the first range of pixel values, such that two adjacent pixel values in the first range of pixel values are mapped to pixel values separated by two or more steps in the second range of pixel values; The recognition function is configured to recognize a first group of one or more blocks of image frames in the video within the reduction range, wherein pixels exceeding a predetermined threshold in the first group of one or more blocks have pixel values within the first pixel value range. A basic compression determination function is configured to determine a basic compression value, which is a default compression setting applied by the device for each block of the image frame; The reduced compression determination function is configured to determine a reduced compression value for each block in the first group of one or more blocks in the image frame, each reduced compression value being lower than the corresponding base compression value by a predetermined compression offset, wherein the compression offset is one of a fixed value reduction and a proportional reduction; and The encoding function is configured to encode the image frame using the corresponding reduced compression values of one or more blocks in the first group and the corresponding base compression values of all other blocks. The basic compression value and the reduced compression value are quantization parameter values.
10. The apparatus according to claim 9, wherein, The recognition function is further configured to recognize blocks in the first group of one or more pixel blocks if the following conditions are met: The average pixel value of the block is within a predetermined distance of the first pixel value range; and The statistical distribution of the pixel values of the block is lower than the predetermined distribution.
11. The apparatus according to claim 9, wherein, The device is a camera, and the camera further includes: An image sensor is configured to capture image frames of the video.
12. The apparatus of claim 9, further comprising circuitry configured to perform: The sending function is configured to send the encoded image frames as encoded video.
13. A system for processing video using a reduced range of pixel values, wherein, The reduction range is a subset of the complete range that can be represented by information units used for pixel values, and the system includes: A transmitting device, comprising the device according to claim 12, wherein the transmitting device is configured to transmit the encoded video over a network; A receiving device includes circuitry configured to receive the encoded video via the network and decode the encoded video into a decoded video. The display device includes circuitry configured to display the decoded video.
14. The system according to claim 13, wherein, The circuitry of the receiving device is further configured to perform a range conversion function, which is configured to convert the pixel values of the decoded video from the reduced range of pixel values to the full range.
