Method and a controller for adding comfort noise to a video sequence

A method of adding comfort noise to a video sequence comprising setting parameters of a deblocking filter of a video encoder to change values during the video sequence, encoding frames of the video sequence using the parameters of the deblocking filter that are set to change values during the video sequence, thereby introducing comfort noise in the video sequence, and including the encoded frames in a bitstream together with an indication of which parameters of the deblocking filter were used when encoding the frames of the video sequence.

TECHNICAL FIELD

The present invention relates to the field of video. In particular it relates to a method and an associated controller for adding comfort noise to a video sequence.

BACKGROUND

Video cameras are commonly used for surveillance purposes. The scene monitored by a camera may during some periods of time include moving objects, thereby introducing motion in the video captured by the camera. During other periods of time the scene may only include stationary objects, thereby causing the video captured by the camera to lack motion, i.e., the video will be a still video.

In order to deal with the varying amount of motion in the scene, the camera may dynamically adjust its frame rate depending on the amount of motion in the scene as depicted in the frames. During periods of time when there is motion in the frames, a higher frame rate may be used compared to when there is no or little motion in the frames. For example, when there is limited or no motion in the frames, the frame rate may be as low as 1 Hz, meaning that there is only one frame per second. At such low frame rates, there will be very little temporal noise in the video. As a consequence, a user watching the video will find that it looks unnatural and frozen, and the user could start wondering if there is a hardware or software malfunction of the camera.

Another way of dealing with the varying amount of motion in the scene is to use encoding techniques where the level of compression applied by the encoder varies with the importance of the image contents. For example, portions of a video frame depicting moving objects may be encoded with a lower compression than portions of the video frame where no motion is present. In particular, the portions of the video frames where no motion is present may be coded using empty blocks, sometimes referred to as skip blocks or P-skip blocks. During time periods when there is no or a limited amount of motion in the scene, the frame will thus be encoded with a majority of empty blocks. As an empty block will show as a copy of the corresponding block in the previous frame, this will also have the effect that there is very little temporal noise in the video. Thus, again, a user watching the video will find that it looks unnatural and frozen, and the user could start wondering if there is a hardware or software malfunction with the camera.

Thus, using a low frame rate, or encoding a video using a large number of empty blocks as explained above may introduce an artificial stillness in the video due to the absence of temporal noise. This artificial stillness is not caused by the lack of motion in the scene itself, since a video of a static scene captured at a frame high rate may still include temporal noise due to noise at the sensor, but is caused by the choice of frame rate or the encoding approach used when encoding the video as explained above. In order to mitigate the artificial stillness so as to avoid that the video looks unnatural and frozen, a synthetic temporal noise, sometimes called comfort noise, may be added to the video.

One way of adding comfort noise to a video is to add noise to the images of the video at a decoder side. However, that would have as an effect that a non-standard decoder would have to be used. Another option could be to add film grain characteristics to the video at the decoder side using a parametrized model derived at the encoder and transmitted to the decoder in a film grain characteristics message as allow by the h.264 standard. However, a drawback of that option is that the bitrate of the encoded video may increase. There is thus room for improvements.

SUMMARY

Providing a way of adding comfort noise to a video sequence which is efficient in terms of bitrate and allows a standard decoder to be used would be beneficial.

According to a first aspect, a method of adding comfort noise to a video sequence, comprises:setting parameters of a deblocking filter of a video encoder to change values during the video sequence,encoding frames of the video sequence using the parameters of the deblocking filter that are set to change values during the video sequence, thereby introducing comfort noise in the video sequence, andincluding the encoded frames in a bitstream together with an indication of which parameters of the deblocking filter were used when encoding the frames of the video sequence.

