Image encoding method and apparatus, and image decoding method and apparatus
AssigneeShenzhen Yinwang Intelligent Technologies Co., Ltd.
InventorsYongbing Lin, Sha Ma
Life of this patent
Estimating the term…
Abstract
An image encoding method includes a color difference signal Cr corresponding to a first pixel and a color difference signal Cb corresponding to a second pixel that are determined based on a pixel value of the first pixel, a pixel value of the second pixel, and pixel values of a third pixel and a fourth pixel that are adjacent to the first pixel. Then, an average value Co of the color difference signal Cr corresponding to the first pixel and the color difference signal Cb corresponding to the second pixel, and a difference value Cg between the color difference signal Cr and the color difference signal Cb are determined.
Claims20
An image encoding method comprising:
- obtaining, in a first image, each of a first pixel, a second pixel, a third pixel adjacent to the first pixel, and a fourth pixel adjacent to the first pixel;
- determining, in the first image, a first color difference signal (Cr) corresponding to the first pixel based on a first pixel value of the first pixel, on a third pixel value of the third pixel, and on a fourth pixel value of the fourth pixel;
- determining, in the first image, a second color difference signal (Cb) corresponding to the second pixel based on a second pixel value of the second pixel, on the third pixel value, and on the fourth pixel value, wherein color components of the third pixel and the fourth pixel are the same, and wherein color components of the first pixel, the second pixel, and the third pixel are different;
- determining a first average value (Co) of Cr and the Cb and a first difference value (Cg) between the Cr and the Cb;
- determining a second difference value (Dg) between the third pixel value and the fourth pixel value;
- determining a second average value (Y) of the first pixel value, the second pixel value, the third pixel value, and the fourth pixel value;
- and
- outputting the Dg, the Y, the Co, and the Cg.
An image decoding method comprising:
- determining, in a first image, a first difference value between a first average value (Co) and half of a second difference value (Cg) as a first color difference signal (Cr) corresponding to a first pixel;
- determining, in the first image, a sum of the Co and half of the Cg as a second color difference signal (Cb) corresponding to a second pixel, wherein the Co is an average of the Cr and the Cb, and wherein the Cg is a difference between the Cr and the Cb;
- and
- determining a first pixel value of the first pixel, a second pixel value of the second pixel, a third pixel value of a third pixel, and a fourth pixel value of a fourth pixel based on the Cr and the Cb, on a third difference value (Dg) between the third pixel value and the fourth pixel value, and a second average value (Y) of the first pixel value, the second pixel value, on the third pixel value, and on the fourth pixel value,
- wherein color components of the third pixel and the fourth pixel are the same, and
- wherein color components of the first pixel, the second pixel, and the third pixel are different.
An apparatus comprising:
- a memory configured to store instructions;
- and
- a processor coupled to the memory and configured to execute the instructions to cause the apparatus to:
- obtain, in a first image, each of a first pixel, a second pixel, a third pixel adjacent to the first pixel, and a fourth pixel adjacent to the first pixel;
- determine, in the first image, a first color difference signal (Cr) corresponding to the first pixel based on a first pixel value of the first pixel, on a third pixel value of the third pixel, and on a fourth pixel value of the fourth pixel;
- determine, in the first image, a first color difference signal (Cb) corresponding to the second pixel based on a second pixel value of the second pixel, on the third pixel value, and on the fourth pixel value, wherein color components of the third pixel and the fourth pixel are the same, and wherein color components of the first pixel, the second pixel, and the third pixel are different;
- determine a first average value (Co) of the Cr and the Cb and a first difference value (Cg) between the Cr and the Cb;
- determine a second difference value (Dg) between the third pixel value and the fourth pixel value;
- determine a second average value (Y) of the first pixel value, the second pixel value, the third pixel value, and the fourth pixel value;
- and
- output the Dg, the Y, the Co, and the Cg.
Dependencies are inferred from the claim text.