METHOD AND APPARATUS FOR DETERMINING AN OUTPUT VALUE REPRESENTING A PICTURE DATA BY APPLYING A PIECE-WISE LINEAR FUNCTION ON AN INPUT DATA REPRESENTING A PICTURE DATA
20190079554 ยท 2019-03-14
Inventors
- Franck Galpin (Thorigne-Fouillard, FR)
- Fabrice Le Leannec (Mouaze, FR)
- Edouard Francois (Bourg des Comptes, FR)
Cpc classification
H04N1/64
ELECTRICITY
G06F17/12
PHYSICS
H04N19/463
ELECTRICITY
International classification
Abstract
A method and apparatus 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: obtaining (50) a coded input value X coded with quantization on n bits; obtaining (51) a coded slope value Ai, said coded slope value Ai representing a mantissa value ai_m coded with m bits and an exponent of 2 value ai_e coded with (Km) bits, K being the total number of bits to code said slope value ai; identifying the (Km) most significant bits of the coded slope, said (Km) most significant bits forming an exponent value ai_e of a decoded slope value; identifying the m least significant bits of the coded slope value, said m least significant bits forming the mantissa ai_m of the decoded slope value; determining (52) the output value y by shifting the product of the mantissa ai_m of the decoded slope and the coded input data X by an integer value equal to (n+mai_ep).
Claims
1. 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, said piece being 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, wherein the method comprises: obtaining a coded input value X coded with quantization on n bits; obtaining a coded slope value Ai, said coded slope value Ai representing a mantissa value ai_m coded with m bits and an exponent of 2 value ai_e coded with (Km) bits, K being the total number of bits to code said slope value a.sub.i; identifying the (Km) most significant bits of the coded slope, said (Km) most significant bits forming an exponent value a.sub.i.sub._e of a decoded slope value; identifying the m least significant bits of the coded slope value, said m least significant bits forming the mantissa a.sub.i.sub._m of the decoded slope value; determining the output value y by right shifting the integer value resulting from the product of the mantissa a.sub.i.sub._m of the decoded slope and of the coded input data X by an integer value equal to (n+ma.sub.i.sub._ep), where p is the number of quantization bits used to code the output value y; and adding an offset value b.sub.i.
2. The method of claim 1, wherein the mantissa a.sub.i.sub._m of the decoded slope value is formed as a.sub.i.sub._m=A.sub.i(Ai>>(Km))<<(Km), where the operator << is the left shifting operator and >> is the right shifting operator of the binary representation of an integer.
3. The method of claim 2, wherein the exponent value a.sub.i.sub._e of a decoded slope value is formed as a.sub.i.sub._e=A.sub.i>>(Km).
4. 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, said piece being characterized by a slope value a, an offset value and an interval defined over a range of values comprised between a lower bound and an upper bound, wherein the method comprises: obtaining a coded input value X coded with quantization on n bits; obtaining a coded slope value A.sub.i coded with quantization on m bits for an interval Ri which the input value belongs to; determining the output value by shifting the product of the coded slope value A.sub.i and the coded input data X by an integer value equal to (n+mp), where p is the number of quantization bits used to code the output value y; and adding an offset value b.sub.i.
5. The method of claim 4, wherein the coded slope value Ai is obtained by coding the slope value a.sub.i by A.sub.i=Int(a.sub.i*(1<<n)) when the slope value ai<1, and by A.sub.i=Int((1/a.sub.i)*(1<<n)) when the slope value ai>1; and the method further comprises: signaling whether the slope of the first interval is lower than or greater than 1; signaling the ending point of a current interval when: the slope of a following interval become greater to 1 and the slope of the current interval is lower than 1; or the slope of a following interval become lower than 1 and the slope of the current interval is greater to 1, where the operator << is the left shifting operator and >> is the right shifting operator.
6. The method of claim 1, wherein the number of bits n is derived by n=Int(log 2 (M.sub.im.sub.i)) where mi is a lower bound of the interval which the input value belongs to and Mi the upper bound of said interval.
7. An apparatus 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, each piece being 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, wherein the apparatus comprises means for: obtaining a coded input value X coded with quantization on n bits; obtaining a coded slope value Ai, said coded slope value Ai representing a mantissa value ai_m coded with m bits and an exponent of 2 value ai_e coded with (Km) bits, K being the total number of bits to code said slope value ai; identifying the (Km) most significant bits of the coded slope, said (Km) most significant bits forming an exponent value a.sub.i.sub._e of a decoded slope value; identifying the m least significant bits of the coded slope value, said m least significant bits forming the mantissa a.sub.i.sub._m of the decoded slope value; determining the output value y by right shifting the product of the mantissa a.sub.i.sub._m of the decoded slope and the coded input data X by an integer value equal to (n+ma.sub.i.sub._ep), where p is the number of quantization bits used to code the output value y; and adding an offset value b.sub.i.
8. The apparatus of claim 7, wherein the mantissa a.sub.i.sub._m of the decoded slope value is formed as a.sub.i.sub._m=A.sub.i(A.sub.i>>(Km))<<(Km), where the operator << is the left shifting operator and >> is the right shifting operator.
9. The apparatus of claim 8, wherein the exponent value a.sub.i.sub._e of a decoded slope value is formed as a.sub.i.sub._e=A.sub.i>>(Km).
10. An apparatus 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, each piece being characterized by a slope value a, an offset value and an interval defined over a range of values comprised between a lower bound and an upper bound, wherein the apparatus comprises means for: obtaining a coded input value X coded with quantization on n bits; obtaining a coded slope value A.sub.i coded with quantization on m bits for an interval R.sub.i which the input value belongs to; determining the output value by shifting the product of the coded slope value A.sub.i and the coded input data X by an integer value equal to (n+mp), where p is the number of quantization bits used to code the output value y and adding an offset value b.sub.i.
11. The apparatus of claim 10, wherein said meand for obtaining a coded slope value A.sub.i are configured to obtain the coded slope value Ai by coding the slope value a.sub.i by A.sub.i=Int(a.sub.i*(1<<n)) when the slope value ai<1, and by A.sub.i=Int((1/a.sub.i)*(1<<n)) when the slope value ai>1; and the apparatus further comprises means for: signaling whether the slope of the first interval is lower than or greater than 1; signaling the ending point of a current interval when: the slope of a following interval become greater to 1 and the slope of the current interval is lower than 1; or the slope of a following interval become lower than 1 and the slope of the current interval is greater to 1.
12. (canceled)
13. A computer program product comprising program code instructions to execute the steps of the method according to claim 1 when this program is executed on a computer.
14. A processor readable medium having stored therein instructions for causing a processor to perform at least the steps of the method according to claim 1.
15. Non-transitory storage medium carrying instructions of program code for executing steps of the method according to claim 1, when said program is executed on a computing device.
16. A data carrier signal carrying the computer program product of claim 13.
Description
BRIEF DESCRIPTION OF DRAWINGS
[0038] In the drawings, examples of the present principles are illustrated. It shows:
[0039]
[0040]
[0041]
[0042]
[0043]
[0044] Similar or same elements are referenced with the same reference numbers.
DESCRIPTION OF EXAMPLE OF THE PRESENT PRINCIPLES
[0045] 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.
[0046] 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/.
[0047] 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.
[0048] 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.
[0049] 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.
[0050] 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.
[0051] Reference numerals appearing in the claims are by way of illustration only and shall have no limiting effect on the scope of the claims.
[0052] While not explicitly described, the present examples and variants may be employed in any combination or sub-combination.
[0053] 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.
[0054] 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 m.sub.i and an upper bound M.sub.i. The piece of the piece-wise linear model is defined over the interval Ri from a slope value as and an offset value b.sub.i deduced as follows: b.sub.i=(a.sub.i1a.sub.i)*M.sub.i1+b.sub.i1. From a coded slope A.sub.i, a decoder deduces a decoded slope value a.sub.i, and the decoded slope value a.sub.i is then used to compute the output value of y=f(x).
[0055] According to a first embodiment, illustrated in
Ai=Int(a.sub.i*R)=Int(a.sub.i*2.sup.m)(4)
[0056] Mathematically speaking, the value m is a non-fixed value deduced from the length of the interval Ri by m=Int(log 2(M.sub.im.sub.i)).
[0057] According to this first embodiment, the method for determining an output value y representing a picture data then comprises: [0058] obtaining (50) a coded input value X coded with quantization on n bits; [0059] obtaining (51) a coded slope value A.sub.i coded with quantization on m bits, said coded slope value A representing the product of said slope value a.sub.i by the closest value R, of the shape power of 2 (2.sup.m), larger than or equal to the length of the interval Ri which the input value belongs to; [0060] determining (52) the output value by shifting the product of the coded slope value A and the coded input data X by an integer value equal to (n+mp), where p is the number of quantization bits used to code the output value y and adding an offset value b.sub.i.
[0061] The output value y is then determined as follows:
y=((A.sub.i*X)>>(n+mp))+b.sub.i(5)
[0062] 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)).
[0063] Note that coding the input value x with quantization on n bits consists in calculating X=Int(x*2.sup.n), coding an output value with quantization on p bits consists in Y=Int(y*2.sup.p) and coding a slope with quantization on m bits consists in Ai=Int(ai*2.sup.m), n, m and p being integer values.
[0064] According to a variant of this first embodiment, the strategy for coding the slope value a.sub.i is adapted to its value: [0065] if a.sub.i<1, then A.sub.i=Int(a.sub.i*(1<<n)) [0066] if a.sub.i>1, then A.sub.i=Int((1/a.sub.i)*(1<<n)).
[0067] 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
[0068] In addition, the initial slope category (slope>1 or slope<1), named slope0_category, must be signaled to the decoder.
[0069] 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: [0070] slope0_category [0071] signaling the ending point of a current interval when a changing point occurs, i.e. the slope value of a following interval become greater to 1 and the slope value of the current interval is lower than 1; or the slope value of a following interval become lower than 1 and the slope value of the current interval is greater to 1.
[0072] For example, a number NC of changing points and a set of changing points Ji, for i=0 . . . NC1 are signaled.
[0073] 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.
[0074] Note that this process requires a division at decoder side, in case the slope is lower than 1.
[0075] The advantage of the first variant is no exponent is required compared to a second embodiment of the method described later.
[0076] In summary, the variant of the first embodiment comprises: [0077] identifying the segment [Ji,Ji+1] which the input value x belongs to [0078] identifying the slope_type of the segment [Ji,Ji+1] [0079] if slope_type ai<1,
Ai=Int(ai*(1<<m))
ai=Ai/(1<<m)
y=((A.sub.i*X)>>(n+mp))+b.sub.i(6) [0080] if slope_type ai>=1,
Ai=Int((1/ai)*(1<<m)).
ai=1/Ai/(1<<m)
y=((1/A.sub.i*X)>>(n+mp))+b.sub.i(7)
[0081] According to a second embodiment of the method, the slope value a.sub.i is coded using a representation inspired from the floating-point representation. The coding of the slope value a.sub.i uses a fix-length representation of K bits.
[0082] The floating-point representation consists in splitting a binary number into two parts, as follows: e.sub.1e.sub.2e.sub.3ma.sub.1ma.sub.2ma.sub.3ma.sub.4ma.sub.5 where e.sub.i correspond to the bits of the exponent part of the number, and ma.sub.i correspond to the mantissa part of the number.
[0083] The number e.sub.1e.sub.2e.sub.3 in binary representation is the exponent e.
[0084] The number ma.sub.1ma.sub.2ma.sub.3ma.sub.4ma.sub.5 in binary representation is the mantissa ma.
[0085] In this example, 3 bits are used for the exponent, and 5 for the mantissa.
[0086] And the output value is computed as:
y=2.sup.e*(1+ma/2.sup.M)=2.sup.e+ma/2.sup.M-e(8)
where e is the exponent, and ma the mantissa.
[0087] This second embodiment is an adaptation of the floating-point representation that consists in representing the coded slope A.sub.i as:
A.sub.i=a.sub.i.sub._m*2.sup.ai.sup._.sup.e=a.sub.i.sub._m*(1<<a.sub.i.sub._e)=a.sub.i.sub._m<<a.sub.i.sub._e(9)
with a.sub.i.sub._m being the mantissa and a.sub.i.sub._e being the exponent.
[0088] The K bits are split into m bits for the mantissa and (Km) bits for the exponent. K and m are predefined fixed parameters.
[0089] For an input value x corresponding to an interval Ri associated with a slope value a.sub.i, the output value y.sub.i is computed as follows:
y=((A.sub.i*X)>>(n+mp)+b.sub.i(10)
which can also be written as:
y=(a.sub.i.sub._m*2.sup.ai.sup._.sub.e*X)>>(n+mp)+b.sub.i(11)
[0090] Actually, to keep a high accuracy depending on the exponent, equation (11) is replaced by the following:
y=(a.sub.i.sub._m*X)>>(n+ma.sub.i.sub._ep)+b.sub.i(12)
that is equivalent to
y=(a.sub.i.sub._m*X)/2.sup.(n+mai.sup._.sup.ep)+b.sub.i(13)
[0091] Thanks to this process, the accuracy obtained for the output value y is adapted to the amplitude of the slope value.
[0092] In summary, this second embodiment of the method for determining an output value y representing a picture data then comprises: [0093] 1. obtaining (50,
y=(a.sub.i.sub._m*X)>>(n+ma.sub.i.sub._ep)+b.sub.i(14)
[0100] 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*2.sup.m)/2.sup.m, with m depending on the length of the segment Ri. In second embodiment, an approximation of ai can be obtained from Int(ai*2.sup.ai.sup._.sup.e)/2.sup.ai.sup._.sup.e, and ai_e is non-fixed.
[0101]
[0102] Device 30 comprises following elements that are linked together by a data and address bus 31: [0103] a microprocessor 32 (or CPU), which is, for example, a DSP (or Digital Signal Processor); [0104] a ROM (or Read Only Memory) 33; [0105] a RAM (or Random Access Memory) 34; [0106] an I/O interface 35 for reception of data to transmit, from an application; and [0107] a battery 36
[0108] 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.
[0109] 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.
[0110] 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.
[0111] In accordance with examples, device 30 being configured to implement a method described in relation with
[0122] According to an example of the present principles, illustrated in
[0123] 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.
[0124] 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: [0125] slope0_category [0126] the number NC of changing points [0127] the set of changing points Ji, for i=0 . . . NC1
[0128] 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.
[0129] The instructions may form an application program tangibly embodied on a processor-readable medium.
[0130] 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.
[0131] 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.
[0132] 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.