Coding techniques encode video blockwise. In more detail, a frame is divided into blocks of pixels, sometimes referred to as macroblocks or coding units depending on the standard used. When the frame is encoded or decoded, the frame is scanned blockwise and the frame is encoded or decoded block by block. Since neighboring blocks may be encoded differently, this may in the end cause the blocks to be visible in the decoded frame. In order to mitigate the blockiness of the decoded frames, most coding standards of today, such as h.264 and h.265, prescribe to include a deblocking filter in the encoder and decoder. The deblocking filter may be seen as a smoothing filter that aims at smoothing out the visible boundaries between the blocks in the decoded frames.

The present disclosure varies the parameters of the deblocking filter from time to time during the video sequence, thereby introducing synthetic temporal noise in the video sequence, effectively resulting in comfort noise. For example, consider two frames which would appear as identical (these may for instance be two subsequent skip frames). By applying a deblocking filter to these two frames with different parameters of the filter, the two frames will, after filtering, appear as being slightly different. That slight difference serves to emulate a temporal noise between the frames, and a user watching those frames of the video will no longer experience that the video is frozen.

An advantage of using the deblocking filter to introduce comfort noise is that a functionality that is already present in standardized codecs may be used, meaning that no special encoder or decoder is required. For example, the method can be implemented within the framework of the h.264 standard. Further, as the deblocking filter would be used anyway (albeit with default settings), the resulting increase in bitrate is minimal.

By comfort noise is generally meant a synthetic temporal noise which is added to a video sequence to improve the user experience. The comfort noise may mitigate the artificial stillness so as to avoid that the video looks unnatural and frozen.

The frames of the video sequence may be encoded according to successive group of pictures, GOP, structures, and the parameters of the deblocking filter may be set to change values during a GOP structure. A GOP is a collection of successive frames of the video stream, and a GOP structure specifies the order in which intra-coded frames (I-frames) and inter-coded frames (P-frames, B-frames) are arranged in the GOP. A GOP structure starts with an intra-coded frame, which is followed by one or more inter-coded frames. The deblocking parameters may thus be set to change values during a GOP structure, meaning that the deblocking parameters may change values at least once between two intra-coded frames.

As mentioned above, the parameters of the deblocking filter are set to change values during the video sequence, or during a GOP structure. How often to change the settings may depend on the particular application, and may be for instance depend on the frame rate. The parameters may be set to change value more seldom as the frame rate increases and vice versa. The time instances when the parameters are set to change values are typically determined in a predefined way and do not depend on the image contents of the video stream.

For example, the parameters of the deblocking filter may be set to change values according to a predefined temporal pattern. In particular, the parameters of the deblocking filter may be set to change values according to a predefined pattern during the GOP structure. The predefined pattern may concern when to change values, such as for which frames in the GOP structure to change values. The predefined pattern may also specify the values between which the parameters of the deblocking filter should change.

In some embodiments, the parameters of the deblocking filter are set to change values between each frame of the GOP structure. This may be of particular interest in case of a low frame rate.

In other embodiments, the parameters of the deblocking filter are set to change values more seldom, which may be preferred for higher frame rates. More specifically, a rate at which parameters of the deblocking filter are set to change values may decrease with increasing frame rate of the video sequence.

The deblocking filter of the encoder and decoder are preferably synchronized, i.e. they should both use the same parameter values when encoding/decoding the same frame. For that reason, the parameter values of the deblocking filter used when encoding a frame are preferably communicated from the encoder to the decoder in one way or the other. For example, each encoded frame in the bitstream may include an indication of which parameters of the deblocking filter were used when encoding that frame. More specifically, referring to the h.264 standard, data of each encoded frame may be signaled using a Picture Parameter Set header (PPS header) followed by one or more slices of data. In the PPS header, a flag may be set to activate the deblocking filter, and the parameters of the deblocking filter used when encoding each slice of the frame may signaled in the corresponding slice header. If several slices are used per frame, the deblocking filter may accordingly take different values for different slices if desired.

