Encoding device and encoding method
The encoding device addresses image quality degradation in intra refresh by using visibility indices to control intra-refresh application, ensuring minimal perceptible differences between intra-encoded and other encoded blocks.
Patent Information
- Application Number
- JP2025544128
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2023-09-07
- Filing Date
- 2024-04-22
- Publication Date
- 2026-12-04
- Estimated Expiration
- 2044-04-22
AI Technical Summary
Intra refresh in video coding leads to significant image quality degradation due to forcibly intra-coding partial areas, which results in noticeable differences in block distortions between intra-encoded and other encoded blocks.
An encoding device that determines the application of intra-refresh based on indices of visibility, such as quantization parameter, skip mode selection rate, intra-mode selection rate, and frame change, to control the encoding process and suppress image quality degradation.
The solution effectively suppresses image quality degradation by selectively applying intra-refresh, reducing the visibility of differences between intra-encoded and other encoded blocks, thereby maintaining image quality.
Smart Images

Figure 0007960880000001 
Figure 0007960880000002 
Figure 0007960880000003
Abstract
Description
Technical Field
[0001] The present disclosure relates to an encoding device and an encoding method.
Background Art
[0002] Common video coding standards (e.g., H.264 (MPEG-4 AVC), H.265 (HEVC), H.266 (VVC), VP9, AV1, etc.) employ a technique that compresses data by utilizing data redundancy between frames. Therefore, data loss in a frame causes image quality degradation in other frames that directly and indirectly reference this frame. Such a chain of image quality degradation between frames is resolved by a frame that is intra-coded without using a reference frame (hereinafter referred to as an intra frame). However, in an intra frame, transmission delay increases due to an increase in data amount.
[0003] Thus, in order to limit the chain of image quality degradation with lower delay than in an intra frame, intra refresh that forcibly intra-codes a partial area in a frame has been proposed (for example, see Patent Literature 1).
Description of Related Art
Patent Literature
[0004]
Patent Literature 1
Summary of the Invention
Problem to be Solved by the Invention
[0005] However, in the intra refresh, image quality may be significantly degraded due to a partial area that is forcibly intra-coded (hereinafter referred to as an intra area).
[0006] Thus, the present disclosure provides an encoding device and the like that can suppress image quality degradation due to intra refresh. [Means for solving the problem]
[0007] An encoding device according to one aspect of the present disclosure comprises a processor and an encoder that encodes a frame to be encoded in block units, wherein the processor encodes the blocks within the frame to be encoded. Differences in block distortion Image quality difference Indicates ease of visibility The system obtains an index of visibility, determines whether to apply an intra-refresh to the frame to be encoded, which intra-encodes a portion of the frame, based on the obtained index of visibility, and controls the encoder to encode the frame to be encoded based on the result of the determination. The visibility index indicates whether, when the intra-refresh is applied to the frame to be encoded, the difference in image quality due to the difference in block distortion between blocks that are intra-encoded by the intra-refresh and blocks that are encoded by other methods within the frame to be encoded is easily visible. .
[0008] This comprehensive or specific embodiment may be implemented as a system, method, integrated circuit, computer program, or computer-readable recording medium, or as any combination of a system, device, method, integrated circuit, computer program, and recording medium. Computer-readable recording mediums include, for example, non-volatile recording media such as CD-ROMs (Compact Disc-Read Only Memory). [Effects of the Invention]
[0009] According to this disclosure, image quality degradation due to intra-refresh can be suppressed. [Brief explanation of the drawing]
[0010] [Figure 1] Figure 1 is an external view of an encoding and decoding system according to an embodiment. [Figure 2] Figure 2 is a functional configuration diagram of the encoding and decoding system according to an embodiment. [Figure 3] Figure 3 shows an example of a video sequence to illustrate intra-refresh. [Figure 4] Figure 4 is a flowchart showing the encoding method according to the embodiment. [Figure 5]Figure 5 is a flowchart showing the intraframe determination process according to the embodiment. [Figure 6] Figure 6 is a flowchart showing the intra-refresh determination process according to the embodiment. [Figure 7] Figure 7 is a flowchart showing the frame coding process according to the embodiment. [Figure 8] Figure 8 shows an example of a video sequence encoded by the encoding device according to the embodiment. [Modes for carrying out the invention]
[0011] (Summary of this disclosure) Before describing the embodiments, an overview of this disclosure will be provided. In intra-refresh, a portion of the frame is forcibly intra-encoded. Therefore, image quality degradation becomes noticeable when block distortion between intra-encoded blocks and blocks encoded by other methods is easily visible. In other words, image quality degradation due to intra-refresh becomes noticeable when the difference in image quality between blocks within a frame is easily visible.
[0012] An encoding device according to a first aspect of the present disclosure comprises a processor and an encoder that encodes a frame to be encoded in block units, wherein the processor acquires an index of the visibility of image quality differences between blocks within the frame to be encoded, determines whether or not to apply an intra refresh to the frame to be encoded based on the acquired index, and controls the encoder to encode the frame to be encoded based on the result of the determination.
[0013] According to this method, a decision is made on whether or not to apply intra-refresh to the frame to be encoded, based on an index of the visibility of image quality differences between blocks within the frame to be encoded. Therefore, the application or non-application of intra-refresh can be switched on a frame-by-frame basis depending on the visibility of image quality differences between blocks. As a result, image quality degradation due to image quality differences between areas forcibly intra-encoded by intra-refresh and other areas can be suppressed.
[0014] An encoding device according to a second aspect of the present disclosure is an encoding device according to a first aspect, wherein the processor obtains the value of the quantization parameter of the frame to be encoded as the index, determines to apply the intra refresh to the frame to be encoded if the value of the quantization parameter is less than a first threshold, and determines not to apply the intra refresh to the frame to be encoded if the value of the quantization parameter is equal to or greater than the first threshold.
[0015] According to this, the value of the quantization parameter can be used as an indicator of the visibility of image quality differences between blocks. Generally, the quantization parameter is used for bitrate control. Specifically, by increasing the value of the quantization parameter, the size of the quantization step when quantizing the prediction error signal can be increased, and the bitrate can be reduced. However, if the size of the quantization step increases, the amount of information lost from the prediction error signal due to quantization (quantization distortion) increases, making the visibility of image quality differences between intra-encoded blocks and inter-encoded blocks higher. Therefore, by determining whether to apply intra-refresh to the frame to be encoded when the value of the quantization parameter is above the first threshold, intra-refresh can be withheld when the visibility of image quality differences between blocks is high. As a result, the increased visibility of image quality differences between regions forcibly intra-encoded by intra-refresh and other regions can be suppressed, thereby suppressing image quality degradation due to intra-refresh.
[0016] An encoding device according to a third aspect of the present disclosure is the encoding device according to the first aspect, wherein the processor acquires, as the index, a skip mode selection rate value in a frame preceding the encoding target frame, determines not to apply the intra refresh to the encoding target frame when the skip mode selection rate value is equal to or greater than a second threshold, and determines to apply the intra refresh to the encoding target frame when the skip mode selection rate value is less than the second threshold.
[0017] Accordingly, the skip mode selection rate value can be used as an index of visibility of image quality differences between blocks. Generally, in skip mode, encoding of a prediction error signal is omitted, so the bit rate can be reduced, but distortion tends to increase. Therefore, when a low bit rate is required, the skip mode selection rate value increases, and visibility of image quality differences between intra-coded blocks and other blocks (including blocks coded in skip mode) increases. Thus, by determining not to apply intra refresh to the encoding target frame when the skip mode selection rate value is equal to or greater than the second threshold, intra refresh can be disabled when visibility of image quality differences between blocks is high. As a result, it is possible to suppress increased visibility of image quality differences between regions forcibly intra-coded by intra refresh and other regions, and to suppress image quality degradation caused by intra refresh.
[0018] An encoding device according to a fourth aspect of the present disclosure is the encoding device according to the first aspect, wherein the processor acquires, as the index, an intra mode selection rate value in a frame preceding the encoding target frame, determines to apply the intra refresh to the encoding target frame when the intra mode selection rate value is equal to or greater than a third threshold, and determines not to apply the intra refresh to the encoding target frame when the intra mode selection rate value is less than the third threshold.
[0019] According to this, the value of the intra-mode selectivity can be used as an indicator of the visibility of image quality differences between blocks. If the value of the intra-mode selectivity increases, the number of blocks that are intra-encoded increases, and the visibility of image quality differences between blocks that are forcibly intra-encoded by intra-refresh and other blocks decreases. Conversely, if the value of the intra-mode selectivity decreases, the visibility of image quality differences between blocks that are forcibly intra-encoded by intra-refresh and other blocks increases. Therefore, by determining not to apply intra-refresh to the frame to be encoded when the value of the intra-mode selectivity is below the third threshold, intra-refresh can be withheld when the visibility of image quality differences between blocks is high. As a result, the increased visibility of image quality differences between regions that are forcibly intra-encoded by intra-refresh and other regions can be suppressed, and image quality degradation due to intra-refresh can be suppressed.
[0020] An encoding device according to a fifth aspect of this disclosure is an encoding device according to a first aspect, wherein the processor obtains the value of the change between the frame to be encoded and the frame preceding the frame to be encoded as the index, determines to apply the intra refresh to the frame to be encoded if the value of the change is greater than or equal to a fourth threshold, and determines not to apply the intra refresh to the frame to be encoded if the value of the change is less than the fourth threshold.
[0021] According to this, the value of the amount of change between frames can be used as an indicator of the visibility of the image quality difference between blocks. When the value of the amount of change between frames is large, the prediction accuracy of interpretation decreases, the difference between the prediction error of intrapretation and interpretation decreases, and the visibility of the image quality difference between blocks due to intrarefresh decreases. Conversely, when the value of the amount of change between frames is small, the prediction accuracy of interpretation improves, the difference between the prediction error of intrapretation and interpretation increases, and the visibility of the image quality difference between blocks due to intrarefresh increases. Therefore, by determining not to apply intrarefresh to the frame to be encoded when the value of the amount of change is less than the fourth threshold, intrarefresh can be withheld when the visibility of the image quality difference between blocks is high. As a result, it is possible to suppress the increased visibility of the image quality difference between the region forcibly intra-encoded by intrarefresh and other regions, thereby suppressing image quality degradation due to intrarefresh.
[0022] An encoding device according to the sixth aspect of this disclosure is an encoding device according to any one of the first to fifth aspects, wherein the processor determines whether or not to apply an intra-refresh in periodic units for an intra-refresh including the frame to be encoded.
[0023] According to this, the decision of whether or not to apply intra-refresh is made on a periodic basis, thus reducing the load on the intra-refresh determination process.
[0024] The encoding device according to the seventh aspect of this disclosure is the encoding device according to the sixth aspect, wherein the frame to be encoded is the first frame of the period for the intra-refresh.
[0025] According to this, it is possible to determine whether or not to apply an intra-refresh cycle at the first frame of the cycle, making the intra-refresh determination process simpler.
[0026] An encoding device according to the eighth aspect of this disclosure is an encoding device according to any one of the first to seventh aspects, the encoding device further includes a communication interface for transmitting a plurality of encoded frames, including the encoded target frame, in packet communication, and the processor further determines whether the recovery waiting time is longer than a predetermined time when a recovery waiting occurs in the target frame due to packet loss in the communication of a frame prior to the target frame, and in response to the determination that the waiting time is longer than the predetermined time, sets the target frame to an intra frame.
[0027] According to this, an intra-frame is inserted when the recovery waiting time is long. Therefore, it is possible to suppress the continued degradation of image quality due to packet loss over a long period of time.
[0028] An encoding method according to a ninth aspect of this disclosure is an encoding method for encoding a frame to be encoded in block units, wherein an index of the visibility of the image quality difference between blocks within the frame to be encoded is obtained, a determination is made based on the obtained index of whether or not to apply an intra refresh to the frame to be encoded, and the frame to be encoded is encoded based on the result of the determination.
[0029] According to this, the same effects as those of the above-mentioned encoding device can be achieved through the encoding method.
[0030] The program relating to the tenth aspect of this disclosure causes a computer to execute the encoding method relating to the ninth aspect.
[0031] According to this, the same effects as those of the above-mentioned encoding device can be achieved through programming.
[0032] (Embodiment) The embodiments will be described in detail below with reference to the drawings.
[0033] The embodiments described below are all general or specific examples. The numerical values, shapes, materials, components, arrangement and connection configurations of components, steps, and the order of steps shown in the following embodiments are examples only and are not intended to limit the technology of this disclosure.
[0034] Furthermore, each figure is a schematic diagram and not necessarily a strictly accurate representation. Therefore, for example, the scale may not necessarily match in each figure. Also, in each figure, substantially identical components are given the same reference numerals, and redundant explanations may be omitted or simplified.
[0035] In the following, all or part of a circuit, unit, or device, or all or part of a functional block in a block diagram, may be implemented by one or more electronic circuits, including, for example, a semiconductor device, a semiconductor integrated circuit (IC), or an LSI (large-scale integration). An LSI or IC may be integrated on a single chip or may be composed of multiple chips. For example, functional blocks other than memory elements may be integrated on a single chip. Here, we refer to them as LSIs or ICs, but the name may change depending on the degree of integration, and they may also be called system LSIs, VLSIs (very large-scale integrations), or ULSIs (ultra-large-scale integrations). FPGAs (Field Programmable Gate Arrays), which are programmed after the manufacture of the LSI, or RLDs (reconfigurable logic devices) that can reconfigure the junction relationships inside the LSI or set up the circuit compartments inside the LSI, can also be used for the same purpose.
[0036] Furthermore, all or part of a circuit, unit, or device, or all or part of a functional block in a block diagram, may also be implemented by a software program. In this case, the software program is recorded on one or more non-temporary storage media such as ROM, optical disk, or hard disk drive, and when the software program is executed by the processor, the functions specified by the software program are executed by the processor and peripheral devices. The system or device may include one or more non-temporary storage media containing the software program, a processor, and necessary hardware devices (e.g., memory, interfaces, etc.).
[0037] [Configuration of the encoding / decoding system 1000] First, the configuration of the encoding / decoding system 1000 according to this embodiment will be described in detail with reference to Figures 1 and 2. Figure 1 is an external view of the encoding / decoding system 1000 according to this embodiment. Figure 2 is a functional configuration diagram of the encoding / decoding system 1000 according to this embodiment. Note that Figures 1 and 2 show exemplary configurations of the encoding / decoding system 1000, and the configuration of the encoding / decoding system 1000 is not limited to the following description.
[0038] The encoding and decoding system 1000 comprises an encoding device 100 and a decoding device 200 that are wirelessly connected to each other. However, the connection between the encoding device 100 and the decoding device 200 is not limited to wireless connection. For example, the encoding device 100 may be connected to the decoding device 200 via a wired connection, either in addition to or instead of wireless connection.
[0039] The encoding device 100 is, for example, an HDMI® (High-Definition Multimedia Interface) sink device, and can encode video data received from an HDMI source device and transmit it to the decoding device 200. The encoding device 100 is not limited to an HDMI sink device. For example, the encoding device 100 may be a set-top box, a TV tuner, or a digital video camera.
[0040] The decoding device 200 is, for example, a liquid crystal display or an organic EL display, and can decode and display the encoded video data received from the encoding device 100. The decoding device 200 may also be a portable device (e.g., a tablet computer or smartphone) or a wearable device (e.g., a smartwatch or smart glasses). In this case, the decoded video data may be displayed on the display panel of the portable device or wearable device.
[0041] [Internal configuration of encoding device 100] Next, the internal configuration of the encoding device 100 will be described. The encoding device 100 includes an HDMI interface 110, an encoder 120, a communication interface 130, a processor 140, and memory 150.
[0042] The HDMI interface 110 is an interface for receiving video data. Video data contains multiple frames. For example, the HDMI interface 110 can receive HDMI video data from an HDMI source device via an HDMI cable. Note that the HDMI interface 110 does not necessarily have to be included in the encoding device 100.
[0043] The encoder 120 can encode video data received by the HDMI interface 110. Specifically, the encoder 120 can encode frames to be encoded in the video data in block units. The encoder 120 can use intra-refresh when encoding frames to be encoded. Intra-refresh is a technique that forcibly intra-encodes a portion of a frame (intra-region) and periodically changes the position of the intra-region across multiple frames, thereby limiting the chain reaction of image quality degradation with low latency.
[0044] A block is a region obtained by dividing a frame to be encoded. Depending on the video encoding standard, blocks may also be called macroblocks, coding units (CUs), or prediction units (PUs).
[0045] The communication interface 130 is an interface for wireless communication with the decoding device 200. For example, the communication interface 130 can packetize the video data encoded by the encoder 120 and transmit the resulting communication data to the decoding device 200. The communication interface 130 may also be an interface for wired communication with the decoding device 200 and may not be included in the encoding device 100.
[0046] The processor 140 is a circuit that performs information processing and is a circuit that can access the memory 150. The processor 140 can control the encoder 120 and may also control the HDMI interface 110 and / or the communication interface 130. The processor 140 can perform various control and information processing by executing a software program stored in the memory 150.
[0047] Specifically, the processor 140 can obtain an index of the visibility of image quality differences between blocks within the frame to be encoded. In this embodiment, the index of the visibility of image quality differences between blocks within the frame to be encoded is the quantization parameter of the frame to be encoded.
[0048] Quantization parameters control the size of the quantization steps when quantizing a prediction error signal. Increasing the value of the quantization parameter increases the size of the quantization steps, which can reduce the bitrate, but it also increases the amount of information lost from the prediction error signal being quantized (quantization distortion). Because intra-coding and inter-coding use different methods for generating the prediction error signal, an increase in quantization distortion makes the difference in image quality between intra-coded and inter-coded blocks more noticeable. In other words, increasing the value of the quantization parameter increases the size of the quantization steps, making the difference in image quality between blocks due to intra-refresh more noticeable. Conversely, decreasing the value of the quantization parameter decreases the size of the quantization steps, making the difference in image quality between blocks due to intra-refresh less noticeable.
[0049] Note that the quantization parameters of the frame to be encoded refer to the quantization parameters determined for the frame to be encoded. The quantization parameters of the frame to be encoded may be adjustable at the slice, tile, block, or transformation coefficient level within a block within the frame to be encoded.
[0050] Next, the processor 140 can determine whether or not to apply an intra-refresh to the frame to be encoded based on the acquired indicators. For example, the processor 140 may compare the value of the quantization parameter with a first threshold and determine whether or not to apply an intra-refresh to the frame to be encoded based on the comparison result.
[0051] Specifically, the processor 140 may determine whether to apply an intra-refresh to the frame to be encoded if the value of the quantization parameter is less than the first threshold. This allows the processor 140 to determine whether to apply an intra-refresh to the frame to be encoded when the visibility of the image quality difference between blocks is relatively low. Conversely, the processor 140 may determine whether to not apply an intra-refresh to the frame to be encoded if the value of the quantization parameter is greater than or equal to the first threshold. This allows the processor 140 to determine whether to apply an intra-refresh to the frame to be encoded when the visibility of the image quality difference between blocks is relatively high.
[0052] As the first threshold, a value of the quantization parameter can be used that indicates that the visibility of the image quality difference between blocks is low enough to apply intra-refresh. The first threshold may be predetermined experimentally and / or empirically and stored in memory 150. The first threshold may also be fixed or variable depending on the encoding parameters. For example, the first threshold may change depending on the resolution of the frame to be encoded. Since the visibility of the image quality difference between blocks decreases as the resolution increases, the first threshold may be larger as the resolution increases. For example, "34" may be used as the first threshold for 4K resolution and "20" for 2K resolution.
[0053] Finally, the processor 140 can control the encoder 120 to encode the frame to be encoded based on the result of the determination of whether or not to apply an intra refresh to the frame to be encoded.
[0054] Memory 150 can store information for the processor 140 to control the encoder 120. Memory 150 may be an electronic circuit or a collection of multiple electronic circuits. Memory 150 may be either non-volatile memory or volatile memory, or a combination of non-volatile and volatile memory. Memory 150 may also be included in the processor 140.
[0055] [Internal configuration of the decoding device 200] Next, the internal configuration of the decoding device 200 will be described. The decoding device 200 includes a communication interface 210, a decoder 220, a display panel 230, a processor 240, and memory 250.
[0056] The communication interface 210 is an interface for wireless communication with the encoding device 100. For example, the communication interface 210 can receive communication data transmitted by the encoding device 100 and output encoded video data obtained by inverse packetization to the decoder 220. Note that the communication interface 210 may also be an interface for wired communication with the encoding device 100 and may not be included in the decoder 200.
[0057] The decoder 220 can decode encoded video data. Specifically, the decoder 220 can decode the frames to be decoded contained in the encoded video data in block units.
[0058] The display panel 230 can display the video data decoded by the decoder 220. The display panel 230 may be a liquid crystal display panel or an organic EL display panel, but is not limited to these. The display panel 230 does not necessarily have to be included in the decoder 200.
[0059] The processor 240 is a circuit that performs information processing and is a circuit that can access the memory 250. The processor 240 can control the decoder 220 and may also control the communication interface 210 and / or the display panel 230.
[0060] Memory 250 can store information for the processor 240 to control the decoder 220. Memory 250 may be an electronic circuit or a collection of multiple electronic circuits. Memory 250 may be either non-volatile memory or volatile memory, or a combination of non-volatile and volatile memory. Memory 250 may also be included in the processor 240.
[0061] [IntraRefresh] Next, we will explain intra-refresh with reference to Figure 3. Figure 3 is a diagram showing an example of a video sequence to illustrate intra-refresh. In the following, frames to which intra-refresh is applied will be called IR frames, and frames to which intra-refresh is not applied will be called non-IR frames.
[0062] Here, the period refers to the period for intra-refresh. Specifically, the period means the repetition period of the sequence of IR frames, or the repetition period of the sequence of IR frames and non-IR frames. In Figure 3, the length of each period is 10 frames. That is, if the frame rate is 60 Hz, one period is 1 / 6 of a second. Note that the length of the period may be fixed or variable.
[0063] Figure 3 shows Period 1 and Period 2 included in the video sequence. Period 1 is the period during which intra-refresh is applied (hereinafter referred to as the IR period), and includes IR frames 10-14 and non-IR frames 15-19 in a predetermined order. Period 2 is the period during which intra-refresh is not applied (hereinafter referred to as the non-IR period), and includes non-IR frames 20-29 but does not include IR frames.
[0064] IR frames 10-14 contain intra-regions (hatched regions in Figure 3) at different locations. An intra-region is a set of blocks that are forcibly intra-encoded, and in Figure 3, it consists of one or more block lines. By distributing intra-regions across multiple frames and placing them at different locations, it is possible to suppress the concentration of code in any one frame, and even if image data in any region is lost due to packet loss, a starting point for decoding (recovery point) can be established. Regions other than intra-regions (non-hatched regions in Figure 3) are a set of blocks that can be selected for intra-encoded or inter-encoded.
[0065] Note that the shape and arrangement of the intra region are not limited to those shown in Figure 3. It is sufficient that each block at a given position within the frame is included in the intra region at least once in any frame within one cycle. For example, the intra region may be one or more rows of blocks extending vertically.
[0066] Non-IR frames 15-29 include regions where intra-encoding and inter-encoding can be selected, but do not include intra-encoded regions.
[0067] Note that the configuration of the IR period is not limited to the configuration shown in Figure 3. For example, the length of the period may be 60 frames. In this case, if the frame rate is 60 Hz, one period will be 1 second. Also, for example, the ratio of the number of IR frames to non-IR frames included in the IR period is not limited to 1:1. For example, the IR period may contain only IR frames. In other words, the IR period may not contain any non-IR frames. Also, for example, the IR period may not contain multiple IR frames consecutively. In other words, the IR period may contain multiple IR frames discretely. Also, for example, the first frame of the IR period may be a non-IR frame instead of an IR frame.
[0068] [Encoding method] Next, the encoding method performed by the encoding device 100 will be described with reference to Figures 4 to 8. Figure 4 is a flowchart of the encoding method according to this embodiment. Note that Figure 4 is an illustrative flowchart of the encoding method, and the steps of the encoding method and the order of the steps are not limited to the following description.
[0069] The processor 140 obtains the quantization parameters for the current frame (S100). For example, the processor 140 determines the quantization parameters for the current frame based on a pre-set target code amount (target bitrate). In other words, the processor 140 determines the quantization parameters so that the target bitrate is satisfied. The current frame is the frame to be encoded, and is sometimes called the encoded picture or current picture.
[0070] The processor 140 determines whether or not to set the current frame as an intraframe (S200). Details of step S200 will be described later with reference to Figure 5. Note that step S200 is an optional step and may not be included in the encoding method according to this embodiment.
[0071] The processor 140 determines whether or not to apply an intra-refresh (IR) to the current frame based on the quantization parameters (S300). In other words, the processor 140 determines whether or not to set the current frame as an IR frame based on the quantization parameters. Details of step S300 will be described later with reference to Figure 6.
[0072] The encoder 120 encodes the current frame based on the result of the determination (S400). In other words, the processor 140 controls the encoder 120 to encode the current frame based on the result of the determination. Details of step S400 will be described later with reference to Figure 7.
[0073] [Details of Intraframe Detection Process] Here, the details of the intra-frame determination process (step S200 in Figure 4) will be explained with reference to Figure 5. Figure 5 is a flowchart of the intra-frame determination process according to this embodiment. Note that Figure 5 shows an exemplary flowchart of the intra-frame determination process, and the intra-frame determination process is not limited to the following description.
[0074] The processor 140 determines whether or not a packet loss notification has been received from the communication interface 130 (S202). A packet loss notification is a notification indicating that packet loss occurred in the communication of a frame prior to the current frame. When the communication interface 130 detects that the packet loss rate exceeds a certain value, it notifies the processor 140 of the packet loss along with the packet loss rate. The packet loss rate is the ratio of the number of packets that the communication interface 210 did not receive to the number of packets transmitted by the communication interface 130. The packet loss notification is based on the packet loss rate in the communication of multiple packets that make up a frame prior to the current frame.
[0075] If a packet loss notification is received (Yes in S202), processor 140 sets the current period, which includes the current frame, to a non-IR period (S204). In other words, processor 140 sets the current period to the intra-refresh off period. Note that it is also possible to switch from an IR period to a non-IR period in the middle of a period.
[0076] The processor 140 determines whether the current state is a recovery waiting state (S206). A recovery waiting state means that a packet loss has occurred and the recovery of that packet loss has not yet been completed. Note that the initial state at the start of a sequence of multiple frames, including the current frame, is set to a non-recovery waiting state.
[0077] If the current state is not in the recovery waiting state (No. in S206), the processor 140 sets the current state to the recovery waiting state (S210) and determines whether the packet loss notification is serious or not (S212). Whether the packet loss notification is serious or not can be determined by whether the packet loss notification meets the serious conditions. For example, the serious conditions may include packet loss occurring for a number of consecutive frames greater than a threshold, and / or the packet loss rate being greater than or equal to a threshold. However, the serious conditions are not limited to these.
[0078] If the packet loss notification is not severe (No. in S212), the processor 140 determines whether the recovery waiting time is longer than a predetermined time (S214). The recovery waiting time refers to the time during which the recovery waiting state continues. A predetermined time can be set, for example, 20 seconds.
[0079] If the recovery waiting time is not longer than a predetermined time (No. in S214), the processor 140 determines whether or not there is a scene change in the current frame (S216). The determination of whether or not there is a scene change is made by determining whether or not the difference between the feature quantities of the previous frame and the feature quantities of the current frame is greater than or equal to a threshold. As feature quantities, for example, representative values of the pixel sample values (luminance values and / or chrominance values) (e.g., arithmetic mean or median), or the sum of the absolute differences in sample values between adjacent pixels can be used. In addition, in the above determination, the results of motion estimation and / or the sum of prediction errors may be used instead of feature quantities.
[0080] If there is no scene change in the current frame (No. in S216), the processor 140 terminates the intra-frame determination process. In other words, the processor 140 skips step S208 and does not set the current frame as an intra-frame.
[0081] If the current state is in a recovery waiting state (Yes in S206), if the content of the packet loss notification is serious (Yes in S212), if the recovery waiting time is longer than a predetermined time (Yes in S214), or if there is a scene change in the current frame (Yes in S216), the processor 140 sets the current frame as an intra frame (S208) and terminates the intra frame determination process. In step S208, the processor 140 sets the current frame as an intra frame, but it may also set a frame later than the current frame as an intra frame. For example, if the current frame is not the first frame of the current cycle, the processor 140 may set the first frame of the next cycle as an intra frame.
[0082] If there is no packet loss notification (No in S202), the processor 140 determines whether the current state is a recovery waiting state (S218). If the current state is not a recovery waiting state (No in S218), the processor 140 terminates the intra-frame determination process. In other words, the processor 140 skips step S208 and does not set the current frame as an intra-frame. If the current state is a recovery waiting state (Yes in S218), the processor 140 executes the process in step S214.
[0083] [Details of the Intra Refresh Determination Process] Next, the details of the intra-refresh determination process (step S300 in Figure 4) will be explained with reference to Figure 6. Figure 6 is a flowchart of the intra-refresh determination process according to this embodiment. Note that Figure 6 shows an exemplary flowchart of the intra-refresh determination process, and the intra-refresh determination process is not limited to the following description.
[0084] The processor 140 determines whether the current frame is set to an intraframe (S302). If the current frame is set to an intraframe (Yes in S302), the intra-refresh determination process is terminated.
[0085] If the current frame is not set as an intraframe (No in S302), the processor 140 determines whether the current frame is the first frame of the period (S304). If the current frame is the first frame of the period (Yes in S304), the processor 140 determines whether the value of the quantization parameter of the current frame is less than the first threshold (S306).
[0086] If the value of the quantization parameter of the current frame is less than the first threshold (Yes in S306), the processor 140 sets the current period to the IR period (S308). When the value of the quantization parameter is a small value less than the first threshold, the difference in image quality between the intra-encoded block and the inter-encoded block is not easily visible. In other words, even if intra-refresh is applied, the difference in image quality between the intra-region and other regions is not easily visible. Therefore, when the value of the quantization parameter is less than the first threshold, the processor 140 can apply intra-refresh while suppressing image quality degradation by setting the current period to the IR period. The processor 140 sets the current frame to the IR frame (S310) and terminates the intra-refresh determination process.
[0087] If the value of the quantization parameter of the current frame is not less than the first threshold (No. in S306), the processor 140 sets the current period to a non-IR period (S312). When the value of the quantization parameter is a large value greater than or equal to the first threshold, the difference in image quality between the intra-encoded block and the inter-encoded block is easily visible. In other words, if intra-refresh is applied, the difference in image quality between the intra-region and other regions is easily visible. Therefore, the processor 140 can suppress image quality degradation due to intra-refresh by not setting the current period to an IR period when the value of the quantization parameter is greater than or equal to the first threshold. The processor 140 sets the current frame to a non-IR frame (S314) and terminates the intra-refresh determination process.
[0088] As described above, the processor 140 can determine whether or not to apply an intra refresh on a periodic basis using the first frame of the period.
[0089] If the current frame is not the first frame of the cycle (No in S304), the processor 140 determines whether the current cycle is set to the IR cycle (S316). If the current cycle is set to the IR cycle (Yes in S316), the processor 140 determines whether the current frame is a frame that can be set as an IR frame within the IR cycle (S318). In other words, the processor 140 determines whether the order of the current frame within the IR cycle (for example, display order or encoding order) satisfies predetermined conditions. For example, in the example in Figure 3, the processor 140 determines whether the display order of the current frame within the IR cycle falls within the range of 1 to 5 (frames 10 to 14). If the current frame is a frame that can be set as an IR frame within the IR cycle (Yes in S318), the processor 140 sets the current frame as an IR frame (S320) and terminates the intra refresh determination process.
[0090] If the current period is not set to the IR period (No. in S316), or if the current frame is not a frame that can be set as an IR frame within the IR period (No. in S318), the processor 140 sets the current frame to a non-IR frame (S322) and terminates the intra refresh determination process.
[0091] [Details of frame coding process] Next, the details of the frame coding process (step S400 in Figure 4) will be explained with reference to Figure 7. Figure 7 is a flowchart of the frame coding process according to this embodiment. Note that Figure 7 shows an exemplary flowchart of the frame coding process, and the frame coding process is not limited to the following description.
[0092] The processor 140 determines whether the current frame is set as an intraframe (S402). If the current frame is set as an intraframe (Yes in S402), the processor 140 instructs the encoder 120 to perform intraframe encoding on the current frame (S404). Furthermore, the processor 140 sets the current state to a non-recovery waiting state (S406) and terminates the frame encoding process.
[0093] If the current frame is not set as an intra frame (No in S402), the processor 140 determines whether the current frame is set as an IR frame (S408). If the current frame is set as an IR frame (Yes in S408), the processor 140 has the encoder 120 IR encode the current frame (S410). In other words, the encoder 120 intra encodes a portion of the current frame based on the order within the IR period of the current frame. After that, the processor 140 sets the current state to a non-recovery waiting state (S406) and terminates the frame encoding process.
[0094] If the current frame is not set as an IR frame (No. in S408), the processor 140 instructs the encoder 120 to non-IR encode the current frame (S412), and terminates the frame encoding process. In other words, the encoder 120 does not IR encode the current frame.
[0095] [Specific examples of encoding] A specific example of a video sequence encoded by the encoding method described above will be explained with reference to Figure 8. Figure 8 is a diagram showing an example of a video sequence encoded by the encoding device 100 according to the embodiment.
[0096] In frame 10, there is no packet loss notification, and since frame 10 is the first frame of period 1, it is determined whether the value of the quantization parameter of frame 10 is less than the first threshold. Here, the value of the quantization parameter of frame 10 is less than the first threshold, so period 1 is set to the IR period, and frame 10 is set to the IR frame. As a result, frame 10 is IR encoded.
[0097] There are no packet loss notifications for frames 11-17, and the current state is a non-recovery waiting state. Furthermore, period 1 is set to the IR period. Therefore, depending on the order of each frame within period 1, frames 11-14 are set to IR frames, and frames 15-17 are set to non-IR frames. As a result, frames 11-14 are IR encoded, and frames 15-17 are non-IR encoded.
[0098] In frame 18, there is a packet loss notification, so period 1 is changed to a non-IR period. Furthermore, the current state changes from a non-recovery waiting state to a recovery waiting state. Here, the packet loss notification is not severe, the recovery waiting time is shorter than the predetermined time, and there is no scene change. Therefore, frame 18 is not set as an intra-frame and is not intra-encoded. Furthermore, since frame 18 is included in a non-IR period, it is not set as an IR frame and is not IR-encoded.
[0099] In frame 19, there is no packet loss notification, and the current state is a recovery waiting state. Furthermore, the recovery waiting time is shorter than the predetermined time, and there is no scene change. Therefore, frame 19 is not set as an intra-frame and is not intra-encoded.
[0100] Since the quantization parameter value of frame 20, the first frame of period 2, is greater than or equal to the first threshold, period 2 is set to a non-IR period. In frames 20-23, which are included in period 2 set to a non-IR period, there are no packet loss notifications, and the current state is a recovery waiting state. Furthermore, the recovery waiting time is shorter than the predetermined time, and there is no scene change. Therefore, frames 20-23 are not set as IR frames and are not IR encoded. As a result, the recovery waiting state is maintained.
[0101] In frame 24, there is no packet loss notification, and the current state is in a recovery waiting state. Furthermore, although the recovery waiting time is shorter than the predetermined time, the scene has changed from the first scene to the second scene. Therefore, frame 24 is set as an intra-frame and intra-encoded. As a result, the current state changes from a recovery waiting state to a non-recovery waiting state.
[0102] Frames 25-29 do not have packet loss notifications, and the current state is a non-recovery waiting state. Furthermore, period 2 is set to a non-IR period. Therefore, frames 25-29 are set to non-IR frames and are non-IR encoded.
[0103] (modified version) Although the encoding device and encoding method have been described above based on embodiments, the encoding device and encoding method relating to this disclosure are not limited to the above embodiments. Other embodiments realized by combining any of the components in the above embodiments, and modified examples obtained by applying various modifications to the above embodiments that a person skilled in the art could conceive of without departing from the spirit of this disclosure are also included in this disclosure.
[0104] For example, in the above embodiment, the value of the quantization parameter was used as an indicator of the visibility of the image quality difference between blocks in the frame to be encoded, but this is not limited to this. For example, the value of the skip mode selectivity in the frame preceding the frame to be encoded may be used as an indicator of the image quality difference between blocks. The value of the skip mode selectivity is the ratio of the number of blocks to which skip mode is applied to the total number of blocks in the frame preceding the frame to be encoded. If the value of this skip mode selectivity increases, the number of skip mode blocks increases, and the visibility of the image quality difference between blocks increases. Conversely, if the value of the skip mode selectivity decreases, the number of skip mode blocks decreases, and the visibility of the image quality difference between blocks decreases. Therefore, the processor 140 may determine not to apply intra refresh to the frame to be encoded if the value of the skip mode selectivity is equal to or greater than the second threshold, and may determine to apply intra refresh to the frame to be encoded if the value of the skip mode selectivity is less than the second threshold. In other words, step S306 in Figure 6 may be replaced with a step in which it is determined whether or not the value of the skip mode selectivity is less than the second threshold.
[0105] As the second threshold, a value of the skip mode selectivity indicating that the visibility of the image quality difference between blocks is low enough to apply intra-refresh can be used. The second threshold may be predetermined experimentally and / or empirically and stored in memory 150. Alternatively, the second threshold may be determined adaptively depending on the encoding parameters, and the determined second threshold may be encoded in the header.
[0106] Alternatively, for example, the value of the intra-mode selectivity in the frame preceding the frame to be encoded may be used as an indicator of the difference in image quality between blocks. The value of the intra-mode selectivity is the ratio of the number of blocks to which intra-mode is applied to the total number of blocks in the frame preceding the frame to be encoded. If this value of intra-mode selectivity increases, there will be more intra-mode blocks, and the visibility of the difference in image quality between blocks due to intra-refresh will decrease. Conversely, if the value of intra-mode selectivity decreases, there will be fewer intra-mode blocks, and the visibility of the difference in image quality between blocks due to intra-refresh will increase. Therefore, the processor 140 may decide not to apply intra-refresh to the frame to be encoded if the value of the intra-mode selectivity is less than the third threshold, and decide to apply intra-refresh to the frame to be encoded if the value of the intra-mode selectivity is equal to or greater than the third threshold. In other words, step S306 in Figure 6 may be replaced with a step in which it is determined whether or not the value of the intra-mode selectivity is equal to or greater than the third threshold.
[0107] As the third threshold, a value of the intra-mode selectivity indicating that the visibility of the image quality difference between blocks is low enough to warrant applying intra-refresh can be used. The third threshold may be predetermined experimentally and / or empirically and stored in memory 150. Alternatively, the third threshold may be determined adaptively depending on the encoding parameters, and the determined third threshold may be encoded in the header.
[0108] Alternatively, for example, the value of the change between the frame to be encoded and the frame before it may be used as an indicator of the difference in image quality between blocks. The value of the change is a value that indicates the amount of change in the frame to be encoded compared to the frame before it. The value of the change may be the sum of the magnitudes of the motion vectors of each block in the frame to be encoded compared to the frame before it. Alternatively, the value of the change may be the ratio of the number of blocks with motion vectors greater than or equal to a threshold to the total number of blocks in the frame to be encoded. In these cases, the value of the change will be large when the movement between frames is large, and small when the movement between frames is small. Alternatively, the value of the change may be the sum of the absolute values of the differences between each pixel value in the frame to be encoded and the corresponding pixel value in the frame before it. In this case, the value of the change will be large when the change in the image between frames is large, and small when the change in the image between frames is small. When the value of the change between frames is large, it becomes difficult for the human eye to perceive the details of the screen, and the visibility of the difference in image quality between blocks due to intra-refresh decreases. Conversely, when the value of the change between frames is small, the human eye can more easily perceive details on the screen, and the visibility of the image quality difference between blocks due to intra-refresh increases. Therefore, the processor 140 may decide not to apply intra-refresh to the frame to be encoded if the value of the change is less than the fourth threshold, and decide to apply intra-refresh to the frame to be encoded if the value of the change is equal to or greater than the fourth threshold. In other words, step S306 in Figure 6 may be replaced with a step in which it is determined whether or not the value of the change is equal to or greater than the fourth threshold.
[0109] The fourth threshold can be a value of change indicating that the visibility of the image quality difference between blocks is low enough to warrant applying an intra-refresh. The fourth threshold may be predetermined experimentally and / or empirically and stored in memory 150. Alternatively, the fourth threshold may be determined adaptively depending on the encoding parameters, and the determined fourth threshold may be encoded in the header.
[0110] In the above embodiment, the encoded frame for which it is determined whether or not to apply an intra-refresh based on an index of the visibility of the image quality difference between blocks was the first frame of the period for intra-refresh, but this is not limited to that. For example, if the first frame of the period is a non-IR frame, the determination may be made on the frame in the period that corresponds to the first IR frame, instead of the first frame. [Industrial applicability]
[0111] This disclosure can be used, for example, in television receivers, digital video recorders, car navigation systems, mobile phones, digital cameras, or digital video cameras. [Explanation of symbols]
[0112] 100 Encoding device 110 HDMI Interface 120 encoder 130, 210 communication interfaces 140, 240 processors 150, 250 memory 200 Decoders 220 Decoders 1000 Encoding and Decoding Systems
Claims
1. Processor and It comprises an encoder that encodes the frame to be encoded in block units, The aforementioned processor, An index of visibility is obtained that indicates how easily differences in image quality due to differences in block distortion between blocks within the aforementioned encoded frame can be perceived. Based on the acquired visibility index, a determination is made as to whether or not to apply an intra-refresh to the frame to be encoded, which intra-encodes a portion of the area within the frame. The encoder is controlled to encode the frame to be encoded based on the result of the determination. The visibility index is an index that indicates whether the difference in image quality due to the difference in block distortion between blocks that are intra-encoded by the intra-refresh and blocks that are encoded by other methods is easily visible when the intra-refresh is applied to the frame to be encoded. Encoding device.
2. The aforementioned processor, The values of the quantization parameters of the frame to be encoded are obtained as the indicator of visibility. If the value of the quantization parameter is less than a first threshold, it is determined to apply the intra refresh to the frame to be encoded; if the value of the quantization parameter is equal to or greater than the first threshold, it is determined not to apply the intra refresh to the frame to be encoded. The encoding device according to claim 1.
3. The aforementioned processor, The value of the skip mode selection rate in the frame preceding the frame to be encoded is obtained as the visibility index. If the value of the skip mode selectivity is equal to or greater than the second threshold, it is determined that the intra refresh should not be applied to the frame to be encoded, and if the value of the skip mode selectivity is less than the second threshold, it is determined that the intra refresh should be applied to the frame to be encoded. The encoding device according to claim 1.
4. The aforementioned processor, The value of the intra-mode selectivity in the frame preceding the frame to be encoded is obtained as the visibility index. If the value of the intra-mode selectivity is equal to or greater than the third threshold, it is determined that the intra-refresh should be applied to the frame to be encoded; if the value of the intra-mode selectivity is less than the third threshold, it is determined that the intra-refresh should not be applied to the frame to be encoded. The encoding device according to claim 1.
5. The aforementioned processor, The value of the change between the frame to be encoded and the frame preceding the frame to be encoded is obtained as the visibility index. If the value of the change amount is greater than or equal to the fourth threshold, it is determined to apply the intra refresh to the frame to be encoded; if the value of the change amount is less than the fourth threshold, it is determined not to apply the intra refresh to the frame to be encoded. The encoding device according to claim 1.
6. The processor determines whether or not to apply an intra-refresh in periodic units for an intra-refresh that includes the frame to be encoded. The encoding device according to any one of claims 1 to 5.
7. The frame to be encoded is the first frame of the period for the intra refresh. The encoding device according to claim 6.
8. The encoding device further includes a communication interface for transmitting a plurality of encoded frames, including the encoded target frame, via packet communication. The aforementioned processor further, If a recovery wait occurs in the frame to be encoded due to packet loss in the communication of a frame preceding the frame to be encoded, it is determined whether the recovery wait time is longer than a predetermined time. In response to the determination that the waiting time is longer than the predetermined time, the frame to be encoded is set as an intra frame. The encoding device according to any one of claims 1 to 5.
9. An encoding method that encodes the frame to be encoded in block units, An index of visibility is obtained that indicates how easily differences in image quality due to differences in block distortion between blocks within the aforementioned encoded frame can be perceived. Based on the acquired visibility index, a determination is made as to whether or not to apply an intra-refresh to the frame to be encoded, which intra-encodes a portion of the area within the frame. Based on the result of the above determination, encode the frame to be encoded. The visibility index is an index that indicates whether the difference in image quality due to the difference in block distortion between blocks that are intra-encoded by the intra-refresh and blocks that are encoded by other methods is easily visible when the intra-refresh is applied to the frame to be encoded. Encoding method.
10. A program for causing a computer to execute the encoding method described in claim 9.
Citation Information
Patent Citations
Device and method for encoding dynamic image
JP1999220733A
Transmitter and receiver
JP2006319423A
Encoding device, encoding program, and encoding method
JP2008109224A
Adaptive Intra Refresh for Digital Video Coding
JP2008516561A
Video encoding device, intra refresh control device, and programs thereof
JP2020102798A
