The present principles generally relate to coding/decoding of functions intended to be transmitted, as part, for example, of a SEI or PPS message, in order to apply the function at decoder side using a bit exact process. Especially, it deals with representation of functions with large variation of the first order derivative.
The present section is intended to introduce the reader to various aspects of art, which may be related to various aspects of the present principles that are described and/or claimed below. This discussion is believed to be helpful in providing the reader with background information to facilitate a better understanding of the various aspects of the present principles. Accordingly, it should be understood that these statements are to be read in this light, and not as admissions of prior art.
We need to code and send to a decoder a mono-dimensional function f. This function f can, for instance, be intended to be applied on pixel values. An example is a function f intended to be applied to a chroma correction on U and V components of a color picture in the following shape:
U
r
=f(Y)*U
V
r
=f(Y)*V
In this example, we assume the same function f applies on chroma components U and V and f depends on the luma component Y. We also assume a great accuracy is needed in the representation of the function f.
In order to code this function f, several methods are already available. The most straightforward method is to determine a LUT (Look-Up-Table) representing the function f on the desired interval and to transmit this LUT to the decoder.
Mathematically speaking, a value of the LUT is given by: LUT[x]=Q(f(x)) where the size of the LUT depends on a given accuracy, missing values are reconstructed for example by interpolation between existing elements. he Q(.) function codes the values of the LUT typically, by: Q(x)=Int(x*Q) for fix-point representation where the operator Int(x) returns the closest integer value of input data x and Q is a quantization step.
Another method for coding the function f is to approximate said function f by a piece-wise polynomial (PWL) model and to code the parameters of this piece-wise polynomial model. A usual piece-wise linear model comprises at least one piece on which an approximation function of the shape ai*x+bi is defined over an interval Ri itself defined over a range of values comprised between a lower bound mi and an upper bound Mi. The parameter value ai, usually called the scale factor or slope value, and the parameter bi, usually called the offset value, have to be coded for each piece. The N intervals of a PWL model can be uniform or non-uniform.
For the first interval R0 defined over a range of values comprised between a lower bound m0 and an upper bound M0, the approximate function is defined from a slope value a0 and an offset value b0.
For any other interval Ri defined over a range of values comprised between a lower bound mi and an upper bound Mi, the approximate function is defined from a slope value ai and an offset value bi.
Assuming a C0 continuous at each bound of each interval, the number of values to be coded can be reduced by 1 for each interval, a slope value ai, plus an offset value b0 for the first interval and an offset value bN−1 for the last interval. The offset value bi (i≠0 and i≠N−1) of each piece is derived from the other slope and offset values by: bi=(ai−1−ai)*Mi+1+bi−1
Then, only the values b0, bN−1, ai and the length of each range Mi-mi i=0, . . . N−1, of the piece-wise linear model have to be coded.
An illustration of this model is shown in
The piece-wise linear (PWL) model can be extended to polynomial representation and the C0 continuity to higher order continuity as well.
Each parameter of the PWL model is coded using an integer representation for bit exact constraint.
Assuming a fix-point representation, a typical decoder operation to calculate an output value y for an input value x from the function f represented by a PWL model comprises:
y=(Ai*X+Bi)>>Q (1)
where
The operators “<<” and “>>” correspond to the well-known left and right shifting of a binary representation.
Note that the equation (1) can be more generically written as:
y=((Ai*X)>>Q)+(Bi>>Q1) (2)
where Q1 is a quantization step used for quantizing bi (same as Obi).
Since the quantization accuracy issue mostly concerns the slope values ai, for sake of simplification, the offset values bi will be considered as already derived, and the following equation is used as reference
y=((Ai*X)>>Q)+bi (3)
where bi is quantized with p bits.
A typical problem arising using these coding methods is when the slope value has very large variations, with non-monotonic functions, and slope values than can be very close to 0 or of very high values. It is not possible to keep enough accuracy, either on the small values of the slope, or on the large values of the slopes, without using a large number of bits to represent the fix-point values of the slope and offset values to code. This is problematic for software and hardware-friendly implementations.
The present principles aim at solving these issues, by using different adaptations to code the slope and offset values of the piece-wise model.
The following presents a simplified summary of the present principles in order to provide a basic understanding of some aspects of the present principles. This summary is not an extensive overview of the present principles. It is not intended to identify key or critical elements of the present principles. The following summary merely presents some aspects of the present principles in a simplified form as a prelude to the more detailed description provided below.
The present principles set out to remedy at least one of the drawbacks of the prior art with a method for determining an output value representing a picture data by applying a piece-wise linear function on an input value representing a picture data, said piece-wise linear function comprising at least one piece characterized by a slope value ai, an offset value and an interval defined over a range of values comprised between a lower bound and an upper bound. The method comprises:
According to other of their aspects, the present principles relate to a device comprising means configured to implement the above method, a computer program product comprising program code instructions to execute the steps of the above method when this program is executed on a computer, a processor readable medium having stored therein instructions for causing a processor to perform at least the steps of the above method, and a non-transitory storage medium carrying instructions of program code for executing steps of the above method when said program is executed on a computing device.
The specific nature of the present principles as well as other objects, advantages, features and uses of the present principles will become evident from the following description of examples taken in conjunction with the accompanying drawings.
In the drawings, examples of the present principles are illustrated. It shows:
Similar or same elements are referenced with the same reference numbers.
The present principles will be described more fully hereinafter with reference to the accompanying figures, in which examples of the present principles are shown. The present principles may, however, be embodied in many alternate forms and should not be construed as limited to the examples set forth herein. Accordingly, while the present principles are susceptible to various modifications and alternative forms, specific examples thereof are shown by way of examples in the drawings and will herein be described in detail. It should be understood, however, that there is no intent to limit the present principles to the particular forms disclosed, but on the contrary, the disclosure is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the present principles as defined by the claims.
The terminology used herein is for the purpose of describing particular examples only and is not intended to be limiting of the present principles. As used herein, the singular forms “a”, “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises”, “comprising,” “includes” and/or “including” when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. Moreover, when an element is referred to as being “responsive” or “connected” to another element, it can be directly responsive or connected to the other element, or intervening elements may be present. In contrast, when an element is referred to as being “directly responsive” or “directly connected” to other element, there are no intervening elements present. As used herein the term “and/or” includes any and all combinations of one or more of the associated listed items and may be abbreviated as“/”.
It will be understood that, although the terms first, second, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first element could be termed a second element, and, similarly, a second element could be termed a first element without departing from the teachings of the present principles.
Although some of the diagrams include arrows on communication paths to show a primary direction of communication, it is to be understood that communication may occur in the opposite direction to the depicted arrows.
Some examples are described with regard to block diagrams and operational flowcharts in which each block represents a circuit element, module, or portion of code which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in other implementations, the function(s) noted in the blocks may occur out of the order noted. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may sometimes be executed in the reverse order, depending on the functionality involved.
Reference herein to “in accordance with an example” or “in an example” means that a particular feature, structure, or characteristic described in connection with the example can be included in at least one implementation of the present principles. The appearances of the phrase in accordance with an example” or “in an example” in various places in the specification are not necessarily all referring to the same example, nor are separate or alternative examples necessarily mutually exclusive of other examples.
Reference numerals appearing in the claims are by way of illustration only and shall have no limiting effect on the scope of the claims.
While not explicitly described, the present examples and variants may be employed in any combination or sub-combination.
The present principles are described for determining an output value representing a picture data by applying a piece-wise linear function on an input value representing a picture data. Said piece-wise linear function comprising at least one piece characterized by a slope value, an offset value and an interval Ri defined over a range of values comprised between a lower bound and an upper bound. The principles can apply to others types of scalar data.
In the following, it is considered that the interval Ri is previously determined from an input value x. The interval Ri is defined over a range of values comprised between a lower bound mi and an upper bound Mi. The piece of the piece-wise linear model is defined over the interval Ri from a slope value as and an offset value bi deduced as follows: bi=(ai−1−ai)*Mi−1+bi−1. From a coded slope Ai, a decoder deduces a decoded slope value ai, and the decoded slope value ai is then used to compute the output value of y=f(x).
According to a first embodiment, illustrated in
Ai=Int(ai*R)=Int(ai*2m) (4)
Mathematically speaking, the value m is a non-fixed value deduced from the length of the interval Ri by m=Int(log 2(Mi−mi)).
According to this first embodiment, the method for determining an output value y representing a picture data then comprises:
The output value y is then determined as follows:
y=((Ai*X)>>(n+m−p))+bi (5)
The advantage of this first embodiment of the method is that what is coded is a number in the range of the function f(x) modeled by the piece-wise linear mode, instead of in the range of its first-order derivative f′(x) (indeed slopes corresponds to first-order derivatives of the function f(x)).
Note that coding the input value x with quantization on n bits consists in calculating X=Int(x*2n), coding an output value with quantization on p bits consists in Y=Int(y*2p) and coding a slope with quantization on m bits consists in Ai=Int(ai*2m), n, m and p being integer values.
According to a variant of this first embodiment, the strategy for coding the slope value ai is adapted to its value:
To detect at a decoder how the slope value has been coded, the points of the function for which the slope values become lower or larger than 1, are also coded. This is illustrated in
In addition, the initial slope category (slope>1 or slope<1), named slope0_category, must be signaled to the decoder.
So in addition to the piece-wise model parameters (slope and offset values) signaled to the decoder, the following information have also to be signaled:
For example, a number NC of changing points and a set of changing points Ji, for i=0 . . . NC−1 are signaled.
Hence, the decoder will be able for each segment [Ji,Ji+1] to know if this segment corresponds to a slope value below 1 or above 1.
Note that this process requires a division at decoder side, in case the slope is lower than 1.
The advantage of the first variant is no exponent is required compared to a second embodiment of the method described later.
In summary, the variant of the first embodiment comprises:
Ai=Int(ai*(1<<m))
ai=Ai/(1<<m)
y=((Ai*X)>>(n+m−p))+bi (6)
Ai=Int((1/ai)*(1<<m)).
ai=1/Ai/(1<<m)
y=((1/Ai*X)>>(n+m−p))+bi (7)
According to a second embodiment of the method, the slope value ai is coded using a representation inspired from the floating-point representation. The coding of the slope value ai uses a fix-length representation of K bits.
The floating-point representation consists in splitting a binary number into two parts, as follows: e1e2e3ma1ma2ma3ma4ma5 where ei correspond to the bits of the exponent part of the number, and mai correspond to the mantissa part of the number.
The number “e1e2e3” in binary representation is the exponent e.
The number “ma1ma2ma3ma4ma5” in binary representation is the mantissa ma.
In this example, 3 bits are used for the exponent, and 5 for the mantissa.
And the output value is computed as:
y=2e*(1+ma/2M)=2e+ma/2M-e (8)
where e is the exponent, and ma the mantissa.
This second embodiment is an adaptation of the floating-point representation that consists in representing the coded slope Ai as:
A
i
=a
i
_
m*2ai_e=ai_m*(1<<ai_e)=ai_m<<ai_e (9)
with ai_m being the mantissa and ai_e being the exponent.
The K bits are split into m bits for the mantissa and (K−m) bits for the exponent. K and m are predefined fixed parameters.
For an input value x corresponding to an interval Ri associated with a slope value ai, the output value yi is computed as follows:
y=((Ai*X)>>(n+m−p)+bi (10)
which can also be written as:
y=(ai_m*2ai_e*X)>>(n+m−p)+bi (11)
Actually, to keep a high accuracy depending on the exponent, equation (11) is replaced by the following:
y=(ai_m*X)>>(n+m−ai_e−p)+bi (12)
that is equivalent to
y=(ai_m*X)/2(n+m−ai_e−p)+bi (13)
Thanks to this process, the accuracy obtained for the output value y is adapted to the amplitude of the slope value.
In summary, this second embodiment of the method for determining an output value y representing a picture data then comprises:
y=(ai_m*X)>>(n+m−ai_e−p)+bi (14)
The first embodiment is actually a sub-case of this second embodiment (cf equations (4) and (9)). In first embodiment, an approximation of ai can be obtained from Int(ai*2m)/2m, with m depending on the length of the segment Ri. In second embodiment, an approximation of ai can be obtained from Int(ai*2ai_e)/2ai_e, and ai_e is non-fixed.
Device 30 comprises following elements that are linked together by a data and address bus 31:
In accordance with an example, the battery 36 is external to the device. In each of mentioned memory, the word «register» used in the specification can correspond to area of small capacity (some bits) or to very large area (e.g. a whole program or large amount of received or decoded data). The ROM 33 comprises at least a program and parameters. The ROM 33 may store algorithms and instructions to perform techniques in accordance with present principles. When switched on, the CPU 32 uploads the program in the RAM and executes the corresponding instructions.
RAM 64 comprises, in a register, the program executed by the CPU 32 and uploaded after switch on of the device 30, input data in a register, intermediate data in different states of the method in a register, and other variables used for the execution of the method in a register.
The implementations described herein may be implemented in, for example, a method or a process, an apparatus, a software program, a data stream, or a signal. Even if only discussed in the context of a single form of implementation (for example, discussed only as a method or a device), the implementation of features discussed may also be implemented in other forms (for example a program). An apparatus may be implemented in, for example, appropriate hardware, software, and firmware. The methods may be implemented in, for example, an apparatus such as, for example, a processor, which refers to processing devices in general, including, for example, a computer, a microprocessor, an integrated circuit, or a programmable logic device. Processors also include communication devices, such as, for example, computers, cell phones, portable/personal digital assistants (“PDAs”), and other devices that facilitate communication of information between end-users.
In accordance with examples, device 30 being configured to implement a method described in relation with
According to an example of the present principles, illustrated in
In accordance with an example, the network is a broadcast network, adapted to broadcast still pictures or video pictures from device A to decoding devices including the device B.
A signal, intended to be transmitted by the device A. This signal comprises an information data indicating piece-wise parameters as explained above. In addition, the signal may further comprises:
Additionally, the methods may be implemented by instructions being performed by a processor, and such instructions (and/or data values produced by an implementation) may be stored on a computer readable storage medium. A computer readable storage medium can take the form of a computer readable program product embodied in one or more computer readable medium(s) and having computer readable program code embodied thereon that is executable by a computer. A computer readable storage medium as used herein is considered a non-transitory storage medium given the inherent capability to store the information therein as well as the inherent capability to provide retrieval of the information therefrom. A computer readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. It is to be appreciated that the following, while providing more specific examples of computer readable storage mediums to which the present principles can be applied, is merely an illustrative and not exhaustive listing as is readily appreciated by one of ordinary skill in the art: a portable computer diskette; a hard disk; a read-only memory (ROM); an erasable programmable read-only memory (EPROM or Flash memory); a portable compact disc read-only memory (CD-ROM); an optical storage device; a magnetic storage device; or any suitable combination of the foregoing.
The instructions may form an application program tangibly embodied on a processor-readable medium.
Instructions may be, for example, in hardware, firmware, software, or a combination. Instructions may be found in, for example, an operating system, a separate application, or a combination of the two. A processor may be characterized, therefore, as, for example, both a device configured to carry out a process and a device that includes a processor-readable medium (such as a storage device) having instructions for carrying out a process. Further, a processor-readable medium may store, in addition to or in lieu of instructions, data values produced by an implementation.
As will be evident to one of skill in the art, implementations may produce a variety of signals formatted to carry information that may be, for example, stored or transmitted. The information may include, for example, instructions for performing a method, or data produced by one of the described implementations. For example, a signal may be formatted to carry as data the rules for writing or reading the syntax of a described example of the present principles, or to carry as data the actual syntax-values written by a described example of the present principles. Such a signal may be formatted, for example, as an electromagnetic wave (for example, using a radio frequency portion of spectrum) or as a baseband signal. The formatting may include, for example, encoding a data stream and modulating a carrier with the encoded data stream. The information that the signal carries may be, for example, analog or digital information. The signal may be transmitted over a variety of different wired or wireless links, as is known. The signal may be stored on a processor-readable medium.
A number of implementations have been described. Nevertheless, it will be understood that various modifications may be made. For example, elements of different implementations may be combined, supplemented, modified, or removed to produce other implementations. Additionally, one of ordinary skill will understand that other structures and processes may be substituted for those disclosed and the resulting implementations will perform at least substantially the same function(s), in at least substantially the same way(s), to achieve at least substantially the same result(s) as the implementations disclosed. Accordingly, these and other implementations are contemplated by this application.
Number | Date | Country | Kind |
---|---|---|---|
15306561.0 | Oct 2015 | EP | regional |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/EP2016/073318 | 9/29/2016 | WO | 00 |