The deblocking filter may be associated with different parameters. For example, the deblocking filter in h.264 is associated with a “strength” parameter and an “edge” parameter. Each of the parameters may take a number of different values. For example, the “strength” parameter of h.264 may take integer values between −3 and +3, and the “edge” parameter of h.264 may take integer values between −3 and +3. Thus, when combining the parameters, a plurality of combinations of parameter values, i.e., permutations of the parameter values, are possible. These are referred to herein as the plurality of possible parameter combinations. In h.264 there are thus 7×7=49 possible parameter combinations.

The parameters of the deblocking filter may be allowed to change to any value among the possible parameter combinations. However, it may be enough to allow the parameters of the deblocking filter to vary within a strict subset of the full plurality of possible parameter combinations. Accordingly, the deblocking filter of the encoder may have a plurality of possible parameter combinations, wherein the parameters of the deblocking filter are set such that they change values within a strict subset of the plurality of possible parameter combinations. In that way, the variability of the parameters of the deblocking filter may be controlled.

The subset of parameter combinations may be updated during the video sequence. In this way, the set of parameters may be updated regularly to, for instance, adapt the set of parameters to current properties of the video stream or to current settings of the encoder. The subset of parameter combinations may be updated for each received frame. Alternatively, the subset of parameter combinations may be updated more seldom. For example, the set of parameter combinations may be updated for each GOP structure.

When updating the subset of parameters, different factors may be taken into account. For example, when the signal-to-noise ratio currently is high, i.e., when there is little noise in the frames, even a small variation of the parameters of the deblocking filter between frames will be visible in the decoded frames, and thereby be enough to provide a comfort noise which increases the user experience. However, when the signal-to-noise ratio currently is lower, i.e., when there is more noise in the frames, a larger variation of the parameters of the deblocking filter between frames may be needed. Otherwise the added comfort noise will tend to be drowned by the noise in the frames. The subset of parameter combinations may therefore be updated based on a current signal-to-noise ratio of the video sequence. The signal-to-noise ratio may be estimated from a predetermined number of received frames. This may include estimating the signal-to-noise ratio from the last received frame, or from the last received n frames, where n is a predefined number larger than one. This may be performed for each frame or more seldom, such as once per GOP structure. In the latter case, the signal-to-noise ratio may be estimated from the first frame of the GOP structure.

Further, for the reasons explained above, it may generally be favorable to decrease the variability of the parameter combinations within the subset with increasing signal-to-noise ratio. The variability of the parameter combinations within the subset may be measured in terms of the largest distance between parameter combinations with the subset. The distance may be calculated using the L2 norm. Accordingly, the subset of parameter combinations may be updated such that a largest distance between parameter combinations within the subset decreases with increasing signal-to-noise ratio.

Alternatively, or additionally, the subset of parameter combinations may be updated based on at least one of a frame rate of the video sequence, a length of a GOP structure, and a current compression level of the video encoder. The compression level may correspond to a value of the quantization parameter as, e.g., known from h.264 and h.265.

In some cases, empty frames may be introduced, i.e., frames which only includes skip blocks, between the encoded frames. For example, a low frame rate may look strange to a user in that the display may seem to flicker at a noticeable slow rate. An approach to mitigate the flickering is to add empty frames (which may be skip frames, that is inter-coded frames with no updated data) into the video stream between each update. This will serve to increase the frame rate and thereby reduce the appearance of flickering. However, the update rate of the contents in the video since is not increased in this way since the empty frames will only show as a copy of the previous frame. According to another example, some clients only accept a constant frame rate. Thus, if a dynamically varying frame rate is used, empty frames may be included between the frames so as to emulate a constant frame rate. However, as previously explained, frames which include many skip blocks (or only skip blocks in the case of empty frames) serve to introduce an artificial stillness in the video. Therefore, in the step of encoding, empty frames may be inserted between the encoded frames, and, in the step of setting parameters of the deblocking filter, the parameters may be set to change values for the empty frames. In other words, the parameters are set to vary for the empty frames. In this way, a temporal noise is introduced in the empty frames, thereby removing the artificial stillness introduced by the empty frames.

According to a second aspect, a controller for controlling a video encoder to add comfort noise to a video sequence, comprises:a parameter setting component configured to set parameters of a deblocking filter of a video encoder such that they change values during the video sequence, anda control component configured to instruct the video encoder to encode frames of the video sequence using the parameters of the deblocking filter that change values during the video sequence, thereby introducing comfort noise in the video sequence, and include the encoded frames in a bit stream together with an indication of which parameters of the deblocking filter were used when encoding the frames of the video sequence.

According to a third aspect, a computer program product comprising a (non-transitory) computer-readable medium having computer code instructions stored thereon adapted to carry out the method according to the first aspect when executed by a device having processing capability is set forth.

The second and third aspects may generally have the same features as the first aspect. It is further noted that the description herein relates to all possible combinations of features unless explicitly stated otherwise.

DETAILED DESCRIPTION OF EMBODIMENTS

A description will be set forth more fully hereinafter with reference to the accompanying drawings, in which embodiments are shown. The systems and devices disclosed herein will be described during operation.

FIG. 1illustrates a system100in which example embodiments may be implemented. The system100comprises a video encoder120, a video decoder140, and a controller160. The video encoder120and the video decoder140may implement a video coding standard, such as the h.264 or the h.265 standard, which encodes and decodes frames of a video sequence block by block. Thus a standard video encoder and a standard video decoder may be used.

During use, the video encoder120receives a video sequence102, i.e., a sequence of image frames, to be encoded. The video sequence102may be captured by a video camera and forwarded to the video encoder120. The video sequence102may be a still video sequence or a video sequence in which the motion is limited, at least for spatial or temporal portions thereof. The video encoder120may be included in the video camera capturing the video sequence102. The video encoder120then encodes the video sequence, and includes the encoded video sequence in a bitstream104for transmission to the decoder140, for instance via a wired or wireless network.

The operation of the video encoder120is controlled by the controller160. The controller160may be separate from the video encoder120, or may be included in the video encoder120. Both the controller160and the video encoder may be included in the video camera capturing the video sequence102. The controller160may receive data106from the video encoder120. The data106may concern parameters used by the video encoder, such as a GOP structure and a compression level currently used by the video encoder120. The compression level may be in the form of a quantization parameter. The data106may also relate to the video sequence102, such as the frame rate of the video sequence. The data106may also include the video sequence102itself, or at least one or more frames thereof.

The controller160may send a control signal108to the video encoder120to control the operation thereof. For example, the control signal108may convey information to the video encoder120regarding which parameters of a deblocking filter to use when encoding the video sequence102. In response, the encoder120encodes the video sequence102using the parameters of the deblocking filter conveyed from the controller160via the control signal108.

The video encoder120may further include control information in the bitstream104. The control information may, for instance, be included in headers of the encoded video frames. The control information may include information regarding which parameters were used by the video encoder120when encoding the video sequence102. For example, the control information may include an indication regarding which parameters of a deblocking filter were used when encoding the frames of the video sequence102.

Upon receipt of the bitstream104, the video decoder140decodes the encoded frames, using the control information, to provide a reconstructed video sequence110. This is further illustrated inFIG. 2which shows the video decoder140in more detail. The video decoder140includes a decoder component142, a deblocking filter144, and a buffer of reconstructed frames146. The decoder component142decodes the bitstream104to provide an initial reconstruction206of the frames of the video sequence102. This may include scaling, inverse transformation, and intra-frame prediction or inter-frame prediction depending on whether the encoded frame was intra-coded or inter coded as known in the art. If the frame was intra-coded, it is predicted with reference to the frame itself. If the frame was inter-coded, it is predicted by making reference to previously decoded frames which are stored in the buffer of reconstructed frames146.

The initially reconstructed frames206are then input to the deblocking filter144which filters the initially reconstructed frames206, to provide reconstructed frames208which are stored in the buffer of reconstructed frames146. The purpose of the deblocking filter144is to reduce blockiness in the initially reconstructed frames206caused by block-wise encoding of the frames. When filtering the frames, the deblocking filter144uses the parameters which were included by the video encoder102in the bitstream104together with the encoded frames. The reconstructed frames208in the buffer of reconstructed frames146may then be re-ordered and output in the correct display order as a reconstructed video sequence110.

FIG. 3illustrates the video encoder120in more detail. The video encoder120comprises an encoder component122. The encoder component122encodes the video sequence102frame-by-frame, and block-by-block, as known in the art. In particular, the frames may either be intra-coded or inter-coded. In the former case, a frame is encoded by only making reference to itself. In the latter case, the frame is encoded by making reference to previously decoded frames. For that purpose, the video encoder120includes a video decoder340which mimics the video decoder140so as to provide the previously decoded frames. In other words, the video decoder340operates in the same manner as the video decoder140. In particular, the video decoder340included in the video encoder120includes a decoder component342, a deblocking filter344, and a buffer of reconstructed frames346, which operate in the same way as the corresponding components in the video decoder140. The video decoder340inside the video encoder120does not only operate in the same manner as the video decoder140, but it is also synchronized with the video decoder140. This means, for instance, that the video decoder340inside the video encoder120and the video decoder140uses the same parameters when reconstructing the same frame. In particular, the video encoder340inside the video encoder120and the video decoder140preferably uses the same parameters of the deblocking filter144,344when reconstructing the same frame. Using different parameters in the decoder140would result in artifacts which would increase during the GOP until the next intra-frame. This synchronization is achieved by the control information in the bitstream104regarding which parameters were used by the video encoder120when encoding the video stream102. For example, the control information may include an indication regarding which parameters of the deblocking filter304were used when encoding the frames of the video sequence102so that the deblocking filter144at the decoder side may use the same parameters.

As further mentioned above, the operation of the video encoder120is controlled by the controller160via control signal108. In particular, the control signal108may provide information to the deblocking filter344regarding which parameters to use with respect to each frame of the video sequence102.

FIG. 4illustrates the controller160in more detail. The controller160includes a parameter setting component162and a control component164.

Generally, the controller160may comprise circuitry which is configured to implement the components162,164and, more specifically, their functionality.

In a hardware implementation, each of the components162,164may correspond to circuitry which is dedicated and specifically designed to provide the functionality of the component. The circuitry may be in the form of one or more integrated circuits, such as one or more application specific integrated circuits. By way of example, the parameter setting component162may thus comprise circuitry which, when in use, sets parameters of the deblocking filter344.

In a software implementation, the circuitry may instead be in the form of one or more processors, such as one or more microprocessors, which in association with computer code instructions stored on a (non-transitory) computer-readable medium, such as a non-volatile memory, causes the controller to carry out any method or relevant sub-steps thereof as disclosed herein. In that case, the components162,164, may thus each correspond to a portion of computer code instructions stored on the computer-readable medium, that, when executed by the processor, causes the controller160to carry out the functionality of the component.

It is to be understood that it is also possible to have a combination of a hardware and a software implementation, meaning that the functionality of some of the components160,162are implemented in hardware and others in software.

What was said above with respect to the implementation of the components162,164of the controller160applies equally well to the components of the video encoder120and the video decoder140. In particular, it applies to components122,342,344of the video encoder120, and to components142,144of the video decoder140. The buffer of reconstructed frames146,346may be implemented in terms of a memory.

A method for adding comfort noise to a video sequence will now be described with reference toFIGS. 1-4, 5a,5band the flow chart ofFIG. 7. The method may be applied to any video sequence. In particular, it may be applied to still video sequences and video sequences in which there is a limited amount of motion (the level of motion is below a threshold), at least for spatial and/or temporal portions thereof.

In step S02, the parameter setting component162of the controller160sets parameters to be used by the deblocking filter344of the video encoder120when encoding the video sequence102. The parameters which are available may, for instance, be specified by a video coding standard. For example, the parameters may include a strength parameter and an edge parameter, which are the parameters of the deblocking filter of the h.264 standard. The parameter setting component162may set the parameters of the deblocking filter on a frame-by-frame basis. In particular, when doing so, the parameter setting component162sets the parameters of the deblocking filter344to change values during the video sequence102. In other words, the parameters of the deblocking filter344are set such they vary during the video sequence102.

The parameter setting component162may, in particular change values of the parameters during periods when the level of motion in the video sequence102is below a certain threshold, since the need of adding comfort noise may be larger when the level of motion in the video sequence102is low. During other periods, when the level of motion is above the threshold, the parameter setting component162may keep the parameters of the deblocking filter344constant.

The video encoder120may encode the video sequence102according to successive GOP, structures. A GOP structure defines the order in which intra-coded frames (sometimes referred to as I-frames) and inter-coded frames (sometimes referred to as P-frames and B-frames) are arranged in the GOP. A GOP structure typically starts with an intra-coded frame, and is followed by one or more inter-coded frames, as illustrated by the GOP structure510inFIG. 5a, where an intra-frame (“I”) is followed by five inter-coded frames (“P”) in the GOP structure510.

The parameters may be set such that they change values in a predefined manner. For example, the parameters may change values according to a predefined pattern. In particular, the parameters may be set to change values at time instants which follow a predefined pattern. The predefined pattern may specify that the parameters should change values at regular time intervals, such as between each frame, or between every second frame of the video sequence102. The parameter setting component162may set the rate at which the parameters change values based on the frame rate of the video sequence102. As the frame rate of the video sequence102increases, the parameter setting component162may decrease the rate at which the parameters are set to change values. For example, if the frame rate increases with a factor of m, the rate at which the parameters change values may be reduced by the same factor m. In the example ofFIG. 5a, the parameters of the deblocking filter are set to change values at every second frame, namely for the frames which are marked by the dotted pattern. However, the predefined pattern may also be irregular, meaning that the parameters are set to change values at irregular time intervals, but still according to a predefined rule. The predefined pattern may be the same for all GOP structures, but it is also possible for the predefined pattern to change between GOP structures. For example, the parameter setting component162may switch between a number of predefined patterns between successive GOP structures.

As previously discussed, the video encoder120may include empty frames between the encoded frames. This is further illustrated inFIG. 5bwhere the encoded video sequence includes frames502a,502b,502c,502d. The video encoder120includes empty frames504between frames502a,502b,502c,502dto, for instance, achieve the same frame rate as inFIG. 5a. The empty frames may be considered as a P-frame with no updated data, sometimes referred to as a P-skip frame. Such a frame, will upon decoding be a copy of the previously decoded frame and the empty frames thus introduces artificial stillness in the video sequence. In order to mitigate the introduced artificial stillness, the parameter setting component162may set the parameters of the deblocking filter344such that they change values for the empty frames504as illustrated inFIG. 5b. In that way, a temporal noise will be emulated between the empty frames as they will no longer be identical to the previously decoded frame due to being filtered with deblocking filters having different filter parameters.

The parameter setting component162does not only determine when during the video sequence102, or during a GOP structure thereof, to change the parameter values of the deblocking filter344, but it also sets the specific values of the parameters of the deblocking filter344to be used for each frame.

The deblocking filter344may be associated with a plurality of different parameters which each may take a plurality of different values. When the parameters are looked upon in combination, there will thus be a plurality of possible parameter combinations to choose from.FIG. 6illustrates an example where the deblocking filter344is associated with two parameters. These parameters may, for instance, correspond to the strength and the edge parameter of the deblocking filter of the h.264 standard. Each of the illustrated first and second parameters may take a plurality of values, say M values for the first parameter and N values for the second parameter. For instance, the strength parameter and the edge parameter of h.264 may both take seven values. When the first and the second parameter are combined, there will thus be M×N possible combinations602of parameter values, each indicated by an “X” inFIG. 6. For the h.264 case there are thus 49 possible combinations of parameter values to make. If it is further taken into account that the deblocking filter344may be turned off, this increases the number of possible parameter combinations of the deblocking filter344by one.

As explained above, the data106may include the video sequence102itself, or at least one or more frames thereof. The set604may hence be selected or updated on basis of information in the video sequence102. For example, the set604may be updated based on a signal-to-noise ratio, SNR, of the video sequence102, such as the SNR of the video sequence at the moment when the set604is to be updated. The parameter setting component162may estimate the SNR from the current frame, or from the last n frames. In the case where the set604is updated for each GOP structure, the set604may for instance be updated based on a SNR of the first frame, i.e., the intra-frame, in the GOP structure. When the SNR is high, i.e., there is little noise in the video sequence102, the parameter setting component162may select the set604such that the parameter combinations included therein are fairly similar, i.e., the variability of the parameter combinations within the set is low. Conversely, when the SNR is lower and there is more noise in the video sequence102, the parameter setting component162may select the set604such that the variability of the parameter combinations within the set604is larger. The variability may, for instance, be measured in terms of the largest distance shown as “d” inFIG. 6between parameter combinations in the set604. Accordingly, the variability in the set604ofFIG. 6is smaller than in the set604b. The parameter setting component162may thus update the set604such that the largest distance d between parameter combinations within the set decreases with increasing SNR.

Additionally, or alternatively, the data106may concern parameters used by the video encoder102, such as a GOP structure and a compression level currently used by the video encoder120. The data106may further relate to the video sequence102, such as the frame rate of the video sequence. Accordingly, the parameter setting component162may select or adjust the set604based on the frame rate of the video sequence102, the length of the GOP structure, and/or the compression level of the video encoder102. For instance, the set604may be adjusted such that the largest distance d decreases with increasing value of the quantization parameter. For this purpose, the setting of the quantization parameter used when encoding the most recently encoded frame may be used. As the quantization parameter may vary locally between different blocks in the frame, a representative value of the quantization parameter may be used. The representative value of the quantization parameter may be chosen such that a predetermined value of the blocks is encoded with a quantization parameter above the representative value. In the evaluation of the representative value of the quantization parameter, skip blocks may be disregarded.

Upon receipt of the control signal108, the video encoder120proceeds to encode frames of the video sequence102. When doing so, the video encoder120uses the parameters of the deblocking filter344that were indicated in the control signal108, i.e., the parameters that were set by the parameter setting component162. As the parameter setting component162, as explained above, sets the parameters of the deblocking filter344to change values during the video sequence102, the video encoder120will thus encode the video sequence102by using parameters of the deblocking filter that change values during the video sequence102. Thereby, temporal noise—comfort noise—is introduced in the video sequence102.

In step S06, the video encoder102proceeds to include the encoded frames into the bitstream104. In order to keep the deblocking filter144on the decoder side synchronized with the deblocking filter344on the encoding side, the video encoder120further includes in the bitstream104an indication of which parameters of the deblocking filter were used when encoding the frames of the video sequence102. This indication in the bitstream104may be provided using a header of each of the encoded frames. Following the h.264 standard, a SPS header is sent at the start of a GOP. In the SPS header, information about width and height of the frames are provided. The SPS header is followed by image data in the form of a PPS header and one or more slices for each frame. In the PPS header, a flag may be set to enable the deblocking filter. If the deblocking filter is enabled for a frame, the parameters of the deblocking filter are included in the slice header of the one or more slices of the frame. Accordingly, the parameter combination of the deblocking filter344that was used when encoding a frame may be signalled using headers being associated with that encoded frame.

It will be appreciated that a person skilled in the art can modify the above-described embodiments in many ways and still use the advantages as shown in the embodiments above. For example, if the video encoder and decoder comprises multiple deblocking filters, the above method may be applied by changing the parameter values of one or both filters during the video sequence. Further, the above applied equally well regardless of the number of parameters of the available deblocking filter(s). Thus, the description should not be limited to the shown embodiments but should only be defined by the appended claims. Additionally, as the skilled person understands, the shown embodiments may be combined.