CN111050166A - Prediction mode determination method, apparatus, and computer-readable storage medium - Google Patents

Prediction mode determination method, apparatus, and computer-readable storage medium Download PDF

Info

Publication number
CN111050166A
CN111050166A CN201911216418.5A CN201911216418A CN111050166A CN 111050166 A CN111050166 A CN 111050166A CN 201911216418 A CN201911216418 A CN 201911216418A CN 111050166 A CN111050166 A CN 111050166A
Authority
CN
China
Prior art keywords
prediction mode
value
motion type
lcu
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911216418.5A
Other languages
Chinese (zh)
Other versions
CN111050166B (en
Inventor
王�琦
程志鹏
潘兴浩
何俊辰
任锐
陈磊
孙松林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing University of Posts and Telecommunications
MIGU Video Technology Co Ltd
Original Assignee
Beijing University of Posts and Telecommunications
MIGU Video Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing University of Posts and Telecommunications, MIGU Video Technology Co Ltd filed Critical Beijing University of Posts and Telecommunications
Priority to CN201911216418.5A priority Critical patent/CN111050166B/en
Publication of CN111050166A publication Critical patent/CN111050166A/en
Application granted granted Critical
Publication of CN111050166B publication Critical patent/CN111050166B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention provides a prediction mode determination method, a prediction mode determination device and a computer-readable storage medium. The prediction mode determining method comprises the following steps: determining a first motion type of a target Largest Coding Unit (LCU) in an ith frame image, wherein i is an integer greater than 1; and determining a first prediction mode of the target LCU according to the corresponding relation between the motion type and the prediction mode and the first motion type. Therefore, the method and the device can improve the efficiency of determining the prediction mode of the LCU.

Description

Prediction mode determination method, apparatus, and computer-readable storage medium
Technical Field
The present invention relates to the field of video technologies, and in particular, to a method and an apparatus for determining a prediction mode, and a computer-readable storage medium.
Background
Currently, an ergodic algorithm is used for selecting a prediction mode of a Coding Unit (CU), and in one mode, a suitable prediction mode is selected by traversing all prediction modes; alternatively, several most probable prediction modes may be selected for traversal, and if no suitable prediction mode is found, other prediction modes may be traversed.
It can be seen that the prediction mode determination of the existing CU is inefficient.
Disclosure of Invention
Embodiments of the present invention provide a prediction mode determination method, a device, and a computer-readable storage medium, so as to solve the problem that the efficiency of determining a prediction mode of an existing CU is low.
In order to solve the problems, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a prediction mode determining method, where the method includes:
determining a first motion type of a target Largest Coding Unit (LCU) in an ith frame image, wherein i is an integer greater than 1;
and determining a first prediction mode of the target LCU according to the corresponding relation between the motion type and the prediction mode and the first motion type.
Optionally, the determining a first motion type of a target largest coding unit LCU in an ith frame image includes:
determining a first motion type of a target Largest Coding Unit (LCU) in an ith frame image if the ith frame image satisfies a first condition;
wherein the ith frame image satisfies a first condition including any one of:
the pixel difference between the ith frame image and the (i-1) th frame image is smaller than a first value;
the motion types of first LCUs of k frame images before the ith frame image are the same, the first LCUs and the target LCU are same-position LCUs, k is a positive integer, and i is an integer larger than k.
Optionally, in a case that the meeting of the first condition for the ith frame image includes that the pixel difference between the ith frame image and the (i-1) th frame image is smaller than a first value, the determining the first motion type of the target largest coding unit LCU in the ith frame image includes:
determining the first motion type from a reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
Optionally, in a case that the feature information includes a prediction mode of each coding unit CU in an LCU of a frame image, the determining the first motion type according to the reference queue includes:
determining M second LCUs in the reference queue according to the target LCU, wherein the M second LCUs and the target LCU are co-located LCUs, the M second LCUs comprise S CUs, L mutually different prediction modes exist in the S prediction modes of the S CUs, L is a positive integer smaller than or equal to S, S is an integer larger than or equal to M, and M is a positive integer;
and determining the first motion type according to L first scale values corresponding to the L prediction modes, wherein each first scale value is the value of the quantity ratio S of the corresponding prediction mode.
Optionally, the determining the first motion type according to the L first scale values corresponding to the L prediction modes includes:
executing the first judgment to obtain a first judgment result;
determining the first motion type according to the first judgment result;
wherein the first determination comprises at least one of:
judging whether a first proportional value corresponding to the Skip prediction mode in the L first proportional values is larger than a second value or not;
under the condition that the target LCU is a boundary LCU, judging whether a first proportional value corresponding to a Direct prediction mode in the L first proportional values is larger than a third value or not;
judging whether a first proportion value corresponding to a second prediction mode in the L first proportion values is larger than a fourth value, wherein the second prediction mode is a first part prediction mode in the L prediction modes;
judging whether a first proportion value corresponding to a third prediction mode in the L first proportion values is smaller than a fifth value, wherein the third prediction mode is a second part prediction mode in the L prediction modes;
wherein the second value is greater than the fifth value, the third value is greater than the fifth value, and the fourth value is greater than the fifth value.
Optionally, the determining the first motion type according to the first determination result includes at least one of:
determining that the first motion type is a target motion type under the condition that the first judgment result meets a second condition;
determining that the first motion type is a common motion type under the condition that the first judgment result does not meet the second condition;
wherein the first judgment result meeting the second condition comprises at least one of the following:
a first scale value corresponding to the Skip prediction mode in the L first scale values is larger than the second value;
a first proportional value corresponding to a Direct prediction mode in the L first proportional values is greater than the third value;
a first proportion value corresponding to a second prediction mode in the L first proportion values is larger than the fourth value;
a first ratio value corresponding to a third prediction mode among the L first ratio values is smaller than the fifth value.
Optionally, the object motion types include: an undifferentiated stationary type, a boundary motion type, a specific motion type, and a removal specific motion type;
determining that the first motion type is a target motion type under the condition that the first judgment result meets a second condition, wherein the first motion type comprises at least one of the following items:
determining that the first motion type is an undifferentiated static type when a first scale value corresponding to the Skip prediction mode among the L first scale values is greater than the second value;
determining that the first motion type is a boundary motion type when a first proportion value corresponding to a Direct prediction mode in the L first proportion values is larger than the third value;
determining that the first motion type is a specific motion type when a first proportion value corresponding to a second prediction mode in the L first proportion values is greater than the fourth value;
and determining the first motion type as a specific motion type removal if a first proportion value corresponding to a third prediction mode among the L first proportion values is smaller than the fifth value.
Optionally, in a case that the ith frame picture satisfies the first condition, where the motion type of the first LCU of a k frame picture before the ith frame picture is the same, the determining the first motion type of the target largest coding unit LCU in the ith frame picture includes:
determining a motion type of the first LCU as the first motion type.
Optionally, a pixel difference between the i +1 th frame image and the i frame image is smaller than a first value;
after the determining the first prediction mode for the target LCU, the method further comprises:
acquiring P LCUs included in the ith frame image, wherein the P LCUs include R CUs, Q mutually different prediction modes exist in the R prediction modes of the R CUs, Q is a positive integer smaller than or equal to R, R is a positive integer larger than or equal to P, and P is a positive integer;
determining a second motion type of the target LCU according to Q second proportional values corresponding to the Q prediction modes, wherein each second proportional value is a value of the number ratio R of the corresponding prediction modes;
determining a third motion type of a third LCU in the i +1 th frame image according to a reference queue under the condition that the second motion type is different from the first motion type, wherein the third LCU and the target LCU are co-located LCUs, the reference queue comprises feature information of N frame images, and N is a positive integer;
determining a fourth prediction mode for the third LCU based on the third motion type.
Optionally, the determining a second motion type of the target LCU according to Q second proportional values corresponding to the Q prediction modes includes:
executing the second judgment to obtain a second judgment result;
determining the second motion type according to the second judgment result;
wherein the second determination comprises at least one of:
judging whether a second proportional value corresponding to the Skip prediction mode in the Q second proportional values is larger than a second value;
under the condition that the target LCU is a boundary LCU, judging whether a second proportional value corresponding to a Direct prediction mode in the Q second proportional values is larger than a third value or not;
judging whether a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than a fourth value, wherein the fifth prediction mode is a third part prediction mode in the Q prediction modes;
judging whether a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is smaller than a fifth value, wherein the sixth prediction mode is a fourth part prediction mode in the Q prediction modes;
wherein the second value is greater than the fifth value, the third value is greater than the fifth value, and the fourth value is greater than the fifth value.
Optionally, the determining the second motion type according to the second determination result includes at least one of:
determining that the first motion type is a target motion type under the condition that the second judgment result meets a third condition;
determining that the first motion type is a normal motion type when the second judgment result does not satisfy the third condition;
wherein the second determination result satisfying a third condition includes at least one of:
a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is larger than the second value;
a second proportion value corresponding to the Direct prediction mode in the Q second proportion values is larger than the third value;
a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than the fourth value;
and the second proportion value corresponding to the sixth prediction mode in the Q second proportion values is smaller than the fifth value.
Optionally, the object motion types include: an undifferentiated stationary type, a boundary motion type, a specific motion type, and a removal specific motion type;
determining that the first motion type is a target motion type under the condition that the second judgment result meets a third condition, wherein the first motion type comprises at least one of the following items:
determining that the first motion type is an undifferentiated static type under the condition that a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is larger than the second value;
determining that the first motion type is a boundary motion type under the condition that a second proportion value corresponding to a Direct prediction mode in the Q second proportion values is larger than the third value;
determining that the first motion type is a specific motion type under the condition that a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than the fourth value;
and determining the first motion type as a specific motion type under the condition that a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is smaller than the fifth value.
Optionally, after determining the first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, the method further includes:
coding the ith frame image by adopting a first coding mode to obtain a first coding result;
acquiring a first prediction mode set corresponding to the ith frame of image according to the first coding result;
acquiring a second prediction mode set corresponding to the ith frame image, wherein the determination of each prediction mode in the second prediction mode set is related to the motion type, and the second prediction mode set comprises the first prediction mode;
determining whether the second set of prediction modes matches the first set of prediction modes;
under the condition that the second prediction mode set is not matched with the first prediction mode set, encoding the (i + 1) th frame image to the (i + N-1) th frame image by adopting the first encoding mode;
wherein, in the process of encoding the frame image by adopting the first encoding mode, the determination of the prediction mode of the LCU of the frame image is independent of the motion type of the LCU.
Optionally, when the first motion type is determined based on a reference queue, after the i +1 th frame image to the i + N-1 th frame image are encoded by using the first encoding method, the method further includes:
emptying the reference queue, and adding the characteristic information from the ith frame image to the (i + N-1) th frame image into the reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
Optionally, after determining the first prediction mode of the target LCU, before determining the first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, the method further includes:
determining whether a scale value of a normal motion type among motion types of LCUs in H frame images including the ith frame image is less than a sixth value;
determining a first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, including:
under the condition that the proportion value of the common motion type in the motion types of the LCU in the H frame images is smaller than the sixth value, determining a first prediction mode of the target LCU according to the corresponding relation between the motion types and the prediction mode and the first motion type;
wherein the H frame images are continuous, and H is a positive integer.
Optionally, after determining whether a proportion value of a normal motion type of an LCU in H frame images including the ith frame image is smaller than a sixth value, the method further includes:
under the condition that the proportion value of the common motion type in the motion types of the LCUs in the H frame images is larger than or equal to the sixth value, encoding the i frame image to the (i + N-1) frame image by adopting a first encoding mode;
wherein, in the process of encoding the frame image by adopting the first encoding mode, the determination of the prediction mode of the LCU of the frame image is independent of the motion type of the LCU.
Optionally, when the first motion type is determined based on a reference queue, after the i frame image to the i + N-1 frame image are encoded in the first encoding manner, the method further includes:
emptying the reference queue, and adding the characteristic information from the ith frame image to the (i + N-1) th frame image into the reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
Optionally, after determining the first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, the method includes:
encoding a target CU in the target LCU according to the first prediction mode.
Optionally, the encoding the target CU in the target LCU according to the first prediction mode includes:
determining whether an encoding cost of the target CU in the first prediction mode is less than a seventh value;
and in the case that the coding cost of the target CU in the first prediction mode is smaller than the seventh value, coding the target CU in the first prediction mode.
Optionally, after determining whether the coding cost of the target CU in the first prediction mode is smaller than a seventh value, the method further includes:
if the coding cost of the target CU in the first prediction mode is larger than or equal to the seventh value, adopting a seventh prediction mode to code the target CU;
and the coding cost of the target CU for coding by adopting the seventh prediction mode is less than the coding cost of the target CU for coding by adopting other prediction modes.
Optionally, in a case that the first motion type is determined based on a reference queue, after the encoding the target CU in the target LCU according to the first prediction mode, the method further includes:
deleting the characteristic information of the target frame image in the reference queue, and adding the characteristic information of the ith frame image into the reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer; the target frame image meets a preset condition.
Optionally, the correspondence satisfies at least one of the following conditions:
the undifferentiated static type and the Skip prediction mode have a corresponding relation;
the boundary motion type and the Direct prediction mode have a corresponding relation;
the specific motion type has a corresponding relation with a second prediction mode, and the second prediction mode is a first part prediction mode in the L prediction modes;
removing a specific motion type from corresponding relation with a prediction mode except a third prediction mode, wherein the third prediction mode is a second part prediction mode in the L prediction modes;
the common motion type has a corresponding relation with all the prediction modes;
wherein the L prediction modes are associated with the target LCU, L being a positive integer.
In a second aspect, an embodiment of the present invention further provides a prediction mode determining method, where the method includes:
determining a first motion type of a target Largest Coding Unit (LCU) in an ith frame image under the condition that the pixel difference between the ith frame image and an (i-1) th frame image is smaller than a first value, wherein i is an integer larger than 1;
and determining a first prediction mode of the target LCU according to the corresponding relation between the motion type and the prediction mode and the first motion type.
Optionally, the determining a first motion type of a target largest coding unit LCU in an ith frame image includes:
acquiring a reference queue, wherein the reference queue comprises feature information of N frame images, the feature information comprises a prediction mode of each coding unit CU in an LCU of the frame images, and N is a positive integer;
determining M second LCUs in the reference queue according to the target LCU, wherein the M second LCUs and the target LCU are co-located LCUs, the M second LCUs comprise S CUs, L mutually different prediction modes exist in the S prediction modes of the S CUs, L is a positive integer smaller than or equal to S, S is an integer larger than or equal to M, and M is a positive integer;
and determining the first motion type according to L first scale values corresponding to the L prediction modes, wherein each first scale value is the value of the quantity ratio S of the corresponding prediction mode.
Optionally, the determining the first motion type according to the L first scale values corresponding to the L prediction modes includes:
judging whether a first proportional value corresponding to the Skip prediction mode in the L first proportional values is larger than a second value or not;
under the condition that a first proportion value corresponding to a Skip prediction mode in the L first proportion values is smaller than or equal to the second value, judging whether a first proportion value corresponding to a second prediction mode in the L first proportion values is larger than a fourth value;
under the condition that a first proportion value corresponding to a second prediction mode in the L first proportion values is smaller than or equal to the fourth value, judging whether a first proportion value corresponding to a third prediction mode in the L first proportion values is smaller than a fifth value;
determining that the first motion type is a specific motion type removed under the condition that a first proportional value corresponding to a third prediction mode in the L first proportional values is smaller than the fifth value;
wherein the second prediction mode is a first partial prediction mode of the L prediction modes; the third prediction mode is a second partial prediction mode of the L prediction modes; the second value is greater than the fifth value and the fourth value is greater than the fifth value.
Optionally, when the target LCU is a boundary LCU, and the first ratio value corresponding to the second prediction mode in the L first ratio values is smaller than or equal to the fourth value, determining whether the first ratio value corresponding to the third prediction mode in the L first ratio values is smaller than a fifth value, includes:
under the condition that a first proportion value corresponding to a second prediction mode in the L first proportion values is smaller than or equal to the fourth value, judging whether a first proportion value corresponding to a Direct prediction mode in the L first proportion values is larger than a third value or not;
under the condition that a first proportional value corresponding to a Direct prediction mode in the L first proportional values is smaller than or equal to the third value, judging whether a first proportional value corresponding to a second prediction mode in the L first proportional values is larger than a fourth value;
wherein the third value is greater than the fifth value.
Optionally, the method further includes:
determining that the first motion type is an undifferentiated static type when a first scale value corresponding to the Skip prediction mode among the L first scale values is greater than the second value;
determining that the first motion type is a boundary motion type when a first proportion value corresponding to a Direct prediction mode in the L first proportion values is larger than the third value;
determining that the first motion type is a specific motion type when a first proportion value corresponding to a second prediction mode in the L first proportion values is greater than the fourth value;
and determining that the first motion type is a normal motion type when a first proportion value corresponding to a third prediction mode in the L first proportion values is greater than or equal to the fifth value.
Optionally, the correspondence satisfies at least one of the following conditions:
the undifferentiated static type and the Skip prediction mode have a corresponding relation;
the boundary motion type and the Direct prediction mode have a corresponding relation;
the specific motion type has a corresponding relation with a second prediction mode, and the second prediction mode is a first part prediction mode in the L prediction modes;
removing a specific motion type from corresponding relation with a prediction mode except a third prediction mode, wherein the third prediction mode is a second part prediction mode in the L prediction modes;
the common motion type has a corresponding relation with all the prediction modes;
wherein the L prediction modes are associated with the target LCU, L being a positive integer.
Optionally, after determining the first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, the method further includes:
encoding a target CU in the target LCU according to the first prediction mode.
Optionally, the encoding the target CU in the target LCU according to the first prediction mode includes:
determining whether an encoding cost of the target CU in the first prediction mode is less than a seventh value;
and in the case that the coding cost of the target CU in the first prediction mode is smaller than the seventh value, coding the target CU in the first prediction mode.
Optionally, after determining whether the coding cost of the target CU in the first prediction mode is smaller than a seventh value, the method further includes:
if the coding cost of the target CU in the first prediction mode is larger than or equal to the seventh value, adopting a seventh prediction mode to code the target CU;
and the coding cost of the target CU for coding by adopting the seventh prediction mode is less than the coding cost of the target CU for coding by adopting other prediction modes.
Optionally, in a case that the first motion type is determined based on a reference queue, after the encoding the target CU in the target LCU according to the first prediction mode, the method further includes:
updating the reference queue by using the ith frame image according to a first-in first-out rule;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
Optionally, after determining the first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, the method further includes:
coding the ith frame image by adopting a first coding mode to obtain a first coding result;
acquiring a first prediction mode set corresponding to the ith frame of image according to the first coding result;
acquiring a second prediction mode set corresponding to the ith frame image, wherein the determination of each prediction mode in the second prediction mode set is related to the motion type, and the second prediction mode set comprises the first prediction mode;
determining whether the second set of prediction modes matches the first set of prediction modes;
under the condition that the second prediction mode set is not matched with the first prediction mode set, encoding the (i + 1) th frame image to the (i + N-1) th frame image by adopting the first encoding mode;
wherein, in the process of encoding the frame image by adopting the first encoding mode, the determination of the prediction mode of the LCU of the frame image is independent of the motion type of the LCU.
Optionally, when the first motion type is determined based on a reference queue, after the i +1 th frame image to the i + N-1 th frame image are encoded by using the first encoding method, the method further includes:
emptying the reference queue, and adding the characteristic information from the ith frame image to the (i + N-1) th frame image into the reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
Optionally, after determining the first prediction mode of the target LCU, before determining the first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, the method further includes:
determining whether a scale value of a normal motion type among motion types of LCUs in H frame images including the ith frame image is less than a sixth value;
determining a first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, including:
under the condition that the proportion value of the common motion type in the motion types of the LCU in the H frame images is smaller than the sixth value, determining a first prediction mode of the target LCU according to the corresponding relation between the motion types and the prediction mode and the first motion type;
wherein the H frame images are continuous, and H is a positive integer.
Optionally, after determining whether a proportion value of a normal motion type of an LCU in H frame images including the ith frame image is smaller than a sixth value, the method further includes:
under the condition that the proportion value of the common motion type in the motion types of the LCUs in the H frame images is larger than or equal to the sixth value, encoding the i frame image to the (i + N-1) frame image by adopting a first encoding mode;
wherein, in the process of encoding the frame image by adopting the first encoding mode, the determination of the prediction mode of the LCU of the frame image is independent of the motion type of the LCU.
Optionally, when the first motion type is determined based on a reference queue, after the i frame image to the i + N-1 frame image are encoded in the first encoding manner, the method further includes:
emptying the reference queue, and adding the characteristic information from the ith frame image to the (i + N-1) th frame image into the reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
Optionally, after determining the first motion type of the target largest coding unit LCU in the ith frame image, the method includes:
determining a motion type of a fifth LCU of an i + F +1 frame image as the first motion type, in case that the motion type of a fourth LCU of F frame images subsequent to the i frame image is the first motion type;
wherein the fourth LCU and the target LCU are co-located LCUs, and the fifth LCU and the target LCU are co-located LCUs; f is a positive integer.
Optionally, a pixel difference between the i + F +2 frame image and the i + F +1 frame image is smaller than a first value;
after the determining the motion type of the fifth LCU of the (i + F + 1) th frame image as the first motion type, the method further comprises:
obtaining P LCUs included in the i + F +1 th frame image, wherein the P LCUs include R CUs, Q mutually different prediction modes exist in the R prediction modes of the R CUs, Q is a positive integer smaller than or equal to R, R is a positive integer larger than or equal to P, and P is a positive integer;
determining a second motion type of the target LCU according to Q second proportional values corresponding to the Q prediction modes, wherein each second proportional value is a value of the number ratio R of the corresponding prediction modes;
determining a third motion type of a third LCU of the i + F +2 th frame image according to a reference queue under the condition that the second motion type is different from the first motion type, wherein the third LCU and the target LCU are co-located LCUs, the reference queue comprises feature information of N frame images, and N is a positive integer;
determining a fourth prediction mode for the third LCU based on the third motion type.
Optionally, determining the second motion type of the target LCU according to Q second proportional values corresponding to the Q prediction modes includes:
judging whether a second proportional value corresponding to the Skip prediction mode in the Q second proportional values is larger than a second value or not;
under the condition that a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is smaller than or equal to the second value, judging whether a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than a fourth value;
under the condition that a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is smaller than or equal to the fourth value, judging whether a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is smaller than a fifth value or not;
determining that the second motion type of the target LCU is a specific motion type removed under the condition that a second proportional value corresponding to a sixth prediction mode in the Q second proportional values is smaller than the fifth value;
wherein the fifth prediction mode is a third partial prediction mode of the Q prediction modes; the sixth prediction mode is a fourth partial prediction mode of the Q prediction modes; the second value is greater than the fifth value and the fourth value is greater than the fifth value.
Optionally, when the target LCU is a boundary LCU, and when a second ratio value corresponding to a Skip prediction mode in the Q second ratio values is smaller than or equal to the second value, determining whether a second ratio value corresponding to a fifth prediction mode in the Q second ratio values is larger than a fourth value, includes:
under the condition that a second proportional value corresponding to the Skip prediction mode in the Q second proportional values is smaller than or equal to the second value, judging whether the second proportional value corresponding to the Direct prediction mode in the Q second proportional values is larger than a third value or not;
under the condition that a second proportion value corresponding to a Direct prediction mode in the Q second proportion values is larger than or equal to the third value, judging whether a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than a fourth value or not;
wherein the third value is greater than the fifth value.
Optionally, the method further includes:
determining that a second motion type of the target LCU is an undifferentiated stationary type when a second scale value corresponding to the Skip prediction mode among the Q second scale values is greater than the second value;
determining that the second motion type of the target LCU is a boundary motion type when a second proportional value corresponding to a Direct prediction mode among the Q second proportional values is greater than the third value;
determining that the second motion type of the target LCU is a specific motion type when a second proportion value corresponding to a fifth prediction mode among the Q second proportion values is greater than the fourth value;
determining that the second motion type of the target LCU is a normal motion type when a second proportion value corresponding to a sixth prediction mode among the Q second proportion values is greater than or equal to the fifth value.
In a third aspect, an embodiment of the present invention further provides a prediction mode determining device, where the prediction mode determining device includes:
a first determining module, configured to determine a first motion type of a target largest coding unit LCU in an ith frame image, i being an integer greater than 1;
a second determining module, configured to determine a first prediction mode of the target LCU according to a correspondence between a motion type and a prediction mode and the first motion type.
In a fourth aspect, an embodiment of the present invention further provides a prediction mode determining apparatus, where the prediction mode determining apparatus includes:
a third determining module, configured to determine a first motion type of a target largest coding unit LCU in an ith frame image if a pixel difference between the ith frame image and an (i-1) th frame image is smaller than a first value, where i is an integer greater than 1;
a fourth determining module, configured to determine the first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type.
In a fifth aspect, an embodiment of the present invention further provides a prediction mode determining apparatus, including: a transceiver, a memory, a processor, and a computer program stored on the memory and executable on the processor; wherein the processor is configured to read the program in the memory to implement the steps of the method according to the first aspect or the steps of the method according to the second aspect.
In a fourth aspect, the present invention further provides a computer-readable storage medium for storing a computer program, where the computer program is executed by a processor to implement the steps in the method according to the first aspect or the steps in the method according to the second aspect.
In an embodiment of the present invention, a prediction mode determination device determines a first motion type of a target largest coding unit LCU in an ith frame image, i being an integer greater than 1; and determining a first prediction mode of the target LCU according to the corresponding relation between the motion type and the prediction mode and the first motion type. Therefore, the prediction mode of the LCU can be determined according to the motion type of the LCU, and the efficiency of determining the prediction mode of the LCU can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1a is a diagram of coding effects provided by an embodiment of the present invention;
FIG. 1b is a second diagram of the encoding effect provided by the embodiment of the present invention;
FIG. 1c is a third diagram of the coding effect provided by the embodiment of the present invention;
FIG. 2a is a diagram of the encoding effect provided by the embodiment of the present invention;
FIG. 2b is a fifth diagram of the encoding effect provided by the embodiment of the present invention;
FIG. 2c is a sixth diagram of the encoding effect provided by the embodiment of the present invention;
FIG. 3a is a seventh diagram of the encoding effect provided by the embodiment of the present invention;
FIG. 3b is an eighth diagram of the encoding effect provided by the embodiment of the present invention;
FIG. 3c is a ninth diagram of the encoding effect provided by the embodiment of the present invention;
FIG. 4a is a diagram of coding effects provided by an embodiment of the present invention;
FIG. 4b is an eleventh illustration of the encoding effect provided by the embodiment of the present invention;
FIG. 4c is a diagram of the coding effect provided by the embodiment of the present invention;
FIG. 5 is a flowchart illustrating a method for determining a prediction mode according to an embodiment of the present invention;
FIG. 6 is a second flowchart illustrating a prediction mode determination method according to an embodiment of the present invention;
FIG. 7 is a third flowchart illustrating a prediction mode determination method according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a prediction mode determination device according to an embodiment of the present invention;
fig. 9 is a second schematic structural diagram of a prediction mode determining apparatus according to an embodiment of the present invention;
fig. 10 is a third schematic structural diagram of a prediction mode determining apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
For convenience of understanding, some contents related to the embodiments of the present invention are described below.
In the embodiment of the present invention, a motion type of a Largest Coding Unit (LCU) is defined.
Alternatively, the motion type of the LCU may be defined based on the image of the LCU. The following are exemplary:
1) if the image of the LCU is substantially still and the same, the motion type of the LCU may be defined as a nondifferential still type;
2) if the LCU is positioned at the image boundary, the shot for shooting the video moves along a certain direction, and the image of the LCU is basically static, and the motion type of the LCU can be defined as a boundary motion type;
3) the motion type of the LCU may be defined as a specific motion type if the image of the LCU is in a motion state.
It should be understood that the above definition of the motion type of the LCU is only an example, and the embodiment of the present invention does not limit the definition of the motion type of the LCU.
In an embodiment of the present invention, the motion type of the LCU is mainly used to determine the prediction mode of the LCU. Therefore, there is a correspondence between the motion type and the prediction mode. In a specific implementation, in the correspondence between the motion types and the prediction modes, one motion type may correspond to one or more prediction modes, and may be specifically set according to actual needs, which is not limited in the embodiment of the present invention.
In an embodiment of the present invention, the prediction mode may include: intra (Intra) prediction mode, Inter (Inter) prediction mode, Skip prediction mode, Direct (Direct) prediction mode, Intra Block Copy (IBC) prediction mode.
In practical applications, the prediction mode corresponding to the motion type can be determined by analyzing the encoded frame image. Specifically, for the encoded frame image, the motion type of the LCU may be determined by analyzing the image of the LCU, and the prediction mode of the LCU may be determined by the encoding result of a Coding Unit (CU) in the LCU, so that the prediction mode corresponding to the motion type may be determined. Therefore, the prediction mode determining device can select a proper prediction mode according to the motion type of the LCU, and the coding effect of the LCU is improved.
For ease of understanding, examples are illustrated below:
in a low-latency P Main file encoding (LDP-Main) mode, the encoding results of the following image sequences are analyzed.
Fig. 1a to 1c show 3 consecutive visual images of the encoding result obtained by encoding 352 × 288 low motion (akiyo) reference sequences.
The result of the encoding of the image shown in FIG. 1a is: a Quantization Parameter (QP) value of 45; the total number of prediction modes used is 41 (i.e. the image of fig. 1a is divided into 41 CUs), where the number of times of use of Skip prediction mode is 40, the number of times of use of Direct prediction mode is 1, and the number of times of use of Intra prediction mode, Inter prediction mode, and IBC prediction mode are all 0.
The result of the encoding of the image shown in FIG. 1b is: QP value of 45; the total number of prediction modes used is 47 (i.e. the image of fig. 1a is divided into 47 CUs), wherein the number of times of use of Skip prediction mode is 46, the number of times of use of Direct prediction mode is 1, and the number of times of use of Intra prediction mode, Inter prediction mode, and IBC prediction mode is 0.
The result of the encoding of the image shown in FIG. 1c is: QP value of 45; the total number of prediction modes used is 50 (i.e. the image of fig. 1c is divided into 50 CUs), wherein the number of times of use of Skip prediction mode is 49, the number of times of use of Direct prediction mode is 1, and the number of times of use of Intra prediction mode, Inter prediction mode, and IBC prediction mode is 0.
Analyzing the encoding results of the images shown in fig. 1a to 1c, it can be seen that: the LCUs of the pictures shown in fig. 1a to 1c are basically encoded using Skip prediction mode. As shown in fig. 1a and 1b, it can be seen that the image contents of LCUs belonging to background blocks are similar, less variable, and of the undifferentiated still type; and the LCU belonging to the moving body can basically judge the undifferentiated stillness type due to the small moving amplitude.
Fig. 2a to 2c show 3 consecutive visible images of the result of encoding a 1920 × 1080 Basketball (Basketball) reference sequence image. The sequence is characterized in that the lens moves left and right, and the motion body moves violently.
The result of the encoding of the image shown in fig. 2a is: QP value of 45; the total number of prediction modes used is 841 (i.e. the picture in fig. 2a is divided into 841 CUs), where the number of times of use of Intra prediction mode is 98, the number of times of use of Inter prediction mode is 89, the number of times of use of Skip prediction mode is 482, the number of times of use of Direct prediction mode is 172, and the number of times of use of IBC prediction mode is 0.
The result of the encoding of the image shown in fig. 2b is: QP value of 45; the total number of prediction modes used is 994 (i.e. the image of fig. 2b is divided into 994 CUs), wherein the number of times of use of the Intra prediction mode is 198, the number of times of use of the Inter prediction mode is 59, the number of times of use of the Skip prediction mode is 475, the number of times of use of the Direct prediction mode is 262, and the number of times of use of the IBC prediction mode is 0.
The result of the encoding of the image shown in fig. 2c is: QP value of 45; the total number of prediction modes used is 883 (i.e. the picture of fig. 2c is divided into 883 CUs), where the number of times of Intra prediction mode usage is 171, the number of times of Inter prediction mode usage is 70, the number of times of Skip prediction mode usage is 464, the number of times of Direct prediction mode usage is 178, and the number of times of IBC prediction mode usage is 0.
Analyzing the encoding results of the images shown in fig. 2a to 2c yields: LCUs positioned at the left and right boundaries are coded in a Direct prediction mode; LCUs belonging to background blocks are mostly coded in Skip prediction mode; the CUs in the LCU indicated by the bold line box are mainly coded in Direct prediction mode and Intra prediction mode.
In addition, the motion types of the LCUs located at the left and right boundaries belong to boundary motion types; the motion type of the LCU belonging to the background block belongs to an undifferentiated stationary type; the LCUs indicated by the bold line boxes are of a particular type of motion for Direct and Intra.
Fig. 3a to 3c show 3 consecutive encoded-result visual images obtained by encoding 1280 × 720 City (City) reference sequence images.
The result of the encoding of the image shown in fig. 3a is: QP value of 45; the total number of prediction modes used is 219 (i.e. the picture of fig. 3a is divided into 219 CUs), where the number of uses of Inter prediction mode is 6, the number of uses of Skip prediction mode is 213, and the number of uses of Intra prediction mode, Direct prediction mode, and IBC prediction mode are all 0.
The result of the encoding of the image shown in fig. 3b is: QP value of 45; the total number of prediction modes used is 353 (i.e. the image of fig. 3b is divided into 353 CUs), where the number of times of use of the Intra prediction mode is 3, the number of times of use of the Inter prediction mode is 9, the number of times of use of the Skip prediction mode is 333, the number of times of use of the Direct prediction mode is 8, and the number of times of use of the IBC prediction mode is 0.
The result of the encoding of the image shown in fig. 3c is: QP value of 45; the total number of prediction modes used is 240 (i.e. the image of fig. 3c is divided into 240 CUs), where the number of uses of Intra prediction mode is 1, the number of uses of Inter prediction mode is 14, the number of uses of Skip prediction mode is 224, the number of uses of Direct prediction mode is 1, and the number of uses of IBC prediction mode is 0.
Analyzing the encoding results of the images shown in fig. 3a to 3c yields: for a slow-moving texture-refinement building, especially for CUs in the two LCUs of the red box, the Inter prediction mode is more likely to be used, belonging to a specific motion type for the Inter prediction mode.
Fig. 4a to 4c are 3 consecutive coded result visual images obtained by coding a 1920 × 1080 Cactus (Cactus) reference sequence image. In this sequence, the cactus rotates horizontally clockwise and the card rotates clockwise on the wall.
The result of the encoding of the image shown in fig. 4a is: QP value of 27; the total number of prediction modes used is 4211 (i.e. the image of fig. 4a is divided into 4211 CUs), wherein the number of times of use of the Intra prediction mode is 278, the number of times of use of the Inter prediction mode is 281, the number of times of use of the Skip prediction mode is 1751, the number of times of use of the Direct prediction mode is 1901, and the number of times of use of the IBC prediction mode is 0.
The result of the encoding of the image shown in fig. 4b is: QP value of 27; the total number of prediction modes used is 4349 (i.e. the image of fig. 4b is divided into 4349 CUs), where the number of uses of Intra prediction mode is 230, the number of uses of Inter prediction mode is 318, the number of uses of Skip prediction mode is 1376, the number of uses of Direct prediction mode is 2425, and the number of uses of IBC prediction mode is 0.
The result of the encoding of the image shown in fig. 4c is: QP value of 27; the total number of prediction modes used is 3918 (i.e. the image of fig. 4c is divided into 3918 CUs), wherein the number of uses of Intra prediction mode is 177, the number of uses of Inter prediction mode is 297, the number of uses of Skip prediction mode is 1394, the number of uses of Direct prediction mode is 2050, and the number of uses of IBC prediction mode is 0.
Analyzing the encoding results of the images shown in fig. 4a to 4c yields: CUs in the LCU of the cactus mostly take Direct prediction type coding as a main part and belong to specific motion types aiming at the Direct prediction types; for cards rotating clockwise on the wall, the CU in the LCU is mostly encoded in the Inter prediction mode, and belongs to a specific motion type for the Inter prediction mode.
Analysis of a large number of experimental results including fig. 1a to 4c shows that the motion types of the image contents of the adjacent frames have strong correlation and correspondence with the optimal prediction mode. The concrete can be represented as follows:
1) if the motion type of the LCU is an undifferentiated stationary type, basically using Skip prediction mode; in other words, most LCUs coded in Skip prediction mode are undifferentiated stationary types;
2) if the motion type of the LCU is a boundary motion type, basically using a Direct prediction mode; in other words, most of the boundary LCUs coded in Direct prediction mode are boundary motion types;
3) if the motion type of the LCU is a specific motion type, selecting an optimal prediction mode according to the characteristics of different specific motion types, wherein the optimal prediction mode is mainly a Direct prediction mode, an Inter prediction mode and an Intra prediction mode, and the orthotopic LCU has similarity in the selection of the prediction modes; in other words, most of the image content of the LCU encoded in the Direct prediction mode, Inter prediction mode, and Intra prediction mode is moving.
It should be noted that the correspondence between the motion type and the prediction mode is merely an example, and the concrete expression of the correspondence between the motion type and the prediction mode is not limited.
As can be seen from the foregoing, the motion type of the LCU may be used to determine the prediction mode of the LCU, and therefore, in the embodiment of the present invention, for the LCU to be encoded, the prediction mode determining apparatus may determine the prediction mode of the LCU by using a fast algorithm, that is, determining the motion type of the LCU first, and then determining the prediction mode of the LCU according to the motion type of the LCU. In this way, the rate of prediction mode determination for the LCU may be increased compared to when the prediction mode determination device determines the prediction mode for the LCU in a traversal manner.
The following describes a prediction mode determination method according to an embodiment of the present invention.
Referring to fig. 5, fig. 5 is a flowchart illustrating a prediction mode determination method according to an embodiment of the present invention. As shown in fig. 5, the prediction mode determination method according to an embodiment of the present invention may include the steps of:
step 501, determining a first motion type of a target largest coding unit LCU in an ith frame image, wherein i is an integer greater than 1.
In the embodiment of the present invention, an image of a first frame in a Group of pictures (Group of Picture) may be regarded as a first frame image, an image of a second frame may be regarded as a second frame image, an image of an ith frame may be regarded as an ith frame image, and so on.
In a specific implementation, the ith frame Picture may be a forward predictive coded frame (P frame) or a bidirectional predictive interpolated coded frame (B frame) in a Group of pictures (Group of Picture); the target LCU may be any one of LCUs in the ith frame image.
Step 502, determining a first prediction mode of the target LCU according to the corresponding relationship between the motion type and the prediction mode and the first motion type.
In a specific implementation, the prediction mode determining device may determine the prediction mode corresponding to the first motion type according to the correspondence between the motion type and the prediction mode, and then determine the first prediction mode according to the prediction mode corresponding to the first motion type.
The following describes determining the first prediction mode according to the prediction mode corresponding to the first motion type.
In a first implementation, the prediction mode determination device may determine the first prediction mode directly according to the prediction mode corresponding to the first motion type. That is, the first prediction mode belongs to a prediction mode corresponding to the first motion type.
In a specific implementation, in a case that the number of prediction modes corresponding to the first motion type is 1, the prediction mode determination device may directly determine the prediction mode corresponding to the first motion type as the first prediction mode.
In the case that the number of prediction modes corresponding to the first motion type is greater than 1, the prediction mode determination device may determine, as the first prediction mode, a prediction mode with a smallest coding cost among the prediction modes corresponding to the first motion type, so that the coding cost of the target LCU may be reduced.
In a second implementation manner, after the prediction mode corresponding to the first motion type is determined, the minimum coding cost of the target LCU in the prediction mode corresponding to the first motion type is compared with a coding cost threshold to obtain a comparison result, and then the first prediction mode is determined according to the comparison result.
If the coding cost is less than the seventh value, the coding cost is smaller; if the coding cost is larger than or equal to the seventh value, the coding cost is larger. In practical applications, the seventh value may be set according to actual requirements, which is not limited in the embodiment of the present invention.
Therefore, if the comparison result shows that the minimum coding cost is smaller than the coding cost threshold, a first implementation manner may be adopted to determine the prediction mode with the minimum coding cost in the prediction modes corresponding to the first motion type as the first prediction mode.
If the comparison result is that the minimum coding result is greater than or equal to the coding cost threshold, the first prediction mode with lower coding cost can be determined in other modes, such as a traversal mode, so that the coding cost of the target LCU can be reduced. It can be seen that in this case, the first prediction mode is different from the prediction mode corresponding to the first motion type.
The prediction mode determining method of the embodiment may determine the prediction mode of the LCU according to the motion type of the LCU, so as to improve the efficiency of determining the prediction mode of the LCU, and further improve the coding efficiency of the LCU.
In the embodiment of the present invention, optionally, the correspondence between the motion type and the prediction mode may satisfy at least one of the following:
the undifferentiated static type and the Skip prediction mode have a corresponding relation;
the boundary motion type and the Direct prediction mode have a corresponding relation;
the specific motion type has a corresponding relation with a second prediction mode, and the second prediction mode is a first part prediction mode in the L prediction modes;
removing a specific motion type from corresponding relation with a prediction mode except a third prediction mode, wherein the third prediction mode is a second part prediction mode in the L prediction modes;
the common motion type has a corresponding relation with all the prediction modes;
wherein the L prediction modes are associated with the target LCU, and M is a positive integer.
It should be noted that, in the embodiment of the present invention, for a specific implementation principle that the prediction mode determination device determines the L prediction modes according to the target LCU, reference may be made to the following description, which is not repeated herein. In addition, the expression form of the correspondence relationship is merely an example, and a specific expression form of the correspondence relationship between the motion type and the prediction mode is not limited thereto.
As can be seen from the above experimental results of fig. 1a to 4c, if the motion type of the LCU is a specific motion type, the prediction modes corresponding to the LCU are mainly Direct prediction mode, Inter prediction mode, and Intra prediction mode. Therefore, optionally, in the case that the L prediction modes include one or more of a Direct prediction mode, an Inter prediction mode, and an Intra prediction mode, the second prediction mode may be at least one of the Direct prediction mode, the Inter prediction mode, and the Intra prediction mode, and the third prediction mode may also be at least one of the Direct prediction mode, the Inter prediction mode, and the Intra prediction mode. In practical applications, the second prediction mode and the third prediction mode may be the same or different.
For ease of understanding, examples are illustrated below:
assume that the L prediction modes include a Direct prediction mode, an Inter prediction mode, and an Intra prediction mode.
If the second prediction mode includes a Direct prediction mode and an Inter prediction mode, the specific motion type may have a corresponding relationship with the Direct prediction mode and the Inter prediction mode.
If the third prediction mode comprises an Inter prediction mode and an Intra prediction mode. The removal of the specific motion type may have a correspondence with other prediction modes than the Inter prediction mode and the Intra prediction mode among the L prediction modes, i.e., the removal of the specific motion type may have a correspondence with the Direct prediction mode.
For the general motion type, it should be noted that it has correspondence with all prediction modes. Thus, for an LCU for which the motion type is determined to be a normal motion type, it may be considered that the LCU does not employ a fast algorithm to determine the prediction mode of the LCU.
In this embodiment of the present invention, optionally, the determining the first motion type of the target largest coding unit LCU in the ith frame image includes:
determining a first motion type of a target Largest Coding Unit (LCU) in an ith frame image if the ith frame image satisfies a first condition, i being an integer greater than 1;
wherein the ith frame image satisfies a first condition including any one of:
the pixel difference between the ith frame image and the (i-1) th frame image is smaller than a first value;
the motion types of first LCUs of k frame images before the ith frame image are the same, the first LCUs and the target LCU are same-position LCUs, k is a positive integer, and i is an integer larger than k.
For ease of understanding, the two cases are described separately below.
In case one, the fact that the ith frame image satisfies the first condition includes that a pixel difference between the ith frame image and the (i-1) th frame image is less than a first value.
The pixel difference between the ith frame image and the (i-1) th frame image can be used for reflecting the difference size between the ith frame image and the (i-1) th frame image. If the pixel difference between the ith frame image and the (i-1) th frame image is smaller than a first value, it indicates that the difference between the ith frame image and the (i-1) th frame image is smaller, and therefore, the prediction mode determination device may enable a fast algorithm to determine the prediction mode of the LCU of the ith frame image.
In a specific implementation manner, in an implementation manner, a pixel difference between the ith frame image and the i-1 st frame image may be: and the difference value of the pixel values of the ith frame image and the original image of the (i-1) th frame image.
In another implementation manner, the pixel difference between the ith frame image and the (i-1) th frame image may be an absolute average pixel difference of co-located LCUs of the ith frame image and the (i-1) th frame image.
In addition, the first value may be determined according to actual requirements, which is not limited in the embodiment of the present invention.
Optionally, the first value may be related to a video format of a video to which the ith frame of image belongs. Illustratively, if the input video format is 8 bits (Bit), the first value may be a; if the input video format is 10 bits, the first value may be 4a, where a may be freely set, and optionally, a may be set to 3.
In case one, the first motion type of the target LCU in the ith frame image is determined.
Optionally, the determining a first motion type of a target largest coding unit LCU in the ith frame image includes:
determining the first motion type from a reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
It should be noted that the N frame images are located before the ith frame image. Preferably, the N frame pictures may be i-N frame pictures to i-1 frame pictures in the GOP. In addition, the prediction mode of the LCU is determined by the N frame images without using the fast algorithm of the embodiment of the present invention.
In practical application, the value of N may be set according to actual requirements, which is not limited in the embodiment of the present invention, and optionally, N may be 1 to 8, and exemplarily, N may be 4.
For each of the N frame images, the characteristic information may include at least one of: a frame number of the frame image; a frame type of the frame image; QP value of frame picture; original image pixel values of the frame image; a prediction mode of each coding unit CU in an LCU of a frame image; motion type of each LCU in the frame image.
In a specific implementation, optionally, in a case that the feature information includes a prediction mode of each coding unit CU in an LCU of a frame image, the determining the first motion type according to the reference queue includes:
determining M second LCUs in the reference queue according to the target LCU, wherein the M second LCUs and the target LCU are co-located LCUs, the M second LCUs comprise S CUs, L mutually different prediction modes exist in the S prediction modes of the S CUs, L is a positive integer smaller than or equal to S, S is an integer larger than or equal to M, and M is a positive integer;
determining the first motion type according to L first scale values corresponding to the L prediction modes;
wherein each first proportion value is the ratio of the number of the corresponding prediction modes to S.
First, determining M second LCUs in the reference queue according to the target LCU will be described.
In particular implementation, the prediction mode determination device may determine, according to at least one of the following information of the target LCU: a location of the target LCU in an ith frame image; a frame class of the ith frame image; the QP value for the target LCU determines M second LCUs in the reference queue.
Optionally, the M second LCUs satisfy: the M second LCUs and the target LCU are collocated LCUs; the frame type of each second LCU in the M second LCUs is the same as that of the ith frame image; a difference between the quantization parameter QP value of each of the M second LCUs and the QP value of the target LCU is smaller than an eighth value. The eighth value may be freely set, and optionally, the eighth value may be any one of values from 0 to 4.
The M second LCUs comprise S CUs, wherein S is an integer greater than or equal to M; each CU corresponds to one prediction mode, L prediction modes which are different from each other exist in the S prediction modes of the S CUs, and L is a positive integer less than or equal to S. That is, the same prediction mode may exist among the S prediction modes.
The following describes the determination of the first motion type according to the L first scale values corresponding to the L prediction modes.
Each of the first scale values is a value of the number ratio S of the prediction modes corresponding thereto. In a specific implementation, the prediction mode determination device may determine the number of the prediction modes in the L prediction modes occupied by the S prediction modes, and then, for each of the L prediction modes, may determine a value of a ratio S of the number of the prediction modes occupied by the S prediction modes as a first ratio value of the prediction mode.
For ease of understanding, examples are illustrated below:
assume that the M second LCUs include 3 second LCUs, denoted as second LCU1, second LCU2, and second LCU3, respectively. Wherein the second LCU1 includes CU1 and CU2, and the prediction mode of CU1 is prediction mode 1 and the prediction mode of CU is prediction mode 2; the second LCU2 includes CU3, and the prediction mode of CU3 is prediction mode 2; the second LCU3 includes CU4 and CU5, and the prediction modes of CU4 and CU5 are both prediction mode 2.
It can be seen that the 3 second LCUs include 5 CUs, 2 prediction modes different from each other exist in the 5 prediction modes of the 5 CUs, which are prediction mode 1 and prediction mode 2, respectively, and the number of prediction modes 1 is 1 and the number of prediction modes 2 is 4. In this way, the prediction mode determination device can determine: the first ratio value corresponding to prediction mode 1 is 1/5; the first ratio value corresponding to prediction mode 2 is 4/5.
Optionally, the determining the first motion type according to the L first scale values corresponding to the L prediction modes includes:
executing the first judgment to obtain a first judgment result;
determining the first motion type according to the first judgment result;
wherein the first determination comprises at least one of:
judging whether a first proportional value corresponding to the Skip prediction mode in the L first proportional values is larger than a second value or not;
under the condition that the target LCU is a boundary LCU, judging whether a first proportional value corresponding to a Direct prediction mode in the L first proportional values is larger than a third value or not;
judging whether a first proportion value corresponding to a second prediction mode in the L first proportion values is larger than a fourth value, wherein the second prediction mode is a first part prediction mode in the L prediction modes;
judging whether a first proportion value corresponding to a third prediction mode in the L first proportion values is smaller than a fifth value, wherein the third prediction mode is a second part prediction mode in the L prediction modes;
wherein the second value is greater than the fifth value, the third value is greater than the fifth value, and the fourth value is greater than the fifth value.
It should be noted that the second determination from top to bottom may be applied only to the border LCU, that is, the determination may not be performed for other LCUs than the non-border LCU.
Further, the determining the first motion type according to the first judgment result includes at least one of:
determining that the first motion type is a target motion type under the condition that the first judgment result meets a second condition;
determining that the first motion type is a common motion type under the condition that the first judgment result does not meet the second condition;
wherein the second condition is satisfied by at least one of:
a first scale value corresponding to the Skip prediction mode in the L first scale values is larger than the second value;
a first proportional value corresponding to a Direct prediction mode in the L first proportional values is greater than the third value;
a first proportion value corresponding to a second prediction mode in the L first proportion values is larger than the fourth value;
a first ratio value corresponding to a third prediction mode among the L first ratio values is smaller than the fifth value.
In a specific implementation, the second value, the third value, the fourth value, and the fifth value may be set according to actual requirements, which is not limited in the embodiment of the present invention. In practical applications, the second value, the third value and the fourth value may be equal or different.
Optionally, the second value, the third value, the fourth value, and the fifth value may be set to satisfy the following condition:
when a first scale value corresponding to the Skip prediction mode in the L first scale values is greater than the second value, it can be described that the Skip prediction mode in the L prediction modes occupies a large proportion;
when the first scale value corresponding to the Direct prediction mode in the L first scale values is greater than the second scale value, it can be described that the Direct prediction mode in the L prediction modes occupies a large proportion;
when a first scale value corresponding to a second prediction mode in the L first scale values is greater than the second value, it may be described that the second prediction mode in the L prediction modes occupies a large proportion;
in a case where the first ratio value corresponding to the third prediction mode among the L first ratio values is smaller than the fifth value, it may be said that the third prediction mode among the L prediction modes occupies a small ratio.
Alternatively, the second value may be set to 0.66, the third value and the fourth value may be set to 0.8, and the fifth value may be set to 0.2 or 0.15, but is not limited thereto.
Further, the object motion types include: an undifferentiated stationary type, a boundary motion type, a specific motion type, and a removal specific motion type;
determining that the first motion type is a target motion type under the condition that the first judgment result meets a second condition, wherein the first motion type comprises at least one of the following items:
determining that the first motion type is an undifferentiated static type under the condition that a first scale value corresponding to the Skip prediction mode in the L first scale values is larger than the second value;
determining that the first motion type is a boundary motion type when a first proportion value corresponding to a Direct prediction mode in the L first proportion values is larger than the third value;
determining that the first motion type is a specific motion type when a first proportion value corresponding to a second prediction mode in the L first proportion values is greater than the fourth value;
and determining the first motion type as a specific motion type removal if a first proportion value corresponding to a third prediction mode among the L first proportion values is smaller than the fifth value.
It should be noted that, in practical applications, in a case where the first determination includes two or more determinations as described above, the prediction mode determination device may sequentially perform the determinations included in the first determination, and in a case where a determination result of a certain determination satisfies one of the second conditions during the process of performing the determination in the first determination, may determine the first motion type, and end performing remaining determinations in the first determination, so that a rate of determining the first motion type may be increased.
For ease of understanding, examples are illustrated below:
it is assumed that the first judgment includes all the above judgments, and the prediction mode determination device sequentially executes all the judgments in the order from top to bottom. Additionally, the target LCU is not a boundary LCU.
In practical applications, the prediction mode determining device first determines whether a first scale value corresponding to the Skip prediction mode among the L first scale values is greater than a second value.
If it is determined that the first scale value corresponding to the Skip prediction mode among the L first scale values is greater than the second value, the first motion type may be directly determined as an undifferentiated still type.
If it is determined that the first ratio value corresponding to the Skip prediction mode among the L first ratio values is less than or equal to the second value, it may be continuously determined whether the first ratio value corresponding to the second prediction mode among the L first ratio values is greater than a fourth value, and so on.
In case two, the first condition that the ith frame image satisfies includes that the motion types of the first LCUs of k frame images before the ith frame image are the same.
In a specific implementation, the first k frame images of the ith frame image may use a fast algorithm to determine the prediction mode of the LCU, or may use a prediction mode of the LCU determined in another manner.
Optionally, the determining a first motion type of a target largest coding unit LCU in the ith frame image includes:
determining a motion type of the first LCU as the first motion type.
In a specific implementation, considering that the content correlation between adjacent frame pictures is strong, if the prediction modes of the co-located LCUs of consecutive multi-frame pictures are the same, it is predicted that the probability that the prediction modes of the co-located LCUs in the following frame pictures keep the same decision is high, and therefore, the motion type of the first LCU can be directly determined as the first motion type, so that the rate of motion type determination of the LCU can be further increased compared with the case one.
In case two, in a case where a pixel difference between the i +1 th frame image and the i frame image is less than a first value, the determination of the prediction mode of the third LCU, which is co-located with the target LCU, for the i +1 th frame image may be determined in the following manner.
Optionally, after determining the first prediction mode of the target LCU, the method further comprises:
acquiring P LCUs included in the ith frame image, wherein the P LCUs include R CUs, Q mutually different prediction modes exist in the R prediction modes of the R CUs, Q is a positive integer smaller than or equal to R, R is a positive integer larger than or equal to P, and P is a positive integer;
determining a second motion type of the target LCU according to Q second proportional values corresponding to the Q prediction modes, wherein each second proportional value is a value of the number ratio R of the corresponding prediction modes;
determining a third motion type of a third LCU in the i +1 th frame image according to a reference queue under the condition that the second motion type is different from the first motion type, wherein the third LCU and the target LCU are co-located LCUs, the reference queue comprises feature information of N frame images, and N is a positive integer;
determining a fourth prediction mode for the third LCU based on the third motion type.
As can be seen from the foregoing, if the prediction modes of the co-located LCUs of consecutive multi-frame pictures are the same, it is predicted that the possibility that the prediction modes of the co-located LCUs in the following frame pictures keep the same decision is high, but the case that the decisions may be different is not excluded. Therefore, after the i-th frame image is encoded, the second motion type of the target LCU may be determined according to Q second scale values corresponding to the Q prediction modes, and it may be determined whether the second motion type is the same as the first motion type.
Under the condition that the second motion type is different from the first motion type, the content difference between the ith frame image and the frame image before the ith frame image is larger, so that under the condition that the pixel difference between the (i + 1) th frame image and the ith frame image is smaller than a first value, the motion type of a third LCU which is positioned in the (i + 1) th frame image and is positioned in the same position with the target LCU can be determined in a way of the first condition, so that the accuracy of determining the motion type of the LCU can be improved, and the accuracy of determining the prediction mode of the LCU can be improved.
In the case that the second motion type is the same as the first motion type, it is described that the content of the i-th frame image is different from that of the frame image before the i-th frame image by a small amount, and therefore, in the case that the pixel difference between the i + 1-th frame image and the i-th frame image is smaller than the first value, the motion type of the third LCU, which is co-located with the target LCU in the i + 1-th frame image, can still be determined in the manner of case two, so that the rate of motion type determination of the LCU can be increased. And so on.
In a second case, "P LCUs included in the i-th frame image are acquired, the P LCUs include R CUs, Q prediction modes different from each other exist among the R prediction modes of the R CUs, Q is a positive integer smaller than or equal to R, R is a positive integer larger than or equal to P, and P is a positive integer; determining a second motion type of the target LCU according to Q second scale values corresponding to the Q prediction modes "and in case one," determining M second LCUs in the reference queue according to the target LCU, where the M second LCUs and the target LCU are co-located LCUs, the M second LCUs include S CUs, L mutually different prediction modes exist in the S prediction modes of the S CUs, L is a positive integer less than or equal to S, S is an integer greater than or equal to M, and M is a positive integer; determining the first motion type according to L first scale values corresponding to the L prediction modes "is similar in implementation principle, and is different in that: in case one, the M second LCUs are from the reference queue, and in case two, the P second LCUs are from the ith frame of picture.
Therefore, the specific implementation of the content in the second case can refer to the specific description of the related content in the first case, and is not repeated herein.
Optionally, the determining a second motion type of the target LCU according to Q second proportional values corresponding to the Q prediction modes includes:
executing the second judgment to obtain a second judgment result;
determining the second motion type according to the second judgment result;
wherein the second determination comprises at least one of:
judging whether a second proportional value corresponding to the Skip prediction mode in the Q second proportional values is larger than a second value;
under the condition that the target LCU is a boundary LCU, judging whether a second proportional value corresponding to a Direct prediction mode in the Q second proportional values is larger than a third value or not;
judging whether a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than a fourth value, wherein the fifth prediction mode is a third part prediction mode in the Q prediction modes;
judging whether a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is smaller than a fifth value, wherein the sixth prediction mode is a fourth part prediction mode in the Q prediction modes;
wherein the second value is greater than the fifth value, the third value is greater than the fifth value, and the fourth value is greater than the fifth value.
Optionally, the determining the second motion type according to the second determination result includes at least one of:
determining that the first motion type is a target motion type under the condition that the second judgment result meets a third condition;
determining that the first motion type is a normal motion type when the second judgment result does not satisfy the third condition;
wherein the second determination result satisfying a third condition includes at least one of:
a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is larger than the second value;
a second proportion value corresponding to the Direct prediction mode in the Q second proportion values is larger than the third value;
a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than the fourth value;
and the second proportion value corresponding to the sixth prediction mode in the Q second proportion values is smaller than the fifth value.
Optionally, the object motion types include: an undifferentiated stationary type, a boundary motion type, a specific motion type, and a removal specific motion type;
determining that the first motion type is a target motion type under the condition that the second judgment result meets a third condition, wherein the first motion type comprises at least one of the following items:
determining that the first motion type is an undifferentiated static type under the condition that a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is larger than the second value;
determining that the first motion type is a boundary motion type under the condition that a second proportion value corresponding to a Direct prediction mode in the Q second proportion values is larger than the third value;
determining that the first motion type is a specific motion type under the condition that a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than the fourth value;
and determining the first motion type as a specific motion type under the condition that a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is smaller than the fifth value.
In this embodiment of the present invention, after determining the first prediction mode of the target LCU according to the correspondence between the motion type and the prediction mode and the first motion type, the prediction mode determining device may include two implementation manners, which are specifically described as follows:
implementation mode one
Optionally, after determining the first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, the method further includes:
coding the ith frame image by adopting a first coding mode to obtain a first coding result;
acquiring a first prediction mode set corresponding to the ith frame of image according to the first coding result;
acquiring a second prediction mode set corresponding to the ith frame image, wherein the determination of each prediction mode in the second prediction mode set is related to the motion type, and the second prediction mode set comprises the first prediction mode;
determining whether the second set of prediction modes matches the first set of prediction modes;
under the condition that the second prediction mode set is not matched with the first prediction mode set, encoding the (i + 1) th frame image to the (i + N-1) th frame image by adopting the first encoding mode;
wherein, in the process of encoding the frame image by adopting the first encoding mode, the determination of the prediction mode of the LCU of the frame image is independent of the motion type of the LCU.
In the embodiment of the invention, when the prediction mode of the LCU is determined by adopting a rapid algorithm, the determination of the prediction mode of the LCU is related to the motion type of the LCU. It can be seen that, in the process of encoding the frame image by using the first encoding method, the prediction mode determining device uses the prediction mode of the LCU determined by other methods besides using the fast algorithm, for example, determines the prediction mode of the LCU by using the traversal method.
In this embodiment, the first prediction mode set may include the prediction mode of each LCU in the i-th frame image after being encoded by the first encoding method. The second set of prediction modes may include prediction modes for LCUs in an ith frame of image determined using a fast algorithm.
In a specific implementation, the prediction mode determination device may determine whether the second prediction mode set matches the first prediction mode set by comparing different prediction modes in the first prediction mode set with different prediction modes in the second prediction mode set.
Specifically, if the difference between the duty ratio of the target prediction mode in the first prediction mode set and the duty ratio of the target prediction mode in the second prediction mode set is within a preset range, the second prediction mode set may be considered to be matched with the first prediction mode set, otherwise, the second prediction mode set may be considered to be not matched with the first prediction mode set. The target prediction mode may be any prediction mode in the first prediction mode set.
For ease of understanding, examples are illustrated below:
the first prediction mode set is assumed to comprise 10 LCUs, and 10 prediction modes of the 10 LCUs comprise 8 Skip prediction modes and 2 Direct prediction modes; the second prediction mode set comprises 10 LCUs, and 10 prediction modes of the 10 LCUs comprise 9 Skip prediction modes and 1 Direct prediction mode. In addition, assume that the preset range is 0.2.
It can be seen that the percentage of Skip prediction mode in the first prediction mode set is 0.8, and the percentage of Direct prediction mode is 0.2; the ratio of Skip prediction modes in the second prediction mode set is 0.9, and the ratio of Direct prediction modes in the second prediction mode set is 0.1. In addition, the difference value between the occupation ratio of the Skip prediction mode in the first prediction mode set and the occupation ratio of the Skip prediction mode in the second prediction mode set is within a preset range, and the difference value between the occupation ratio of the Direct prediction mode in the first prediction mode set and the occupation ratio of the Direct prediction mode in the second prediction mode set is within a preset range. Thus, it may be determined that the first set of prediction modes matches the second set of prediction modes.
In this embodiment, in the event that the second set of prediction modes matches the first set of prediction modes, the prediction mode determination device may continue to determine the prediction mode of LCUs in the i +1 th frame that are co-located with the target LCU using a fast algorithm.
Optionally, when the first motion type is determined based on a reference queue, after the i +1 th frame image to the i + N-1 th frame image are encoded by using the first encoding method, the method further includes:
emptying the reference queue, and adding the characteristic information from the ith frame image to the (i + N-1) th frame image into the reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
In a case where the first motion type is determined based on the reference queue, since the first motion type is determined based on the reference queue and the prediction mode corresponding to the first motion type is not the optimal prediction mode for encoding the target LUC, it can be said that the contents of the N image frames included in the reference queue are greatly different from the content of the i frame image, and therefore, the prediction mode determination apparatus may empty the reference queue and add the feature information of the i frame image to the i + N-1 frame image to the reference queue, so that the reference reliability of the reference queue may be improved.
In this embodiment, the prediction mode determination device encodes the i-th frame image in the first encoding mode without using the prediction mode determined by the fast algorithm.
In practical applications, the embodiment may be executed every G frames of images, where G is a positive integer, and may be specifically set according to actual requirements, and this is not limited in the embodiment of the present invention.
Second embodiment
Optionally, after determining the first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, the method includes:
encoding a target CU in the target LCU according to the first prediction mode.
It should be understood that the target CU may be any one of the target LCUs.
When the specific implementation is realized, the following two implementation modes can be included.
In one implementation, the prediction mode determination device may directly encode the target CU using the first prediction mode.
In the second implementation manner, optionally, the encoding the target CU in the target LCU according to the first prediction mode includes:
determining whether an encoding cost of the target CU in the first prediction mode is less than a seventh value;
and in the case that the coding cost of the target CU in the first prediction mode is smaller than the seventh value, coding the target CU in the first prediction mode.
Optionally, after determining whether the coding cost of the target CU in the first prediction mode is smaller than a seventh value, the method further includes:
if the coding cost of the target CU in the first prediction mode is larger than or equal to the seventh value, adopting a seventh prediction mode to code the target CU;
and the coding cost of the target CU for coding by adopting the seventh prediction mode is less than the coding cost of the target CU for coding by adopting other prediction modes.
In a specific implementation, the seventh value may be set to satisfy the following condition: in the case that the coding cost of the target CU in the first prediction mode is smaller than the seventh value, it indicates that the coding cost of the target CU in the first prediction mode is smaller; and in the case that the coding cost of the target CU in the first prediction mode is greater than or equal to the seventh value, the coding cost of the target CU in the first prediction mode is larger.
Therefore, in the second embodiment, when the coding cost of the target CU in the first prediction mode is smaller than the seventh value, the target CU may be directly coded in the first prediction mode; when the coding cost of the target CU in the first prediction mode is greater than or equal to the seventh value, the seventh prediction mode may be determined in another manner, and the target CU is coded in the seventh prediction mode, so that it may be ensured that the coding cost of the target CU is small.
In the second embodiment, optionally, in a case that the first motion type is determined based on a reference queue, after the encoding the target CU in the target LCU according to the first prediction mode, the method further includes:
deleting the characteristic information of the target frame image in the reference queue, and adding the characteristic information of the ith frame image into the reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer; the target frame image meets a preset condition.
In a specific implementation, the target frame image may be a frame image stored in the reference queue for the longest time, that is, the target frame image may be a frame image that enters the reference queue first. In this case, it can be understood that the prediction mode determination device updates the reference queue according to a first-in first-out rule.
Of course, in other embodiments, the target frame image may be any B or P frame image.
In the second embodiment, the prediction mode determining device encodes the i-th frame image using the prediction mode of the LCU determined by the fast algorithm.
In practical applications, the first embodiment and the second embodiment may be implemented in combination. In combination, as can be seen from the foregoing, in the first embodiment, the encoding may be performed every G frames, and in the G frames at intervals, the two-frame images may be encoded according to the first embodiment, and for the other frames, the one-frame images may be encoded according to the second embodiment.
In this embodiment of the present invention, optionally, after determining the first prediction mode of the target LCU, before determining the first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, the method further includes:
determining whether a scale value of a normal motion type among motion types of LCUs in H frame images including the ith frame image is less than a sixth value;
determining a first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, including:
under the condition that the proportion value of the common motion type in the motion types of the LCU in the H frame images is smaller than the sixth value, determining a first prediction mode of the target LCU according to the corresponding relation between the motion types and the prediction mode and the first motion type;
wherein the H frame images are continuous, and H is a positive integer.
And under the condition that the proportion value of the common motion type in the motion types of the LCUs in the H frame images is smaller than the sixth value, the proportion value of the common motion type in the motion types of the LCUs in the H frame images is normal, so that the first prediction mode of the target LCU can be determined according to the corresponding relation between the motion types and the prediction mode and the first motion type, and the determination rate of the prediction mode is increased.
Optionally, after determining whether a proportion value of a normal motion type of an LCU in H frame images including the ith frame image is smaller than a sixth value, the method further includes:
under the condition that the proportion value of the common motion type in the motion types of the LCUs in the H frame images is larger than or equal to the sixth value, encoding the i frame image to the (i + N-1) frame image by adopting a first encoding mode;
wherein, in the process of encoding the frame image by adopting the first encoding mode, the determination of the prediction mode of the LCU of the frame image is independent of the motion type of the LCU.
When the ratio value of the common motion type in the motion types of the LCUs in the H frame images is greater than or equal to the sixth value, it is described that the ratio value of the common motion type in the motion types of the LCUs in the H frame images is abnormal, and therefore, the i-th frame image to the i + N-1-th frame image may be encoded by using a first encoding method. The prediction mode of the co-located LCU from the ith frame image to the (i + N-1) th frame image is determined by other modes except a fast algorithm, so that the coding effect can be improved.
In a specific implementation, the sixth value may be set according to an actual requirement, which is not limited in the embodiment of the present invention. Optionally, the setting of the sixth value may satisfy: and in the case that the proportion value of the common motion type in the motion types of the LCUs in the H frame images is smaller than the sixth value, it is described that the proportion value of the common motion type in the motion types of the LCUs in the ith frame image is very small. Alternatively, the sixth value may be 1%.
Optionally, when the first motion type is determined based on a reference queue, after the i frame image to the i + N-1 frame image are encoded in the first encoding manner, the method further includes:
emptying the reference queue, and adding the characteristic information from the ith frame image to the (i + N-1) th frame image into the reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
In the case that the first motion type is determined based on the reference queue, since the first motion type is determined based on the reference queue and a proportion value of a common motion type in motion types of the LCUs in the ith frame image is abnormal, it can be stated that contents of N image frames included in the reference queue and the ith frame image are greatly different, and therefore, the prediction mode determination device may empty the reference queue and add feature information of the ith frame image to the i + N-1 frame image to the reference queue, so that reference reliability of the reference queue may be improved.
The embodiment of the present invention further provides a method for determining a prediction mode, and please refer to fig. 6 for easy understanding. As shown in fig. 6, the prediction mode determination method may include the steps of:
step 601, under the condition that the pixel difference between the ith frame image and the (i-1) th frame image is smaller than a first value, determining a first motion type of a target maximum coding unit (LCU) in the ith frame image, wherein i is an integer larger than 1.
Step 602, determining a first prediction mode of the target LCU according to the correspondence between the motion types and prediction modes and the first motion type.
Optionally, the determining a first motion type of a target largest coding unit LCU in an ith frame image includes:
acquiring a reference queue, wherein the reference queue comprises feature information of N frame images, the feature information comprises a prediction mode of each coding unit CU in an LCU of the frame images, and N is a positive integer;
determining M second LCUs in the reference queue according to the target LCU, wherein the M second LCUs and the target LCU are co-located LCUs, the M second LCUs comprise S CUs, L mutually different prediction modes exist in the S prediction modes of the S CUs, L is a positive integer smaller than or equal to S, S is an integer larger than or equal to M, and M is a positive integer;
and determining the first motion type according to L first scale values corresponding to the L prediction modes, wherein each first scale value is the value of the quantity ratio S of the corresponding prediction mode.
Optionally, the determining the first motion type according to the L first scale values corresponding to the L prediction modes includes:
judging whether a first proportional value corresponding to the Skip prediction mode in the L first proportional values is larger than a second value or not;
under the condition that a first proportion value corresponding to a Skip prediction mode in the L first proportion values is smaller than or equal to the second value, judging whether a first proportion value corresponding to a second prediction mode in the L first proportion values is larger than a fourth value;
under the condition that a first proportion value corresponding to a second prediction mode in the L first proportion values is smaller than or equal to the fourth value, judging whether a first proportion value corresponding to a third prediction mode in the L first proportion values is smaller than a fifth value;
determining that the first motion type is a specific motion type removed under the condition that a first proportional value corresponding to a third prediction mode in the L first proportional values is smaller than the fifth value;
wherein the second prediction mode is a first partial prediction mode of the L prediction modes; the third prediction mode is a second partial prediction mode of the L prediction modes; the second value is greater than the fifth value and the fourth value is greater than the fifth value.
Optionally, when the target LCU is a boundary LCU, and the first ratio value corresponding to the second prediction mode in the L first ratio values is smaller than or equal to the fourth value, determining whether the first ratio value corresponding to the third prediction mode in the L first ratio values is smaller than a fifth value, includes:
under the condition that a first proportion value corresponding to a second prediction mode in the L first proportion values is smaller than or equal to the fourth value, judging whether a first proportion value corresponding to a Direct prediction mode in the L first proportion values is larger than a third value or not;
under the condition that a first proportional value corresponding to a Direct prediction mode in the L first proportional values is smaller than or equal to the third value, judging whether a first proportional value corresponding to a second prediction mode in the L first proportional values is larger than a fourth value;
wherein the third value is greater than the fifth value.
Optionally, the method further includes:
determining that the first motion type is an undifferentiated static type when a first scale value corresponding to the Skip prediction mode among the L first scale values is greater than the second value;
determining that the first motion type is a boundary motion type when a first proportion value corresponding to a Direct prediction mode in the L first proportion values is larger than the third value;
determining that the first motion type is a specific motion type when a first proportion value corresponding to a second prediction mode in the L first proportion values is greater than the fourth value;
and determining that the first motion type is a normal motion type when a first proportion value corresponding to a third prediction mode in the L first proportion values is greater than or equal to the fifth value.
Optionally, the correspondence satisfies at least one of the following conditions:
the undifferentiated static type and the Skip prediction mode have a corresponding relation;
the boundary motion type and the Direct prediction mode have a corresponding relation;
the specific motion type has a corresponding relation with a second prediction mode, and the second prediction mode is a first part prediction mode in the L prediction modes;
removing a specific motion type from corresponding relation with a prediction mode except a third prediction mode, wherein the third prediction mode is a second part prediction mode in the L prediction modes;
the common motion type has a corresponding relation with all the prediction modes;
wherein the L prediction modes are associated with the target LCU, L being a positive integer.
Optionally, after determining the first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, the method further includes:
encoding a target CU in the target LCU according to the first prediction mode.
Optionally, the encoding the target CU in the target LCU according to the first prediction mode includes:
determining whether an encoding cost of the target CU in the first prediction mode is less than a seventh value;
and in the case that the coding cost of the target CU in the first prediction mode is smaller than the seventh value, coding the target CU in the first prediction mode.
Optionally, after determining whether the coding cost of the target CU in the first prediction mode is smaller than a seventh value, the method further includes:
if the coding cost of the target CU in the first prediction mode is larger than or equal to the seventh value, adopting a seventh prediction mode to code the target CU;
and the coding cost of the target CU for coding by adopting the seventh prediction mode is less than the coding cost of the target CU for coding by adopting other prediction modes.
Optionally, in a case that the first motion type is determined based on a reference queue, after the encoding the target CU in the target LCU according to the first prediction mode, the method further includes:
updating the reference queue by using the ith frame image according to a first-in first-out rule;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
Optionally, after determining the first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, the method further includes:
coding the ith frame image by adopting a first coding mode to obtain a first coding result;
acquiring a first prediction mode set corresponding to the ith frame of image according to the first coding result;
acquiring a second prediction mode set corresponding to the ith frame image, wherein the determination of each prediction mode in the second prediction mode set is related to the motion type, and the second prediction mode set comprises the first prediction mode;
determining whether the second set of prediction modes matches the first set of prediction modes;
under the condition that the second prediction mode set is not matched with the first prediction mode set, encoding the (i + 1) th frame image to the (i + N-1) th frame image by adopting the first encoding mode;
wherein, in the process of encoding the frame image by adopting the first encoding mode, the determination of the prediction mode of the LCU of the frame image is independent of the motion type of the LCU.
Optionally, when the first motion type is determined based on a reference queue, after the i +1 th frame image to the i + N-1 th frame image are encoded by using the first encoding method, the method further includes:
emptying the reference queue, and adding the characteristic information from the ith frame image to the (i + N-1) th frame image into the reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
Optionally, after determining the first prediction mode of the target LCU, before determining the first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, the method further includes:
determining whether a scale value of a normal motion type among motion types of LCUs in H frame images including the ith frame image is less than a sixth value;
determining a first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, including:
under the condition that the proportion value of the common motion type in the motion types of the LCU in the H frame images is smaller than the sixth value, determining a first prediction mode of the target LCU according to the corresponding relation between the motion types and the prediction mode and the first motion type;
wherein the H frame images are continuous, and H is a positive integer.
Optionally, after determining whether a proportion value of a normal motion type of an LCU in H frame images including the ith frame image is smaller than a sixth value, the method further includes:
under the condition that the proportion value of the common motion type in the motion types of the LCUs in the H frame images is larger than or equal to the sixth value, encoding the i frame image to the (i + N-1) frame image by adopting a first encoding mode;
wherein, in the process of encoding the frame image by adopting the first encoding mode, the determination of the prediction mode of the LCU of the frame image is independent of the motion type of the LCU.
Optionally, when the first motion type is determined based on a reference queue, after the i frame image to the i + N-1 frame image are encoded in the first encoding manner, the method further includes:
emptying the reference queue, and adding the characteristic information from the ith frame image to the (i + N-1) th frame image into the reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
Optionally, after determining the first motion type of the target largest coding unit LCU in the ith frame image, the method includes:
determining a motion type of a fifth LCU of an i + F +1 frame image as the first motion type, in case that the motion type of a fourth LCU of F frame images subsequent to the i frame image is the first motion type;
wherein the fourth LCU and the target LCU are co-located LCUs, and the fifth LCU and the target LCU are co-located LCUs; f is a positive integer.
Optionally, a pixel difference between the i + F +2 frame image and the i + F +1 frame image is smaller than a first value;
after the determining the motion type of the fifth LCU of the (i + F + 1) th frame image as the first motion type, the method further comprises:
obtaining P LCUs included in the i + F +1 th frame image, wherein the P LCUs include R CUs, Q mutually different prediction modes exist in the R prediction modes of the R CUs, Q is a positive integer smaller than or equal to R, R is a positive integer larger than or equal to P, and P is a positive integer;
determining a second motion type of the target LCU according to Q second proportional values corresponding to the Q prediction modes, wherein each second proportional value is a value of the number ratio R of the corresponding prediction modes;
determining a third motion type of a third LCU of the i + F +2 th frame image according to a reference queue under the condition that the second motion type is different from the first motion type, wherein the third LCU and the target LCU are co-located LCUs, the reference queue comprises feature information of N frame images, and N is a positive integer;
determining a fourth prediction mode for the third LCU based on the third motion type.
Optionally, determining the second motion type of the target LCU according to Q second proportional values corresponding to the Q prediction modes includes:
judging whether a second proportional value corresponding to the Skip prediction mode in the Q second proportional values is larger than a second value or not;
under the condition that a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is smaller than or equal to the second value, judging whether a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than a fourth value;
under the condition that a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is smaller than or equal to the fourth value, judging whether a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is smaller than a fifth value or not;
determining that the second motion type of the target LCU is a specific motion type removed under the condition that a second proportional value corresponding to a sixth prediction mode in the Q second proportional values is smaller than the fifth value;
wherein the fifth prediction mode is a third partial prediction mode of the Q prediction modes; the sixth prediction mode is a fourth partial prediction mode of the Q prediction modes; the second value is greater than the fifth value and the fourth value is greater than the fifth value.
Optionally, when the target LCU is a boundary LCU, and when a second ratio value corresponding to a Skip prediction mode in the Q second ratio values is smaller than or equal to the second value, determining whether a second ratio value corresponding to a fifth prediction mode in the Q second ratio values is larger than a fourth value, includes:
under the condition that a second proportional value corresponding to the Skip prediction mode in the Q second proportional values is smaller than or equal to the second value, judging whether the second proportional value corresponding to the Direct prediction mode in the Q second proportional values is larger than a third value or not;
under the condition that a second proportion value corresponding to a Direct prediction mode in the Q second proportion values is larger than or equal to the third value, judging whether a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than a fourth value or not;
wherein the third value is greater than the fifth value.
Optionally, the method further includes:
determining that a second motion type of the target LCU is an undifferentiated stationary type when a second scale value corresponding to the Skip prediction mode among the Q second scale values is greater than the second value;
determining that the second motion type of the target LCU is a boundary motion type when a second proportional value corresponding to a Direct prediction mode among the Q second proportional values is greater than the third value;
determining that the second motion type of the target LCU is a specific motion type when a second proportion value corresponding to a fifth prediction mode among the Q second proportion values is greater than the fourth value;
determining that the second motion type of the target LCU is a normal motion type when a second proportion value corresponding to a sixth prediction mode among the Q second proportion values is greater than or equal to the fifth value.
It should be noted that the method embodiment corresponding to fig. 6 is a specific implementation manner in the method embodiment corresponding to fig. 5, and therefore, reference may be made to the description in the method embodiment corresponding to fig. 5 for related implementation principles, which is not described herein again.
The prediction mode determination method of the embodiment of the invention can comprise the following steps:
firstly, initializing a history information queue.
And (4) establishing a historical information queue without performing a quick algorithm on the previous 4 frames, and storing the frame number, the frame type, the QP value, the original image pixel, the number of prediction modes of each CU under all LCUs and LCU mode decision reference. Wherein the LCU mode decision reference defaults to a normal motion type if the fast algorithm is not enabled.
The historical information queue may be understood as the aforementioned reference queue, and the mode decision reference may be understood as the aforementioned motion type.
And II, frame-level pre-analysis.
Starting from frame 5, the absolute average pixel difference between the current frame and the previous frame is calculated each time, and the difference size is obtained. A fast algorithm may be enabled for small differences.
And thirdly, LCU-level mode decision reference.
If the fast algorithm can be enabled, for each LCU of the current frame, statistically referencing the co-located LCUs of the same frame type and similar QP values in the history queue, determining the mode decision reference (undifferentiated stationary type, boundary motion type, specific motion type, remove specific motion type, normal motion type, etc.) for that LCU.
And taking out the reference historical queue co-located LCU, counting the proportion of each mode, sequentially judging the following conditions, and if a certain type is judged, jumping out the following conditions:
1) if the skip mode accounts for a large proportion, judging the LCU at the position as an undifferentiated static type;
2) if the direct mode at the boundary LCU accounts for a large proportion, judging the LCU at the position as a boundary motion type;
3) if the sum of the multiple modes (including one mode) is in a large proportion, judging the LCU of the position as a specific motion type;
4) if one or more of the patterns are in a small proportion, deciding the LCU of the location as removing the particular motion type;
5) if none of the above conditions are met, the LCU for the location is determined to be of the normal motion type.
The LCU level mode decision reference may be understood as the aforementioned case one.
And fourthly, using a mode decision reference.
1) For LCUs determined as undifferentiated static type, only Skip mode is used;
2) for LCUs determined as boundary motion types, only the Direct mode is used;
3) for LCUs determined to be of a particular motion type, only the specified mode is used;
4) for LCUs determined to remove a particular motion type, not using the specified pattern;
5) for the decision to be of the normal motion type, no fast algorithm is used.
For a CU in an LCU of an undifferentiated stationary type, a boundary motion type, or a specific motion type, if the specified prediction mode has a poor effect, i.e., the mode of the minimum Rate-Distortion cost (RD cost) is large, encoding using another prediction mode.
And fifthly, optimizing mode decision reference.
For the frame enabling the fast algorithm, if the same-position LCU still keeps the same mode decision reference in the continuous multi-frame, the possibility of adopting the same mode decision reference in the following image is predicted to be very high, the three steps are directly skipped, and the LCU of the subsequent frame is set as the mode decision reference.
At this time, after the coding of the LCU of the next frame is completed, whether the proportion of each mode meets the mode decision reference is checked, and the three are recovered for the LCU which is not in conformity.
The foregoing second case can be understood by the optimization of the mode decision reference.
Sixthly, updating the historical information queue
After the current frame is coded, whether the fast algorithm is started or not, the frame information entering the history information queue at the earliest time is removed (the frame information does not need to be removed when the history information queue is initialized), and the related information of the frame is put into the queue.
Seven, checking fast algorithm 1
And (4) for the frame which can start the fast algorithm (if the frame can not be started, the fast algorithm is checked by delaying 1 frame) every 8 frames, the LCU-level mode judgment of the step (3) is firstly carried out, the frame is coded without using the fast algorithm, the coding result of the LCU is compared with the judgment result of the step (3), and if the accuracy is met, the fast algorithm is continuously kept. If the accuracy does not reach the expectation, emptying the historical information queue, coding the next 3-frame closing fast algorithm, and initializing the historical information queue.
And eighthly, checking a quick algorithm 2.
If a fast algorithm can be used, it is checked that a frame or a few consecutive frames have a large proportion of LCU decision references to be of a normal motion type, the frame is encoded without using the fast algorithm, the historical information queue is emptied, the next 3 frames are encoded by closing the fast algorithm, and the historical information queue is initialized.
It should be noted that, various optional implementations described in the embodiments of the present invention may be implemented in combination with each other or separately without conflict between the implementations, and the embodiments of the present invention are not limited in this respect.
For ease of understanding, the following is illustrated in connection with FIG. 7:
as shown in fig. 7, the prediction mode determination method according to an embodiment of the present invention may include the steps of:
and step 701, acquiring a next frame.
Step 702, determine whether the fast algorithm can be enabled.
If yes, go to step 703; otherwise, step 713 is performed.
And 703, sequentially determining LCU mode decision references.
Step 704, determine whether to enable checking fast algorithm 1.
If not, go to step 705, if no, go to step 711.
Step 705, judging whether the checking fast algorithm 2 passes or not.
If yes, go to step 706, otherwise go to 709.
Step 706, use mode decision reference.
And step 707, optimizing mode judgment reference.
Step 708, initialize or update the history information queue.
Step 709, no fast algorithm encoding is used.
And step 710, clearing the historical information queue.
Step 711, no fast algorithm encoding is used.
And step 712, judging whether the quick test algorithm 1 passes or not.
If yes, go to step 708, otherwise go to step 710.
Step 713, no fast algorithm encoding is used.
Step 714, determine whether there is a next frame.
If yes, go to step 701; otherwise, ending the flow.
The embodiment of the invention provides a LCU-level prediction mode decision fast algorithm based on historical information, based on the historical information in the encoding process, and by combining the relationship between image content and a prediction mode, a mode decision reference of an LCU is obtained, the LCU level is refined, the accurate prediction of a CU prediction mode under the LCU is realized, the operation amount of the mode type is greatly reduced, the time complexity is reduced, and meanwhile, the performance loss can be reduced.
In practical application, the prediction mode determination method adopting the embodiment of the invention is tested:
and (3) testing environment: CPU AMD 2600 x; operating the system: linux 18.04.
And (3) testing conditions are as follows: AVS3 general test conditions, test configuration: LD, LDP.
The results of the tests (anchors are all HPM5.0) are shown in the following table:
table 1: test results 1
Figure BDA0002299645970000451
Table 2: test results 2
Figure BDA0002299645970000452
As can be seen from tables 1 and 2, at HPM5.0, in the LD configuration, the Y performance loss is 1.18% and the coding complexity is 86% for the propanil sequence. Under the LDP configuration, the Y performance loss is 0.63% and the coding complexity is 89% for the macaroni sequence.
The prediction mode determining method of the embodiment of the invention provides a new optimization thought aiming at the prediction mode judgment, refines to LCU level, performs effective and rapid optimization, greatly reduces time complexity, and simultaneously uses historical information with strong correlation and various verification methods to ensure the coding performance. The embodiment of the invention also provides a prediction mode determining device which can execute the method embodiment. Because the principle of the prediction mode determining device for solving the problem is similar to that of the prediction mode determining method in the embodiment of the present invention, the implementation of the prediction mode determining device may refer to the implementation of the method, and repeated details are not repeated.
Referring to fig. 8, fig. 8 is a block diagram of a prediction mode determination apparatus according to an embodiment of the present invention. As shown in fig. 8, the prediction mode determining apparatus 800 may include:
a first determining module 801, configured to determine a first motion type of a target largest coding unit LCU in an ith frame image, i being an integer greater than 1;
a second determining module 802, configured to determine the first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type.
Optionally, the first determining module 801 is specifically configured to:
determining a first motion type of a target Largest Coding Unit (LCU) in an ith frame image if the ith frame image satisfies a first condition;
wherein the ith frame image satisfies a first condition including any one of:
the pixel difference between the ith frame image and the (i-1) th frame image is smaller than a first value;
the motion types of first LCUs of k frame images before the ith frame image are the same, the first LCUs and the target LCU are same-position LCUs, k is a positive integer, and i is an integer larger than k.
Optionally, when the ith frame image satisfies a first condition that a pixel difference between the ith frame image and the (i-1) th frame image is smaller than a first value, the first determining module 801 is specifically configured to:
determining the first motion type from a reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
Optionally, in a case that the feature information includes a prediction mode of each coding unit CU in an LCU of a frame image, the first determining module 801 includes:
a first determining sub-module, configured to determine, according to the target LCU, M second LCUs in the reference queue, where the M second LCUs and the target LCU are co-located LCUs, the M second LCUs include S CUs, where L mutually different prediction modes exist among S prediction modes of the S CUs, L is a positive integer smaller than or equal to S, S is an integer greater than or equal to M, and M is a positive integer;
and the second determining submodule is used for determining the first motion type according to L first proportional values corresponding to the L prediction modes, wherein each first proportional value is the value of the quantity ratio S of the corresponding prediction mode.
Optionally, the second determining sub-module includes:
the first execution unit is used for executing the first judgment to obtain a first judgment result;
the first determining unit is used for determining the first motion type according to the first judgment result;
wherein the first determination comprises at least one of:
judging whether a first proportional value corresponding to the Skip prediction mode in the L first proportional values is larger than a second value or not;
under the condition that the target LCU is a boundary LCU, judging whether a first proportional value corresponding to a Direct prediction mode in the L first proportional values is larger than a third value or not;
judging whether a first proportion value corresponding to a second prediction mode in the L first proportion values is larger than a fourth value, wherein the second prediction mode is a first part prediction mode in the L prediction modes;
judging whether a first proportion value corresponding to a third prediction mode in the L first proportion values is smaller than a fifth value, wherein the third prediction mode is a second part prediction mode in the L prediction modes;
wherein the second value is greater than the fifth value, the third value is greater than the fifth value, and the fourth value is greater than the fifth value.
Optionally, the first determining unit includes at least one of:
the first determining subunit is configured to determine that the first motion type is a target motion type when the first determination result meets a second condition;
a second determining subunit, configured to determine that the first motion type is a normal motion type when the first determination result does not satisfy the second condition;
wherein the first judgment result meeting the second condition comprises at least one of the following:
a first scale value corresponding to the Skip prediction mode in the L first scale values is larger than the second value;
a first proportional value corresponding to a Direct prediction mode in the L first proportional values is greater than the third value;
a first proportion value corresponding to a second prediction mode in the L first proportion values is larger than the fourth value;
a first ratio value corresponding to a third prediction mode among the L first ratio values is smaller than the fifth value.
Optionally, the object motion types include: an undifferentiated stationary type, a boundary motion type, a specific motion type, and a removal specific motion type;
the first determination submodule to at least one of:
determining that the first motion type is an undifferentiated static type when a first scale value corresponding to the Skip prediction mode among the L first scale values is greater than the second value;
determining that the first motion type is a boundary motion type when a first proportion value corresponding to a Direct prediction mode in the L first proportion values is larger than the third value;
determining that the first motion type is a specific motion type when a first proportion value corresponding to a second prediction mode in the L first proportion values is greater than the fourth value;
and determining the first motion type as a specific motion type removal if a first proportion value corresponding to a third prediction mode among the L first proportion values is smaller than the fifth value.
Optionally, when the ith frame image satisfies the first condition and includes that the motion types of the first LCUs of k frame images before the ith frame image are the same, the first determining module 801 is specifically configured to:
determining a motion type of the first LCU as the first motion type.
Optionally, a pixel difference between the i +1 th frame image and the i frame image is smaller than a first value;
the prediction mode determination module 801 further comprises:
a first obtaining module, configured to obtain P LCUs included in the i-th frame image after determining a first prediction mode of the target LCU, where the P LCUs include R CUs, Q prediction modes different from each other exist among the R prediction modes of the R CUs, Q is a positive integer smaller than or equal to R, R is a positive integer greater than or equal to P, and P is a positive integer;
a fifth determining module, configured to determine a second motion type of the target LCU according to Q second proportional values corresponding to the Q prediction modes, where each second proportional value is a value of a number ratio R of the prediction modes corresponding to the second proportional value;
a sixth determining module, configured to determine, according to a reference queue, a third motion type of a third LCU in the i +1 th frame image when the second motion type is different from the first motion type, where the third LCU and the target LCU are co-located LCUs, the reference queue includes feature information of N frame images, and N is a positive integer;
a seventh determining module to determine a fourth prediction mode for the third LCU based on the third motion type.
Optionally, the fifth determining module includes:
the second execution submodule is used for executing second judgment to obtain a second judgment result;
a second determining submodule, configured to determine the second motion type according to the second determination result;
wherein the second determination comprises at least one of:
judging whether a second proportional value corresponding to the Skip prediction mode in the Q second proportional values is larger than a second value;
under the condition that the target LCU is a boundary LCU, judging whether a second proportional value corresponding to a Direct prediction mode in the Q second proportional values is larger than a third value or not;
judging whether a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than a fourth value, wherein the fifth prediction mode is a third part prediction mode in the Q prediction modes;
judging whether a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is smaller than a fifth value, wherein the sixth prediction mode is a fourth part prediction mode in the Q prediction modes;
wherein the second value is greater than the fifth value, the third value is greater than the fifth value, and the fourth value is greater than the fifth value.
Optionally, the second determining sub-module includes at least one of:
a second determining unit, configured to determine that the first motion type is a target motion type when the second determination result satisfies a third condition;
a third determination unit configured to determine that the first motion type is a normal motion type if the second determination result does not satisfy the third condition;
wherein the second determination result satisfying a third condition includes at least one of:
a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is larger than the second value;
a second proportion value corresponding to the Direct prediction mode in the Q second proportion values is larger than the third value;
a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than the fourth value;
and the second proportion value corresponding to the sixth prediction mode in the Q second proportion values is smaller than the fifth value.
Optionally, the object motion types include: an undifferentiated stationary type, a boundary motion type, a specific motion type, and a removal specific motion type;
the third determining unit is configured to at least one of:
determining that the first motion type is an undifferentiated static type under the condition that a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is larger than the second value;
determining that the first motion type is a boundary motion type under the condition that a second proportion value corresponding to a Direct prediction mode in the Q second proportion values is larger than the third value;
determining that the first motion type is a specific motion type under the condition that a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than the fourth value;
and determining the first motion type as a specific motion type under the condition that a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is smaller than the fifth value.
Optionally, the prediction mode determining apparatus 800 further includes:
a first encoding module, configured to, after determining a first prediction mode of the target LCU according to a correspondence between a motion type and a prediction mode and the first motion type, encode the i-th frame image in a first encoding manner to obtain a first encoding result;
a second obtaining module, configured to obtain, according to the first encoding result, a first prediction mode set corresponding to the ith frame of image;
a third obtaining module, configured to obtain a second prediction mode set corresponding to the ith frame image, where determination of each prediction mode in the second prediction mode set is related to a motion type, and the second prediction mode set includes the first prediction mode;
a seventh determining module for determining whether the second set of prediction modes matches the first set of prediction modes;
a second encoding module, configured to encode, in a case that the second prediction mode set does not match the first prediction mode set, an i +1 th frame image to the i + N-1 th frame image in the first encoding manner;
wherein, in the process of encoding the frame image by adopting the first encoding mode, the determination of the prediction mode of the LCU of the frame image is independent of the motion type of the LCU.
Optionally, in a case where the first motion type is determined based on a reference queue, the prediction mode determining apparatus 800 further includes:
a first updating module, configured to empty the reference queue after the i +1 th frame image to the i + N-1 th frame image are encoded in the first encoding manner, and add feature information of the i + N-1 th frame image to the reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
Optionally, the prediction mode determining apparatus 800 further includes:
an eighth determining module, configured to determine, after the determining of the first prediction mode of the target LCU, whether a ratio value of a normal motion type among motion types of LCUs in H frame images including the ith frame image is smaller than a sixth value before the determining of the first prediction mode of the target LCU according to a correspondence between a motion type and a prediction mode and the first motion type;
the second determining module 802 is specifically configured to:
under the condition that the proportion value of the common motion type in the motion types of the LCU in the H frame images is smaller than the sixth value, determining a first prediction mode of the target LCU according to the corresponding relation between the motion types and the prediction mode and the first motion type;
wherein the H frame images are continuous, and H is a positive integer.
Optionally, the prediction mode determining apparatus 800 further includes:
a third encoding module, configured to, after determining whether a ratio value of a common motion type of an LCU in H frame images including the ith frame image is smaller than a sixth value, encode the ith to (i + N-1) th frame images in a first encoding manner when the ratio value of the common motion type of the LCU in the motion types of the H frame images is greater than or equal to the sixth value;
wherein, in the process of encoding the frame image by adopting the first encoding mode, the determination of the prediction mode of the LCU of the frame image is independent of the motion type of the LCU.
Optionally, in a case where the first motion type is determined based on a reference queue, the prediction mode determining apparatus 800 further includes:
a second updating module, configured to empty the reference queue after the i frame image to the i + N-1 frame image are encoded in the first encoding manner, and add feature information of the i frame image to the i + N-1 frame image to the reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
Optionally, the prediction mode determining apparatus 800 includes:
and a fourth encoding module, configured to encode the target CU in the target LCU according to the first prediction mode after determining the first prediction mode of the target LCU according to the correspondence between the motion type and the prediction mode and the first motion type.
Optionally, the fourth encoding module includes:
a third determining sub-module, configured to determine whether the coding cost of the target CU in the first prediction mode is less than a seventh value;
a first encoding sub-module, configured to, when the encoding cost of the target CU in the first prediction mode is smaller than the seventh value, encode the target CU using the first prediction mode.
Optionally, the prediction mode determining apparatus 800 further includes:
a second sub-module, configured to, after determining whether the coding cost of the target CU in the first prediction mode is smaller than a seventh value, code the target CU in a seventh prediction mode if the coding cost of the target CU in the first prediction mode is greater than or equal to the seventh value;
and the coding cost of the target CU for coding by adopting the seventh prediction mode is less than the coding cost of the target CU for coding by adopting other prediction modes.
Optionally, in a case where the first motion type is determined based on a reference queue, the prediction mode determining apparatus 800 further includes:
a third updating module, configured to delete the feature information of the target frame image in the reference queue after the target CU in the target LCU is encoded according to the first prediction mode, and add the feature information of the ith frame image to the reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer; the target frame image meets a preset condition.
Optionally, the correspondence satisfies at least one of the following conditions:
the undifferentiated static type and the Skip prediction mode have a corresponding relation;
the boundary motion type and the Direct prediction mode have a corresponding relation;
the specific motion type has a corresponding relation with a second prediction mode, and the second prediction mode is a first part prediction mode in the L prediction modes;
removing a specific motion type from corresponding relation with a prediction mode except a third prediction mode, wherein the third prediction mode is a second part prediction mode in the L prediction modes;
the common motion type has a corresponding relation with all the prediction modes;
wherein the L prediction modes are associated with the target LCU, L being a positive integer.
In the embodiment of the invention, the prediction mode of the LCU can be determined according to the motion type of the LCU, so that the efficiency of determining the prediction mode of the LCU can be improved, and the coding efficiency of the LCU is improved.
Referring to fig. 9, fig. 9 is one of the structural diagrams of the prediction mode determination device according to the embodiment of the present invention. As shown in fig. 9, the prediction mode determining apparatus 900 includes:
a third determining module 901, configured to determine a first motion type of a target largest coding unit LCU in an ith frame image if a pixel difference between the ith frame image and an i-1 th frame image is smaller than a first value, where i is an integer greater than 1;
a fourth determining module 902, configured to determine the first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type.
Optionally, the third determining module 901 includes:
a fourth determining submodule, configured to obtain a reference queue, where the reference queue includes feature information of N frame images, the feature information includes a prediction mode of each coding unit CU in an LCU of the frame image, and N is a positive integer;
a fifth determining sub-module, configured to determine, according to the target LCU, M second LCUs in the reference queue, where the M second LCUs and the target LCU are co-located LCUs, the M second LCUs include S CUs, where L mutually different prediction modes exist among the S prediction modes of the S CUs, L is a positive integer smaller than or equal to S, S is an integer greater than or equal to M, and M is a positive integer;
a sixth determining sub-module, configured to determine the first motion type according to L first scale values corresponding to the L prediction modes, where each first scale value is a value of a number ratio S of the prediction modes corresponding to the first motion type.
Optionally, the sixth determining submodule is specifically configured to:
judging whether a first proportional value corresponding to the Skip prediction mode in the L first proportional values is larger than a second value or not;
under the condition that a first proportion value corresponding to a Skip prediction mode in the L first proportion values is smaller than or equal to the second value, judging whether a first proportion value corresponding to a second prediction mode in the L first proportion values is larger than a fourth value;
under the condition that a first proportion value corresponding to a second prediction mode in the L first proportion values is smaller than or equal to the fourth value, judging whether a first proportion value corresponding to a third prediction mode in the L first proportion values is smaller than a fifth value;
determining that the first motion type is a specific motion type removed under the condition that a first proportional value corresponding to a third prediction mode in the L first proportional values is smaller than the fifth value;
wherein the second prediction mode is a first partial prediction mode of the L prediction modes; the third prediction mode is a second partial prediction mode of the L prediction modes; the second value is greater than the fifth value and the fourth value is greater than the fifth value.
Optionally, in a case that the target LCU is a boundary LCU, the sixth determining sub-module is specifically configured to:
under the condition that a first proportion value corresponding to a second prediction mode in the L first proportion values is smaller than or equal to the fourth value, judging whether a first proportion value corresponding to a Direct prediction mode in the L first proportion values is larger than a third value or not;
under the condition that a first proportional value corresponding to a Direct prediction mode in the L first proportional values is smaller than or equal to the third value, judging whether a first proportional value corresponding to a second prediction mode in the L first proportional values is larger than a fourth value;
wherein the third value is greater than the fifth value.
Optionally, the prediction mode determining apparatus 900 further includes:
a ninth determining module to:
determining that the first motion type is an undifferentiated static type when a first scale value corresponding to the Skip prediction mode among the L first scale values is greater than the second value;
determining that the first motion type is a boundary motion type when a first proportion value corresponding to a Direct prediction mode in the L first proportion values is larger than the third value;
determining that the first motion type is a specific motion type when a first proportion value corresponding to a second prediction mode in the L first proportion values is greater than the fourth value;
and determining that the first motion type is a normal motion type when a first proportion value corresponding to a third prediction mode in the L first proportion values is greater than or equal to the fifth value.
Optionally, the correspondence satisfies at least one of the following conditions:
the undifferentiated static type and the Skip prediction mode have a corresponding relation;
the boundary motion type and the Direct prediction mode have a corresponding relation;
the specific motion type has a corresponding relation with a second prediction mode, and the second prediction mode is a first part prediction mode in the L prediction modes;
removing a specific motion type from corresponding relation with a prediction mode except a third prediction mode, wherein the third prediction mode is a second part prediction mode in the L prediction modes;
the common motion type has a corresponding relation with all the prediction modes;
wherein the L prediction modes are associated with the target LCU, L being a positive integer.
Optionally, the prediction mode determining apparatus 900 further includes:
and a fifth encoding module, configured to encode the target CU in the target LCU according to the first prediction mode after determining the first prediction mode of the target LCU according to the correspondence between the motion type and the prediction mode and the first motion type.
Optionally, the fifth encoding module includes:
a seventh determining sub-module, configured to determine whether the coding cost of the target CU in the first prediction mode is smaller than a seventh value;
a third encoding sub-module, configured to, when the encoding cost of the target CU in the first prediction mode is smaller than the seventh value, encode the target CU using the first prediction mode.
Optionally, the prediction mode determining apparatus 900 further includes:
a sixth encoding module, configured to, after determining whether the coding cost of the target CU in the first prediction mode is smaller than a seventh value, encode the target CU in a seventh prediction mode if the coding cost of the target CU in the first prediction mode is greater than or equal to the seventh value;
and the coding cost of the target CU for coding by adopting the seventh prediction mode is less than the coding cost of the target CU for coding by adopting other prediction modes.
Optionally, in a case where the first motion type is determined based on a reference queue, the prediction mode determining apparatus 900 further includes:
a fourth updating module, configured to update the reference queue with the i-th frame image according to a first-in-first-out rule after the target CU in the target LCU is encoded according to the first prediction mode;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
Optionally, the prediction mode determining apparatus 900 further includes:
a seventh encoding module, configured to, after determining the first prediction mode of the target LCU according to the correspondence between the motion type and the prediction mode and the first motion type, encode the i-th frame image in a first encoding manner to obtain a first encoding result;
a fourth obtaining module, configured to obtain, according to the first encoding result, a first prediction mode set corresponding to the ith frame of image;
a fifth obtaining module, configured to obtain a second prediction mode set corresponding to the ith frame of image, where determination of each prediction mode in the second prediction mode set is related to a motion type, and the second prediction mode set includes the first prediction mode;
a tenth determination module to determine whether the second set of prediction modes matches the first set of prediction modes;
an eighth encoding module, configured to, when the second prediction mode set is not matched with the first prediction mode set, encode an i +1 th frame image to the i + N-1 th frame image in the first encoding manner;
wherein, in the process of encoding the frame image by adopting the first encoding mode, the determination of the prediction mode of the LCU of the frame image is independent of the motion type of the LCU.
Optionally, the prediction mode determining apparatus 900 further includes:
a fifth updating module, configured to, when the first motion type is determined based on a reference queue, empty the reference queue after encoding an i +1 th frame image to the i + N-1 th frame image in the first encoding manner, and add feature information of the i + N-1 th frame image to the reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
Optionally, the prediction mode determining apparatus 900 further includes:
an eleventh determining module, configured to determine, after the determining of the first prediction mode of the target LCU, whether a ratio value of a normal motion type among motion types of LCUs in H frame images including the ith frame image is smaller than a sixth value before the determining of the first prediction mode of the target LCU according to a correspondence between a motion type and a prediction mode and the first motion type;
the fourth determining module 902902 is specifically configured to include:
under the condition that the proportion value of the common motion type in the motion types of the LCU in the H frame images is smaller than the sixth value, determining a first prediction mode of the target LCU according to the corresponding relation between the motion types and the prediction mode and the first motion type;
wherein the H frame images are continuous, and H is a positive integer.
Optionally, the prediction mode determining apparatus 900 further includes:
a ninth encoding module, configured to, after determining whether a ratio value of a common motion type of an LCU in H frame images including the ith frame image is smaller than a sixth value, encode the ith to (i + N-1) th frame images in a first encoding manner when the ratio value of the common motion type of the LCU in the motion types of the H frame images is greater than or equal to the sixth value;
wherein, in the process of encoding the frame image by adopting the first encoding mode, the determination of the prediction mode of the LCU of the frame image is independent of the motion type of the LCU.
Optionally, the prediction mode determining apparatus 900 further includes:
a sixth updating module, configured to, when the first motion type is determined based on a reference queue, empty the reference queue after the i frame image to the i + N-1 frame image are encoded in the first encoding manner, and add feature information of the i frame image to the i + N-1 frame image to the reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
Optionally, the prediction mode determining apparatus 900 includes:
a twelfth determining module, configured to, after the determining of the first motion type of the target largest coding unit LCU in the ith frame image, determine, as the first motion type, a motion type of a fifth LCU of the (i + F + 1) th frame image if a motion type of a fourth LCU of F frame images following the ith frame image is the first motion type;
wherein the fourth LCU and the target LCU are co-located LCUs, and the fifth LCU and the target LCU are co-located LCUs; f is a positive integer.
Optionally, a pixel difference between the i + F +2 frame image and the i + F +1 frame image is smaller than a first value;
the prediction mode determination apparatus 900 further includes:
a seventh obtaining module, configured to, after determining the motion type of a fifth LCU of the i + F +1 th frame image as the first motion type, obtain P LCUs included in the i + F +1 th frame image, where the P LCUs include R CUs, Q prediction modes different from each other exist among the R prediction modes of the R CUs, Q is a positive integer smaller than or equal to R, R is a positive integer greater than or equal to P, and P is a positive integer;
a thirteenth determining module, configured to determine a second motion type of the target LCU according to Q second proportional values corresponding to the Q prediction modes, where each second proportional value is a value of a number ratio R of the prediction modes corresponding to the second proportional value;
a fourteenth determining module, configured to determine, according to a reference queue, a third motion type of a third LCU of the i + F +2 th frame image when the second motion type is different from the first motion type, where the third LCU and the target LCU are co-located LCUs, the reference queue includes feature information of N frame images, and N is a positive integer;
a fifteenth determination module to determine a fourth prediction mode for the third LCU based on the third motion type.
Optionally, the thirteenth determining module is specifically configured to:
judging whether a second proportional value corresponding to the Skip prediction mode in the Q second proportional values is larger than a second value or not;
under the condition that a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is smaller than or equal to the second value, judging whether a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than a fourth value;
under the condition that a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is smaller than or equal to the fourth value, judging whether a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is smaller than a fifth value or not;
determining that the second motion type of the target LCU is a specific motion type removed under the condition that a second proportional value corresponding to a sixth prediction mode in the Q second proportional values is smaller than the fifth value;
wherein the fifth prediction mode is a third partial prediction mode of the Q prediction modes; the sixth prediction mode is a fourth partial prediction mode of the Q prediction modes; the second value is greater than the fifth value and the fourth value is greater than the fifth value.
Optionally, when the target LCU is a boundary LCU and a second ratio value corresponding to the Skip prediction mode in the Q second ratio values is less than or equal to the second value, the thirteenth determining module is specifically configured to:
under the condition that a second proportional value corresponding to the Skip prediction mode in the Q second proportional values is smaller than or equal to the second value, judging whether the second proportional value corresponding to the Direct prediction mode in the Q second proportional values is larger than a third value or not;
under the condition that a second proportion value corresponding to a Direct prediction mode in the Q second proportion values is larger than or equal to the third value, judging whether a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than a fourth value or not;
wherein the third value is greater than the fifth value.
Optionally, the prediction mode determining apparatus 900 further includes:
a fourteenth determination module to:
determining that a second motion type of the target LCU is an undifferentiated stationary type when a second scale value corresponding to the Skip prediction mode among the Q second scale values is greater than the second value;
determining that the second motion type of the target LCU is a boundary motion type when a second proportional value corresponding to a Direct prediction mode among the Q second proportional values is greater than the third value;
determining that the second motion type of the target LCU is a specific motion type when a second proportion value corresponding to a fifth prediction mode among the Q second proportion values is greater than the fourth value;
determining that the second motion type of the target LCU is a normal motion type when a second proportion value corresponding to a sixth prediction mode among the Q second proportion values is greater than or equal to the fifth value.
In the embodiment of the invention, the prediction mode of the LCU can be determined according to the motion type of the LCU, so that the efficiency of determining the prediction mode of the LCU can be improved, and the coding efficiency of the LCU is improved.
Referring to fig. 10, fig. 10 is a second block diagram of a prediction mode determining apparatus according to an embodiment of the present invention. As shown in fig. 10, the prediction mode determination device 1000 may include:
a transceiver 1003 for receiving and transmitting data under the control of the process 1001.
Where in fig. 10 the bus architecture may include any number of interconnected buses and bridges, with one or more processors, represented by the processor 1001, and various circuits, represented by the memory 1002, being linked together. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. The bus interface provides an interface. The transceiver 1003 may be a number of elements including a transmitter and a transceiver, providing a means for communicating with various other apparatus over a transmission medium. The processor 1001 is responsible for managing the bus architecture and general processing, and the memory 1002 may store data used by the processor 1001 in performing operations.
The processor 1001 is responsible for managing the bus architecture and general processing, and the memory 1002 may store data used by the processor 1001 in performing operations.
In one embodiment, the processor 1001, configured to read the program stored in the memory 1002, performs the following processes:
determining a first motion type of a target Largest Coding Unit (LCU) in an ith frame image, wherein i is an integer greater than 1;
and determining a first prediction mode of the target LCU according to the corresponding relation between the motion type and the prediction mode and the first motion type.
Optionally, the processor 1001 is further configured to read the computer program and execute the following steps:
determining a first motion type of a target Largest Coding Unit (LCU) in an ith frame image if the ith frame image satisfies a first condition;
wherein the ith frame image satisfies a first condition including any one of:
the pixel difference between the ith frame image and the (i-1) th frame image is smaller than a first value;
the motion types of first LCUs of k frame images before the ith frame image are the same, the first LCUs and the target LCU are same-position LCUs, k is a positive integer, and i is an integer larger than k.
Optionally, in a case that the meeting of the first condition for the ith frame image includes that the pixel difference between the ith frame image and the (i-1) th frame image is smaller than a first value, the processor 1001 is further configured to read the computer program, and execute the following steps:
determining the first motion type from a reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
Optionally, in a case that the feature information includes a prediction mode of each coding unit CU in the LCU of the frame image, the processor 1001 is further configured to read the computer program, and perform the following steps:
determining M second LCUs in the reference queue according to the target LCU, wherein the M second LCUs and the target LCU are co-located LCUs, the M second LCUs comprise S CUs, L mutually different prediction modes exist in the S prediction modes of the S CUs, L is a positive integer smaller than or equal to S, S is an integer larger than or equal to M, and M is a positive integer;
and determining the first motion type according to L first scale values corresponding to the L prediction modes, wherein each first scale value is the value of the quantity ratio S of the corresponding prediction mode.
Optionally, the processor 1001 is further configured to read the computer program and execute the following steps:
executing the first judgment to obtain a first judgment result;
determining the first motion type according to the first judgment result;
wherein the first determination comprises at least one of:
judging whether a first proportional value corresponding to the Skip prediction mode in the L first proportional values is larger than a second value or not;
under the condition that the target LCU is a boundary LCU, judging whether a first proportional value corresponding to a Direct prediction mode in the L first proportional values is larger than a third value or not;
judging whether a first proportion value corresponding to a second prediction mode in the L first proportion values is larger than a fourth value, wherein the second prediction mode is a first part prediction mode in the L prediction modes;
judging whether a first proportion value corresponding to a third prediction mode in the L first proportion values is smaller than a fifth value, wherein the third prediction mode is a second part prediction mode in the L prediction modes;
wherein the second value is greater than the fifth value, the third value is greater than the fifth value, and the fourth value is greater than the fifth value.
Optionally, the processor 1001 is further configured to read the computer program and execute at least one of the following:
determining that the first motion type is a target motion type under the condition that the first judgment result meets a second condition;
determining that the first motion type is a common motion type under the condition that the first judgment result does not meet the second condition;
wherein the first judgment result meeting the second condition comprises at least one of the following:
a first scale value corresponding to the Skip prediction mode in the L first scale values is larger than the second value;
a first proportional value corresponding to a Direct prediction mode in the L first proportional values is greater than the third value;
a first proportion value corresponding to a second prediction mode in the L first proportion values is larger than the fourth value;
a first ratio value corresponding to a third prediction mode among the L first ratio values is smaller than the fifth value.
Optionally, the object motion types include: an undifferentiated stationary type, a boundary motion type, a specific motion type, and a removal specific motion type;
the processor 1001 is further configured to read the computer program and perform at least one of the following:
determining that the first motion type is an undifferentiated static type when a first scale value corresponding to the Skip prediction mode among the L first scale values is greater than the second value;
determining that the first motion type is a boundary motion type when a first proportion value corresponding to a Direct prediction mode in the L first proportion values is larger than the third value;
determining that the first motion type is a specific motion type when a first proportion value corresponding to a second prediction mode in the L first proportion values is greater than the fourth value;
and determining the first motion type as a specific motion type removal if a first proportion value corresponding to a third prediction mode among the L first proportion values is smaller than the fifth value.
Optionally, in a case that the ith frame image satisfies the first condition, where the motion type of the first LCU of the k frame image before the ith frame image is the same, the processor 1001 is further configured to read the computer program, and execute the following steps:
determining a motion type of the first LCU as the first motion type.
Optionally, a pixel difference between the i +1 th frame image and the i frame image is smaller than a first value;
after the determining the first prediction mode for the target LCU, the method further comprises:
acquiring P LCUs included in the ith frame image, wherein the P LCUs include R CUs, Q mutually different prediction modes exist in the R prediction modes of the R CUs, Q is a positive integer smaller than or equal to R, R is a positive integer larger than or equal to P, and P is a positive integer;
determining a second motion type of the target LCU according to Q second proportional values corresponding to the Q prediction modes, wherein each second proportional value is a value of the number ratio R of the corresponding prediction modes;
determining a third motion type of a third LCU in the i +1 th frame image according to a reference queue under the condition that the second motion type is different from the first motion type, wherein the third LCU and the target LCU are co-located LCUs, the reference queue comprises feature information of N frame images, and N is a positive integer;
determining a fourth prediction mode for the third LCU based on the third motion type.
Optionally, the processor 1001 is further configured to read the computer program and execute the following steps:
executing the second judgment to obtain a second judgment result;
determining the second motion type according to the second judgment result;
wherein the second determination comprises at least one of:
judging whether a second proportional value corresponding to the Skip prediction mode in the Q second proportional values is larger than a second value;
under the condition that the target LCU is a boundary LCU, judging whether a second proportional value corresponding to a Direct prediction mode in the Q second proportional values is larger than a third value or not;
judging whether a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than a fourth value, wherein the fifth prediction mode is a third part prediction mode in the Q prediction modes;
judging whether a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is smaller than a fifth value, wherein the sixth prediction mode is a fourth part prediction mode in the Q prediction modes;
wherein the second value is greater than the fifth value, the third value is greater than the fifth value, and the fourth value is greater than the fifth value.
Optionally, the processor 1001 is further configured to read the computer program and execute at least one of the following:
determining that the first motion type is a target motion type under the condition that the second judgment result meets a third condition;
determining that the first motion type is a normal motion type when the second judgment result does not satisfy the third condition;
wherein the second determination result satisfying a third condition includes at least one of:
a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is larger than the second value;
a second proportion value corresponding to the Direct prediction mode in the Q second proportion values is larger than the third value;
a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than the fourth value;
and the second proportion value corresponding to the sixth prediction mode in the Q second proportion values is smaller than the fifth value.
Optionally, the object motion types include: an undifferentiated stationary type, a boundary motion type, a specific motion type, and a removal specific motion type;
the processor 1001 is further configured to read the computer program and perform at least one of the following:
determining that the first motion type is an undifferentiated static type under the condition that a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is larger than the second value;
determining that the first motion type is a boundary motion type under the condition that a second proportion value corresponding to a Direct prediction mode in the Q second proportion values is larger than the third value;
determining that the first motion type is a specific motion type under the condition that a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than the fourth value;
and determining the first motion type as a specific motion type under the condition that a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is smaller than the fifth value.
Optionally, the processor 1001 is further configured to read the computer program and execute the following steps:
coding the ith frame image by adopting a first coding mode to obtain a first coding result;
acquiring a first prediction mode set corresponding to the ith frame of image according to the first coding result;
acquiring a second prediction mode set corresponding to the ith frame image, wherein the determination of each prediction mode in the second prediction mode set is related to the motion type, and the second prediction mode set comprises the first prediction mode;
determining whether the second set of prediction modes matches the first set of prediction modes;
under the condition that the second prediction mode set is not matched with the first prediction mode set, encoding the (i + 1) th frame image to the (i + N-1) th frame image by adopting the first encoding mode;
wherein, in the process of encoding the frame image by adopting the first encoding mode, the determination of the prediction mode of the LCU of the frame image is independent of the motion type of the LCU.
Optionally, in the case that the first motion type is determined based on a reference queue, the processor 1001 is further configured to read the computer program, and execute the following steps:
emptying the reference queue, and adding the characteristic information from the ith frame image to the (i + N-1) th frame image into the reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
Optionally, the processor 1001 is further configured to read the computer program and execute the following steps:
determining whether a scale value of a normal motion type among motion types of LCUs in H frame images including the ith frame image is less than a sixth value;
determining a first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, including:
under the condition that the proportion value of the common motion type in the motion types of the LCU in the H frame images is smaller than the sixth value, determining a first prediction mode of the target LCU according to the corresponding relation between the motion types and the prediction mode and the first motion type;
wherein the H frame images are continuous, and H is a positive integer.
Optionally, the processor 1001 is further configured to read the computer program and execute the following steps:
under the condition that the proportion value of the common motion type in the motion types of the LCUs in the H frame images is larger than or equal to the sixth value, encoding the i frame image to the (i + N-1) frame image by adopting a first encoding mode;
wherein, in the process of encoding the frame image by adopting the first encoding mode, the determination of the prediction mode of the LCU of the frame image is independent of the motion type of the LCU.
Optionally, in the case that the first motion type is determined based on a reference queue, the processor 1001 is further configured to read the computer program, and execute the following steps:
emptying the reference queue, and adding the characteristic information from the ith frame image to the (i + N-1) th frame image into the reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
Optionally, the processor 1001 is further configured to read the computer program and execute the following steps:
encoding a target CU in the target LCU according to the first prediction mode.
Optionally, the encoding the target CU in the target LCU according to the first prediction mode includes:
determining whether an encoding cost of the target CU in the first prediction mode is less than a seventh value;
and in the case that the coding cost of the target CU in the first prediction mode is smaller than the seventh value, coding the target CU in the first prediction mode.
Optionally, the processor 1001 is further configured to read the computer program and execute the following steps:
if the coding cost of the target CU in the first prediction mode is larger than or equal to the seventh value, adopting a seventh prediction mode to code the target CU;
and the coding cost of the target CU for coding by adopting the seventh prediction mode is less than the coding cost of the target CU for coding by adopting other prediction modes.
Optionally, in the case that the first motion type is determined based on a reference queue, the processor 1001 is further configured to read the computer program, and execute the following steps:
deleting the characteristic information of the target frame image in the reference queue, and adding the characteristic information of the ith frame image into the reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer; the target frame image meets a preset condition.
Optionally, the correspondence satisfies at least one of the following conditions:
the undifferentiated static type and the Skip prediction mode have a corresponding relation;
the boundary motion type and the Direct prediction mode have a corresponding relation;
the specific motion type has a corresponding relation with a second prediction mode, and the second prediction mode is a first part prediction mode in the L prediction modes;
removing a specific motion type from corresponding relation with a prediction mode except a third prediction mode, wherein the third prediction mode is a second part prediction mode in the L prediction modes;
the common motion type has a corresponding relation with all the prediction modes;
wherein the L prediction modes are associated with the target LCU, L being a positive integer.
For this embodiment, the prediction mode determining device provided in the embodiment of the present invention may execute the method embodiment corresponding to fig. 5, and the implementation principle and the technical effect are similar, which is not described herein again.
In another embodiment, the processor 1001 is configured to read a program stored in the memory 1002 and execute the following processes:
determining a first motion type of a target Largest Coding Unit (LCU) in an ith frame image under the condition that the pixel difference between the ith frame image and an (i-1) th frame image is smaller than a first value, wherein i is an integer larger than 1;
and determining a first prediction mode of the target LCU according to the corresponding relation between the motion type and the prediction mode and the first motion type.
Optionally, the processor 1001 is further configured to read the computer program and execute the following steps:
acquiring a reference queue, wherein the reference queue comprises feature information of N frame images, the feature information comprises a prediction mode of each coding unit CU in an LCU of the frame images, and N is a positive integer;
determining M second LCUs in the reference queue according to the target LCU, wherein the M second LCUs and the target LCU are co-located LCUs, the M second LCUs comprise S CUs, L mutually different prediction modes exist in the S prediction modes of the S CUs, L is a positive integer smaller than or equal to S, S is an integer larger than or equal to M, and M is a positive integer;
and determining the first motion type according to L first scale values corresponding to the L prediction modes, wherein each first scale value is the value of the quantity ratio S of the corresponding prediction mode.
Optionally, the processor 1001 is further configured to read the computer program and execute the following steps:
judging whether a first proportional value corresponding to the Skip prediction mode in the L first proportional values is larger than a second value or not;
under the condition that a first proportion value corresponding to a Skip prediction mode in the L first proportion values is smaller than or equal to the second value, judging whether a first proportion value corresponding to a second prediction mode in the L first proportion values is larger than a fourth value;
under the condition that a first proportion value corresponding to a second prediction mode in the L first proportion values is smaller than or equal to the fourth value, judging whether a first proportion value corresponding to a third prediction mode in the L first proportion values is smaller than a fifth value;
determining that the first motion type is a specific motion type removed under the condition that a first proportional value corresponding to a third prediction mode in the L first proportional values is smaller than the fifth value;
wherein the second prediction mode is a first partial prediction mode of the L prediction modes; the third prediction mode is a second partial prediction mode of the L prediction modes; the second value is greater than the fifth value and the fourth value is greater than the fifth value.
Optionally, when the target LCU is a boundary LCU and the first proportional value corresponding to the second prediction mode in the L first proportional values is less than or equal to the fourth value, the processor 1001 is further configured to read the computer program, and execute the following steps:
under the condition that a first proportion value corresponding to a second prediction mode in the L first proportion values is smaller than or equal to the fourth value, judging whether a first proportion value corresponding to a Direct prediction mode in the L first proportion values is larger than a third value or not;
under the condition that a first proportional value corresponding to a Direct prediction mode in the L first proportional values is smaller than or equal to the third value, judging whether a first proportional value corresponding to a second prediction mode in the L first proportional values is larger than a fourth value;
wherein the third value is greater than the fifth value.
Optionally, the processor 1001 is further configured to read the computer program and execute the following steps:
determining that the first motion type is an undifferentiated static type when a first scale value corresponding to the Skip prediction mode among the L first scale values is greater than the second value;
determining that the first motion type is a boundary motion type when a first proportion value corresponding to a Direct prediction mode in the L first proportion values is larger than the third value;
determining that the first motion type is a specific motion type when a first proportion value corresponding to a second prediction mode in the L first proportion values is greater than the fourth value;
and determining that the first motion type is a normal motion type when a first proportion value corresponding to a third prediction mode in the L first proportion values is greater than or equal to the fifth value.
Optionally, the correspondence satisfies at least one of the following conditions:
the undifferentiated static type and the Skip prediction mode have a corresponding relation;
the boundary motion type and the Direct prediction mode have a corresponding relation;
the specific motion type has a corresponding relation with a second prediction mode, and the second prediction mode is a first part prediction mode in the L prediction modes;
removing a specific motion type from corresponding relation with a prediction mode except a third prediction mode, wherein the third prediction mode is a second part prediction mode in the L prediction modes;
the common motion type has a corresponding relation with all the prediction modes;
wherein the L prediction modes are associated with the target LCU, L being a positive integer.
Optionally, the processor 1001 is further configured to read the computer program and execute the following steps:
encoding a target CU in the target LCU according to the first prediction mode.
Optionally, the encoding the target CU in the target LCU according to the first prediction mode includes:
determining whether an encoding cost of the target CU in the first prediction mode is less than a seventh value;
and in the case that the coding cost of the target CU in the first prediction mode is smaller than the seventh value, coding the target CU in the first prediction mode.
Optionally, the processor 1001 is further configured to read the computer program and execute the following steps:
if the coding cost of the target CU in the first prediction mode is larger than or equal to the seventh value, adopting a seventh prediction mode to code the target CU;
and the coding cost of the target CU for coding by adopting the seventh prediction mode is less than the coding cost of the target CU for coding by adopting other prediction modes.
Optionally, the processor 1001 is further configured to read the computer program and execute the following steps:
updating the reference queue by using the ith frame image according to a first-in first-out rule;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
Optionally, the processor 1001 is further configured to read the computer program and execute the following steps:
coding the ith frame image by adopting a first coding mode to obtain a first coding result;
acquiring a first prediction mode set corresponding to the ith frame of image according to the first coding result;
acquiring a second prediction mode set corresponding to the ith frame image, wherein the determination of each prediction mode in the second prediction mode set is related to the motion type, and the second prediction mode set comprises the first prediction mode;
determining whether the second set of prediction modes matches the first set of prediction modes;
under the condition that the second prediction mode set is not matched with the first prediction mode set, encoding the (i + 1) th frame image to the (i + N-1) th frame image by adopting the first encoding mode;
wherein, in the process of encoding the frame image by adopting the first encoding mode, the determination of the prediction mode of the LCU of the frame image is independent of the motion type of the LCU.
Optionally, the processor 1001 is further configured to read the computer program and execute the following steps:
emptying the reference queue, and adding the characteristic information from the ith frame image to the (i + N-1) th frame image into the reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
Optionally, the processor 1001 is further configured to read the computer program and execute the following steps:
determining whether a scale value of a normal motion type among motion types of LCUs in H frame images including the ith frame image is less than a sixth value;
under the condition that the proportion value of the common motion type in the motion types of the LCU in the H frame images is smaller than the sixth value, determining a first prediction mode of the target LCU according to the corresponding relation between the motion types and the prediction mode and the first motion type;
wherein the H frame images are continuous, and H is a positive integer.
Optionally, the processor 1001 is further configured to read the computer program and execute the following steps:
under the condition that the proportion value of the common motion type in the motion types of the LCUs in the H frame images is larger than or equal to the sixth value, encoding the i frame image to the (i + N-1) frame image by adopting a first encoding mode;
wherein, in the process of encoding the frame image by adopting the first encoding mode, the determination of the prediction mode of the LCU of the frame image is independent of the motion type of the LCU.
Optionally, in the case that the first motion type is determined based on a reference queue, the processor 1001 is further configured to read the computer program, and execute the following steps:
emptying the reference queue, and adding the characteristic information from the ith frame image to the (i + N-1) th frame image into the reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
Optionally, the processor 1001 is further configured to read the computer program and execute the following steps:
determining a motion type of a fifth LCU of an i + F +1 frame image as the first motion type, in case that the motion type of a fourth LCU of F frame images subsequent to the i frame image is the first motion type;
wherein the fourth LCU and the target LCU are co-located LCUs, and the fifth LCU and the target LCU are co-located LCUs; f is a positive integer.
Optionally, a pixel difference between the i + F +2 frame image and the i + F +1 frame image is smaller than a first value;
the processor 1001 is further configured to read the computer program and execute the following steps:
obtaining P LCUs included in the i + F +1 th frame image, wherein the P LCUs include R CUs, Q mutually different prediction modes exist in the R prediction modes of the R CUs, Q is a positive integer smaller than or equal to R, R is a positive integer larger than or equal to P, and P is a positive integer;
determining a second motion type of the target LCU according to Q second proportional values corresponding to the Q prediction modes, wherein each second proportional value is a value of the number ratio R of the corresponding prediction modes;
determining a third motion type of a third LCU of the i + F +2 th frame image according to a reference queue under the condition that the second motion type is different from the first motion type, wherein the third LCU and the target LCU are co-located LCUs, the reference queue comprises feature information of N frame images, and N is a positive integer;
determining a fourth prediction mode for the third LCU based on the third motion type.
Optionally, the processor 1001 is further configured to read the computer program and execute the following steps:
judging whether a second proportional value corresponding to the Skip prediction mode in the Q second proportional values is larger than a second value or not;
under the condition that a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is smaller than or equal to the second value, judging whether a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than a fourth value;
under the condition that a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is smaller than or equal to the fourth value, judging whether a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is smaller than a fifth value or not;
determining that the second motion type of the target LCU is a specific motion type removed under the condition that a second proportional value corresponding to a sixth prediction mode in the Q second proportional values is smaller than the fifth value;
wherein the fifth prediction mode is a third partial prediction mode of the Q prediction modes; the sixth prediction mode is a fourth partial prediction mode of the Q prediction modes; the second value is greater than the fifth value and the fourth value is greater than the fifth value.
Optionally, in a case that the target LCU is a boundary LCU, and in a case that a second ratio value corresponding to the Skip prediction mode in the Q second ratio values is less than or equal to the second value, the processor 1001 is further configured to read the computer program, and execute the following steps:
under the condition that a second proportional value corresponding to the Skip prediction mode in the Q second proportional values is smaller than or equal to the second value, judging whether the second proportional value corresponding to the Direct prediction mode in the Q second proportional values is larger than a third value or not;
under the condition that a second proportion value corresponding to a Direct prediction mode in the Q second proportion values is larger than or equal to the third value, judging whether a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than a fourth value or not;
wherein the third value is greater than the fifth value.
Optionally, the processor 1001 is further configured to read the computer program and execute the following steps:
determining that a second motion type of the target LCU is an undifferentiated stationary type when a second scale value corresponding to the Skip prediction mode among the Q second scale values is greater than the second value;
determining that the second motion type of the target LCU is a boundary motion type when a second proportional value corresponding to a Direct prediction mode among the Q second proportional values is greater than the third value;
determining that the second motion type of the target LCU is a specific motion type when a second proportion value corresponding to a fifth prediction mode among the Q second proportion values is greater than the fourth value;
determining that the second motion type of the target LCU is a normal motion type when a second proportion value corresponding to a sixth prediction mode among the Q second proportion values is greater than or equal to the fifth value.
For this embodiment, the prediction mode determining device provided in the embodiment of the present invention may execute the method embodiment corresponding to fig. 6, and the implementation principle and the technical effect are similar, which is not described herein again.
Furthermore, a computer-readable storage medium of an embodiment of the present invention stores a computer program.
In a first embodiment, the computer program is executable by a processor to perform the steps of:
determining a first motion type of a target Largest Coding Unit (LCU) in an ith frame image, wherein i is an integer greater than 1;
and determining a first prediction mode of the target LCU according to the corresponding relation between the motion type and the prediction mode and the first motion type.
Optionally, the determining a first motion type of a target largest coding unit LCU in an ith frame image includes:
determining a first motion type of a target Largest Coding Unit (LCU) in an ith frame image if the ith frame image satisfies a first condition;
wherein the ith frame image satisfies a first condition including any one of:
the pixel difference between the ith frame image and the (i-1) th frame image is smaller than a first value;
the motion types of first LCUs of k frame images before the ith frame image are the same, the first LCUs and the target LCU are same-position LCUs, k is a positive integer, and i is an integer larger than k.
Optionally, in a case that the meeting of the first condition for the ith frame image includes that the pixel difference between the ith frame image and the (i-1) th frame image is smaller than a first value, the determining the first motion type of the target largest coding unit LCU in the ith frame image includes:
determining the first motion type from a reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
Optionally, in a case that the feature information includes a prediction mode of each coding unit CU in an LCU of a frame image, the determining the first motion type according to the reference queue includes:
determining M second LCUs in the reference queue according to the target LCU, wherein the M second LCUs and the target LCU are co-located LCUs, the M second LCUs comprise S CUs, L mutually different prediction modes exist in the S prediction modes of the S CUs, L is a positive integer smaller than or equal to S, S is an integer larger than or equal to M, and M is a positive integer;
and determining the first motion type according to L first scale values corresponding to the L prediction modes, wherein each first scale value is the value of the quantity ratio S of the corresponding prediction mode.
Optionally, the determining the first motion type according to the L first scale values corresponding to the L prediction modes includes:
executing the first judgment to obtain a first judgment result;
determining the first motion type according to the first judgment result;
wherein the first determination comprises at least one of:
judging whether a first proportional value corresponding to the Skip prediction mode in the L first proportional values is larger than a second value or not;
under the condition that the target LCU is a boundary LCU, judging whether a first proportional value corresponding to a Direct prediction mode in the L first proportional values is larger than a third value or not;
judging whether a first proportion value corresponding to a second prediction mode in the L first proportion values is larger than a fourth value, wherein the second prediction mode is a first part prediction mode in the L prediction modes;
judging whether a first proportion value corresponding to a third prediction mode in the L first proportion values is smaller than a fifth value, wherein the third prediction mode is a second part prediction mode in the L prediction modes;
wherein the second value is greater than the fifth value, the third value is greater than the fifth value, and the fourth value is greater than the fifth value.
Optionally, the determining the first motion type according to the first determination result includes at least one of:
determining that the first motion type is a target motion type under the condition that the first judgment result meets a second condition;
determining that the first motion type is a common motion type under the condition that the first judgment result does not meet the second condition;
wherein the first judgment result meeting the second condition comprises at least one of the following:
a first scale value corresponding to the Skip prediction mode in the L first scale values is larger than the second value;
a first proportional value corresponding to a Direct prediction mode in the L first proportional values is greater than the third value;
a first proportion value corresponding to a second prediction mode in the L first proportion values is larger than the fourth value;
a first ratio value corresponding to a third prediction mode among the L first ratio values is smaller than the fifth value.
Optionally, the object motion types include: an undifferentiated stationary type, a boundary motion type, a specific motion type, and a removal specific motion type;
determining that the first motion type is a target motion type under the condition that the first judgment result meets a second condition, wherein the first motion type comprises at least one of the following items:
determining that the first motion type is an undifferentiated static type when a first scale value corresponding to the Skip prediction mode among the L first scale values is greater than the second value;
determining that the first motion type is a boundary motion type when a first proportion value corresponding to a Direct prediction mode in the L first proportion values is larger than the third value;
determining that the first motion type is a specific motion type when a first proportion value corresponding to a second prediction mode in the L first proportion values is greater than the fourth value;
and determining the first motion type as a specific motion type removal if a first proportion value corresponding to a third prediction mode among the L first proportion values is smaller than the fifth value.
Optionally, in a case that the ith frame picture satisfies the first condition, where the motion type of the first LCU of a k frame picture before the ith frame picture is the same, the determining the first motion type of the target largest coding unit LCU in the ith frame picture includes:
determining a motion type of the first LCU as the first motion type.
Optionally, a pixel difference between the i +1 th frame image and the i frame image is smaller than a first value;
after the determining the first prediction mode for the target LCU, the method further comprises:
acquiring P LCUs included in the ith frame image, wherein the P LCUs include R CUs, Q mutually different prediction modes exist in the R prediction modes of the R CUs, Q is a positive integer smaller than or equal to R, R is a positive integer larger than or equal to P, and P is a positive integer;
determining a second motion type of the target LCU according to Q second proportional values corresponding to the Q prediction modes, wherein each second proportional value is a value of the number ratio R of the corresponding prediction modes;
determining a third motion type of a third LCU in the i +1 th frame image according to a reference queue under the condition that the second motion type is different from the first motion type, wherein the third LCU and the target LCU are co-located LCUs, the reference queue comprises feature information of N frame images, and N is a positive integer;
determining a fourth prediction mode for the third LCU based on the third motion type.
Optionally, the determining a second motion type of the target LCU according to Q second proportional values corresponding to the Q prediction modes includes:
executing the second judgment to obtain a second judgment result;
determining the second motion type according to the second judgment result;
wherein the second determination comprises at least one of:
judging whether a second proportional value corresponding to the Skip prediction mode in the Q second proportional values is larger than a second value;
under the condition that the target LCU is a boundary LCU, judging whether a second proportional value corresponding to a Direct prediction mode in the Q second proportional values is larger than a third value or not;
judging whether a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than a fourth value, wherein the fifth prediction mode is a third part prediction mode in the Q prediction modes;
judging whether a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is smaller than a fifth value, wherein the sixth prediction mode is a fourth part prediction mode in the Q prediction modes;
wherein the second value is greater than the fifth value, the third value is greater than the fifth value, and the fourth value is greater than the fifth value.
Optionally, the determining the second motion type according to the second determination result includes at least one of:
determining that the first motion type is a target motion type under the condition that the second judgment result meets a third condition;
determining that the first motion type is a normal motion type when the second judgment result does not satisfy the third condition;
wherein the second determination result satisfying a third condition includes at least one of:
a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is larger than the second value;
a second proportion value corresponding to the Direct prediction mode in the Q second proportion values is larger than the third value;
a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than the fourth value;
and the second proportion value corresponding to the sixth prediction mode in the Q second proportion values is smaller than the fifth value.
Optionally, the object motion types include: an undifferentiated stationary type, a boundary motion type, a specific motion type, and a removal specific motion type;
determining that the first motion type is a target motion type under the condition that the second judgment result meets a third condition, wherein the first motion type comprises at least one of the following items:
determining that the first motion type is an undifferentiated static type under the condition that a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is larger than the second value;
determining that the first motion type is a boundary motion type under the condition that a second proportion value corresponding to a Direct prediction mode in the Q second proportion values is larger than the third value;
determining that the first motion type is a specific motion type under the condition that a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than the fourth value;
and determining the first motion type as a specific motion type under the condition that a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is smaller than the fifth value.
Optionally, after determining the first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, the method further includes:
coding the ith frame image by adopting a first coding mode to obtain a first coding result;
acquiring a first prediction mode set corresponding to the ith frame of image according to the first coding result;
acquiring a second prediction mode set corresponding to the ith frame image, wherein the determination of each prediction mode in the second prediction mode set is related to the motion type, and the second prediction mode set comprises the first prediction mode;
determining whether the second set of prediction modes matches the first set of prediction modes;
under the condition that the second prediction mode set is not matched with the first prediction mode set, encoding the (i + 1) th frame image to the (i + N-1) th frame image by adopting the first encoding mode;
wherein, in the process of encoding the frame image by adopting the first encoding mode, the determination of the prediction mode of the LCU of the frame image is independent of the motion type of the LCU.
Optionally, when the first motion type is determined based on a reference queue, after the i +1 th frame image to the i + N-1 th frame image are encoded by using the first encoding method, the method further includes:
emptying the reference queue, and adding the characteristic information from the ith frame image to the (i + N-1) th frame image into the reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
Optionally, after determining the first prediction mode of the target LCU, before determining the first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, the method further includes:
determining whether a scale value of a normal motion type among motion types of LCUs in H frame images including the ith frame image is less than a sixth value;
determining a first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, including:
under the condition that the proportion value of the common motion type in the motion types of the LCU in the H frame images is smaller than the sixth value, determining a first prediction mode of the target LCU according to the corresponding relation between the motion types and the prediction mode and the first motion type;
wherein the H frame images are continuous, and H is a positive integer.
Optionally, after determining whether a proportion value of a normal motion type of an LCU in H frame images including the ith frame image is smaller than a sixth value, the method further includes:
under the condition that the proportion value of the common motion type in the motion types of the LCUs in the H frame images is larger than or equal to the sixth value, encoding the i frame image to the (i + N-1) frame image by adopting a first encoding mode;
wherein, in the process of encoding the frame image by adopting the first encoding mode, the determination of the prediction mode of the LCU of the frame image is independent of the motion type of the LCU.
Optionally, when the first motion type is determined based on a reference queue, after the i frame image to the i + N-1 frame image are encoded in the first encoding manner, the method further includes:
emptying the reference queue, and adding the characteristic information from the ith frame image to the (i + N-1) th frame image into the reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
Optionally, after determining the first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, the method includes:
encoding a target CU in the target LCU according to the first prediction mode.
Optionally, the encoding the target CU in the target LCU according to the first prediction mode includes:
determining whether an encoding cost of the target CU in the first prediction mode is less than a seventh value;
and in the case that the coding cost of the target CU in the first prediction mode is smaller than the seventh value, coding the target CU in the first prediction mode.
Optionally, after determining whether the coding cost of the target CU in the first prediction mode is smaller than a seventh value, the method further includes:
if the coding cost of the target CU in the first prediction mode is larger than or equal to the seventh value, adopting a seventh prediction mode to code the target CU;
and the coding cost of the target CU for coding by adopting the seventh prediction mode is less than the coding cost of the target CU for coding by adopting other prediction modes.
Optionally, in a case that the first motion type is determined based on a reference queue, after the encoding the target CU in the target LCU according to the first prediction mode, the method further includes:
deleting the characteristic information of the target frame image in the reference queue, and adding the characteristic information of the ith frame image into the reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer; the target frame image meets a preset condition.
Optionally, the correspondence satisfies at least one of the following conditions:
the undifferentiated static type and the Skip prediction mode have a corresponding relation;
the boundary motion type and the Direct prediction mode have a corresponding relation;
the specific motion type has a corresponding relation with a second prediction mode, and the second prediction mode is a first part prediction mode in the L prediction modes;
removing a specific motion type from corresponding relation with a prediction mode except a third prediction mode, wherein the third prediction mode is a second part prediction mode in the L prediction modes;
the common motion type has a corresponding relation with all the prediction modes;
wherein the L prediction modes are associated with the target LCU, L being a positive integer.
In a second embodiment, the computer program is executable by a processor to perform the steps of:
determining a first motion type of a target Largest Coding Unit (LCU) in an ith frame image under the condition that the pixel difference between the ith frame image and an (i-1) th frame image is smaller than a first value, wherein i is an integer larger than 1;
and determining a first prediction mode of the target LCU according to the corresponding relation between the motion type and the prediction mode and the first motion type.
Optionally, the determining a first motion type of a target largest coding unit LCU in an ith frame image includes:
acquiring a reference queue, wherein the reference queue comprises feature information of N frame images, the feature information comprises a prediction mode of each coding unit CU in an LCU of the frame images, and N is a positive integer;
determining M second LCUs in the reference queue according to the target LCU, wherein the M second LCUs and the target LCU are co-located LCUs, the M second LCUs comprise S CUs, L mutually different prediction modes exist in the S prediction modes of the S CUs, L is a positive integer smaller than or equal to S, S is an integer larger than or equal to M, and M is a positive integer;
and determining the first motion type according to L first scale values corresponding to the L prediction modes, wherein each first scale value is the value of the quantity ratio S of the corresponding prediction mode.
Optionally, the determining the first motion type according to the L first scale values corresponding to the L prediction modes includes:
judging whether a first proportional value corresponding to the Skip prediction mode in the L first proportional values is larger than a second value or not;
under the condition that a first proportion value corresponding to a Skip prediction mode in the L first proportion values is smaller than or equal to the second value, judging whether a first proportion value corresponding to a second prediction mode in the L first proportion values is larger than a fourth value;
under the condition that a first proportion value corresponding to a second prediction mode in the L first proportion values is smaller than or equal to the fourth value, judging whether a first proportion value corresponding to a third prediction mode in the L first proportion values is smaller than a fifth value;
determining that the first motion type is a specific motion type removed under the condition that a first proportional value corresponding to a third prediction mode in the L first proportional values is smaller than the fifth value;
wherein the second prediction mode is a first partial prediction mode of the L prediction modes; the third prediction mode is a second partial prediction mode of the L prediction modes; the second value is greater than the fifth value and the fourth value is greater than the fifth value.
Optionally, when the target LCU is a boundary LCU, and the first ratio value corresponding to the second prediction mode in the L first ratio values is smaller than or equal to the fourth value, determining whether the first ratio value corresponding to the third prediction mode in the L first ratio values is smaller than a fifth value, includes:
under the condition that a first proportion value corresponding to a second prediction mode in the L first proportion values is smaller than or equal to the fourth value, judging whether a first proportion value corresponding to a Direct prediction mode in the L first proportion values is larger than a third value or not;
under the condition that a first proportional value corresponding to a Direct prediction mode in the L first proportional values is smaller than or equal to the third value, judging whether a first proportional value corresponding to a second prediction mode in the L first proportional values is larger than a fourth value;
wherein the third value is greater than the fifth value.
Optionally, the method further includes:
determining that the first motion type is an undifferentiated static type when a first scale value corresponding to the Skip prediction mode among the L first scale values is greater than the second value;
determining that the first motion type is a boundary motion type when a first proportion value corresponding to a Direct prediction mode in the L first proportion values is larger than the third value;
determining that the first motion type is a specific motion type when a first proportion value corresponding to a second prediction mode in the L first proportion values is greater than the fourth value;
and determining that the first motion type is a normal motion type when a first proportion value corresponding to a third prediction mode in the L first proportion values is greater than or equal to the fifth value.
Optionally, the correspondence satisfies at least one of the following conditions:
the undifferentiated static type and the Skip prediction mode have a corresponding relation;
the boundary motion type and the Direct prediction mode have a corresponding relation;
the specific motion type has a corresponding relation with a second prediction mode, and the second prediction mode is a first part prediction mode in the L prediction modes;
removing a specific motion type from corresponding relation with a prediction mode except a third prediction mode, wherein the third prediction mode is a second part prediction mode in the L prediction modes;
the common motion type has a corresponding relation with all the prediction modes;
wherein the L prediction modes are associated with the target LCU, L being a positive integer.
Optionally, after determining the first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, the method further includes:
encoding a target CU in the target LCU according to the first prediction mode.
Optionally, the encoding the target CU in the target LCU according to the first prediction mode includes:
determining whether an encoding cost of the target CU in the first prediction mode is less than a seventh value;
and in the case that the coding cost of the target CU in the first prediction mode is smaller than the seventh value, coding the target CU in the first prediction mode.
Optionally, after determining whether the coding cost of the target CU in the first prediction mode is smaller than a seventh value, the method further includes:
if the coding cost of the target CU in the first prediction mode is larger than or equal to the seventh value, adopting a seventh prediction mode to code the target CU;
and the coding cost of the target CU for coding by adopting the seventh prediction mode is less than the coding cost of the target CU for coding by adopting other prediction modes.
Optionally, in a case that the first motion type is determined based on a reference queue, after the encoding the target CU in the target LCU according to the first prediction mode, the method further includes:
updating the reference queue by using the ith frame image according to a first-in first-out rule;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
Optionally, after determining the first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, the method further includes:
coding the ith frame image by adopting a first coding mode to obtain a first coding result;
acquiring a first prediction mode set corresponding to the ith frame of image according to the first coding result;
acquiring a second prediction mode set corresponding to the ith frame image, wherein the determination of each prediction mode in the second prediction mode set is related to the motion type, and the second prediction mode set comprises the first prediction mode;
determining whether the second set of prediction modes matches the first set of prediction modes;
under the condition that the second prediction mode set is not matched with the first prediction mode set, encoding the (i + 1) th frame image to the (i + N-1) th frame image by adopting the first encoding mode;
wherein, in the process of encoding the frame image by adopting the first encoding mode, the determination of the prediction mode of the LCU of the frame image is independent of the motion type of the LCU.
Optionally, when the first motion type is determined based on a reference queue, after the i +1 th frame image to the i + N-1 th frame image are encoded by using the first encoding method, the method further includes:
emptying the reference queue, and adding the characteristic information from the ith frame image to the (i + N-1) th frame image into the reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
Optionally, after determining the first prediction mode of the target LCU, before determining the first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, the method further includes:
determining whether a scale value of a normal motion type among motion types of LCUs in H frame images including the ith frame image is less than a sixth value;
determining a first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, including:
under the condition that the proportion value of the common motion type in the motion types of the LCU in the H frame images is smaller than the sixth value, determining a first prediction mode of the target LCU according to the corresponding relation between the motion types and the prediction mode and the first motion type;
wherein the H frame images are continuous, and H is a positive integer.
Optionally, after determining whether a proportion value of a normal motion type of an LCU in H frame images including the ith frame image is smaller than a sixth value, the method further includes:
under the condition that the proportion value of the common motion type in the motion types of the LCUs in the H frame images is larger than or equal to the sixth value, encoding the i frame image to the (i + N-1) frame image by adopting a first encoding mode;
wherein, in the process of encoding the frame image by adopting the first encoding mode, the determination of the prediction mode of the LCU of the frame image is independent of the motion type of the LCU.
Optionally, when the first motion type is determined based on a reference queue, after the i frame image to the i + N-1 frame image are encoded in the first encoding manner, the method further includes:
emptying the reference queue, and adding the characteristic information from the ith frame image to the (i + N-1) th frame image into the reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
Optionally, after determining the first motion type of the target largest coding unit LCU in the ith frame image, the method includes:
determining a motion type of a fifth LCU of an i + F +1 frame image as the first motion type, in case that the motion type of a fourth LCU of F frame images subsequent to the i frame image is the first motion type;
wherein the fourth LCU and the target LCU are co-located LCUs, and the fifth LCU and the target LCU are co-located LCUs; f is a positive integer.
Optionally, a pixel difference between the i + F +2 frame image and the i + F +1 frame image is smaller than a first value;
after the determining the motion type of the fifth LCU of the (i + F + 1) th frame image as the first motion type, the method further comprises:
obtaining P LCUs included in the i + F +1 th frame image, wherein the P LCUs include R CUs, Q mutually different prediction modes exist in the R prediction modes of the R CUs, Q is a positive integer smaller than or equal to R, R is a positive integer larger than or equal to P, and P is a positive integer;
determining a second motion type of the target LCU according to Q second proportional values corresponding to the Q prediction modes, wherein each second proportional value is a value of the number ratio R of the corresponding prediction modes;
determining a third motion type of a third LCU of the i + F +2 th frame image according to a reference queue under the condition that the second motion type is different from the first motion type, wherein the third LCU and the target LCU are co-located LCUs, the reference queue comprises feature information of N frame images, and N is a positive integer;
determining a fourth prediction mode for the third LCU based on the third motion type.
Optionally, determining the second motion type of the target LCU according to Q second proportional values corresponding to the Q prediction modes includes:
judging whether a second proportional value corresponding to the Skip prediction mode in the Q second proportional values is larger than a second value or not;
under the condition that a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is smaller than or equal to the second value, judging whether a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than a fourth value;
under the condition that a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is smaller than or equal to the fourth value, judging whether a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is smaller than a fifth value or not;
determining that the second motion type of the target LCU is a specific motion type removed under the condition that a second proportional value corresponding to a sixth prediction mode in the Q second proportional values is smaller than the fifth value;
wherein the fifth prediction mode is a third partial prediction mode of the Q prediction modes; the sixth prediction mode is a fourth partial prediction mode of the Q prediction modes; the second value is greater than the fifth value and the fourth value is greater than the fifth value.
Optionally, when the target LCU is a boundary LCU, and when a second ratio value corresponding to a Skip prediction mode in the Q second ratio values is smaller than or equal to the second value, determining whether a second ratio value corresponding to a fifth prediction mode in the Q second ratio values is larger than a fourth value, includes:
under the condition that a second proportional value corresponding to the Skip prediction mode in the Q second proportional values is smaller than or equal to the second value, judging whether the second proportional value corresponding to the Direct prediction mode in the Q second proportional values is larger than a third value or not;
under the condition that a second proportion value corresponding to a Direct prediction mode in the Q second proportion values is larger than or equal to the third value, judging whether a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than a fourth value or not;
wherein the third value is greater than the fifth value.
Optionally, the method further includes:
determining that a second motion type of the target LCU is an undifferentiated stationary type when a second scale value corresponding to the Skip prediction mode among the Q second scale values is greater than the second value;
determining that the second motion type of the target LCU is a boundary motion type when a second proportional value corresponding to a Direct prediction mode among the Q second proportional values is greater than the third value;
determining that the second motion type of the target LCU is a specific motion type when a second proportion value corresponding to a fifth prediction mode among the Q second proportion values is greater than the fourth value;
determining that the second motion type of the target LCU is a normal motion type when a second proportion value corresponding to a sixth prediction mode among the Q second proportion values is greater than or equal to the fifth value.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be physically included alone, or two or more units may be integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) to perform some steps of the prediction mode determination method according to various embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (46)

1. A prediction mode determination method, the method comprising:
determining a first motion type of a target Largest Coding Unit (LCU) in an ith frame image, wherein i is an integer greater than 1;
and determining a first prediction mode of the target LCU according to the corresponding relation between the motion type and the prediction mode and the first motion type.
2. The method of claim 1, wherein determining the first motion type of the target LCU in the ith frame picture comprises:
determining a first motion type of a target Largest Coding Unit (LCU) in an ith frame image if the ith frame image satisfies a first condition;
wherein the ith frame image satisfies a first condition including any one of:
the pixel difference between the ith frame image and the (i-1) th frame image is smaller than a first value;
the motion types of first LCUs of k frame images before the ith frame image are the same, the first LCUs and the target LCU are same-position LCUs, k is a positive integer, and i is an integer larger than k.
3. The method of claim 2, wherein the determining the first motion type of the target LCU in the ith frame picture if the ith frame picture satisfying the first condition comprises a pixel difference of the ith frame picture from an i-1 th frame picture being less than a first value comprises:
determining the first motion type from a reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
4. The method according to claim 3, wherein said determining the first motion type from the reference queue in case the feature information comprises a prediction mode of each Coding Unit (CU) in an LCU of a frame picture comprises:
determining M second LCUs in the reference queue according to the target LCU, wherein the M second LCUs and the target LCU are co-located LCUs, the M second LCUs comprise S CUs, L mutually different prediction modes exist in the S prediction modes of the S CUs, L is a positive integer smaller than or equal to S, S is an integer larger than or equal to M, and M is a positive integer;
and determining the first motion type according to L first scale values corresponding to the L prediction modes, wherein each first scale value is the value of the quantity ratio S of the corresponding prediction mode.
5. The method according to claim 4, wherein said determining the first motion type according to the L first scale values corresponding to the L prediction modes comprises:
executing the first judgment to obtain a first judgment result;
determining the first motion type according to the first judgment result;
wherein the first determination comprises at least one of:
judging whether a first proportional value corresponding to the Skip prediction mode in the L first proportional values is larger than a second value or not;
under the condition that the target LCU is a boundary LCU, judging whether a first proportional value corresponding to a Direct prediction mode in the L first proportional values is larger than a third value or not;
judging whether a first proportion value corresponding to a second prediction mode in the L first proportion values is larger than a fourth value, wherein the second prediction mode is a first part prediction mode in the L prediction modes;
judging whether a first proportion value corresponding to a third prediction mode in the L first proportion values is smaller than a fifth value, wherein the third prediction mode is a second part prediction mode in the L prediction modes;
wherein the second value is greater than the fifth value, the third value is greater than the fifth value, and the fourth value is greater than the fifth value.
6. The method of claim 5, wherein determining the first type of motion based on the first determination comprises at least one of:
determining that the first motion type is a target motion type under the condition that the first judgment result meets a second condition;
determining that the first motion type is a common motion type under the condition that the first judgment result does not meet the second condition;
wherein the first judgment result meeting the second condition comprises at least one of the following:
a first scale value corresponding to the Skip prediction mode in the L first scale values is larger than the second value;
a first proportional value corresponding to a Direct prediction mode in the L first proportional values is greater than the third value;
a first proportion value corresponding to a second prediction mode in the L first proportion values is larger than the fourth value;
a first ratio value corresponding to a third prediction mode among the L first ratio values is smaller than the fifth value.
7. The method of claim 6, wherein the target motion types comprise: an undifferentiated stationary type, a boundary motion type, a specific motion type, and a removal specific motion type;
determining that the first motion type is a target motion type under the condition that the first judgment result meets a second condition, wherein the first motion type comprises at least one of the following items:
determining that the first motion type is an undifferentiated static type when a first scale value corresponding to the Skip prediction mode among the L first scale values is greater than the second value;
determining that the first motion type is a boundary motion type when a first proportion value corresponding to a Direct prediction mode in the L first proportion values is larger than the third value;
determining that the first motion type is a specific motion type when a first proportion value corresponding to a second prediction mode in the L first proportion values is greater than the fourth value;
and determining the first motion type as a specific motion type removal if a first proportion value corresponding to a third prediction mode among the L first proportion values is smaller than the fifth value.
8. The method of claim 2, wherein in the case that the ith frame picture satisfying the first condition comprises a first LCU of a k-frame picture preceding the ith frame picture having the same type of motion, said determining the first type of motion of the target LCU in the ith frame picture comprises:
determining a motion type of the first LCU as the first motion type.
9. The method according to claim 8, wherein the pixel difference between the i +1 th frame image and the i frame image is less than a first value;
after the determining the first prediction mode for the target LCU, the method further comprises:
acquiring P LCUs included in the ith frame image, wherein the P LCUs include R CUs, Q mutually different prediction modes exist in the R prediction modes of the R CUs, Q is a positive integer smaller than or equal to R, R is a positive integer larger than or equal to P, and P is a positive integer;
determining a second motion type of the target LCU according to Q second proportional values corresponding to the Q prediction modes, wherein each second proportional value is a value of the number ratio R of the corresponding prediction modes;
determining a third motion type of a third LCU in the i +1 th frame image according to a reference queue under the condition that the second motion type is different from the first motion type, wherein the third LCU and the target LCU are co-located LCUs, the reference queue comprises feature information of N frame images, and N is a positive integer;
determining a fourth prediction mode for the third LCU based on the third motion type.
10. The method of claim 9, wherein said determining a second motion type for the target LCU according to Q second scaling values for the Q prediction modes comprises:
executing the second judgment to obtain a second judgment result;
determining the second motion type according to the second judgment result;
wherein the second determination comprises at least one of:
judging whether a second proportional value corresponding to the Skip prediction mode in the Q second proportional values is larger than a second value;
under the condition that the target LCU is a boundary LCU, judging whether a second proportional value corresponding to a Direct prediction mode in the Q second proportional values is larger than a third value or not;
judging whether a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than a fourth value, wherein the fifth prediction mode is a third part prediction mode in the Q prediction modes;
judging whether a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is smaller than a fifth value, wherein the sixth prediction mode is a fourth part prediction mode in the Q prediction modes;
wherein the second value is greater than the fifth value, the third value is greater than the fifth value, and the fourth value is greater than the fifth value.
11. The method of claim 10, wherein determining the second type of motion according to the second determination comprises at least one of:
determining that the first motion type is a target motion type under the condition that the second judgment result meets a third condition;
determining that the first motion type is a normal motion type when the second judgment result does not satisfy the third condition;
wherein the second determination result satisfying a third condition includes at least one of:
a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is larger than the second value;
a second proportion value corresponding to the Direct prediction mode in the Q second proportion values is larger than the third value;
a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than the fourth value;
and the second proportion value corresponding to the sixth prediction mode in the Q second proportion values is smaller than the fifth value.
12. The method of claim 11, wherein the target motion type comprises: an undifferentiated stationary type, a boundary motion type, a specific motion type, and a removal specific motion type;
determining that the first motion type is a target motion type under the condition that the second judgment result meets a third condition, wherein the first motion type comprises at least one of the following items:
determining that the first motion type is an undifferentiated static type under the condition that a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is larger than the second value;
determining that the first motion type is a boundary motion type under the condition that a second proportion value corresponding to a Direct prediction mode in the Q second proportion values is larger than the third value;
determining that the first motion type is a specific motion type under the condition that a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than the fourth value;
and determining the first motion type as a specific motion type under the condition that a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is smaller than the fifth value.
13. The method of claim 1, wherein after determining the first prediction mode for the target LCU according to the correspondence between motion types and prediction modes and the first motion type, the method further comprises:
coding the ith frame image by adopting a first coding mode to obtain a first coding result;
acquiring a first prediction mode set corresponding to the ith frame of image according to the first coding result;
acquiring a second prediction mode set corresponding to the ith frame image, wherein the determination of each prediction mode in the second prediction mode set is related to the motion type, and the second prediction mode set comprises the first prediction mode;
determining whether the second set of prediction modes matches the first set of prediction modes;
under the condition that the second prediction mode set is not matched with the first prediction mode set, encoding the (i + 1) th frame image to the (i + N-1) th frame image by adopting the first encoding mode;
wherein, in the process of encoding the frame image by adopting the first encoding mode, the determination of the prediction mode of the LCU of the frame image is independent of the motion type of the LCU.
14. The method according to claim 13, wherein in case that the first motion type is determined based on a reference queue, after the encoding of the i +1 th frame picture to the i + N-1 th frame picture in the first encoding manner, the method further comprises:
emptying the reference queue, and adding the characteristic information from the ith frame image to the (i + N-1) th frame image into the reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
15. The method of claim 1, wherein after determining the first prediction mode of the target LCU, before determining the first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, the method further comprises:
determining whether a scale value of a normal motion type among motion types of LCUs in H frame images including the ith frame image is less than a sixth value;
determining a first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, including:
under the condition that the proportion value of the common motion type in the motion types of the LCU in the H frame images is smaller than the sixth value, determining a first prediction mode of the target LCU according to the corresponding relation between the motion types and the prediction mode and the first motion type;
wherein the H frame images are continuous, and H is a positive integer.
16. The method of claim 15, wherein after determining whether a scale value of a normal motion type of an LCU in H frame images including the ith frame image is less than a sixth value, the method further comprises:
under the condition that the proportion value of the common motion type in the motion types of the LCUs in the H frame images is larger than or equal to the sixth value, encoding the i frame image to the (i + N-1) frame image by adopting a first encoding mode;
wherein, in the process of encoding the frame image by adopting the first encoding mode, the determination of the prediction mode of the LCU of the frame image is independent of the motion type of the LCU.
17. The method according to claim 16, wherein in case that the first motion type is determined based on a reference queue, after the encoding of the i frame picture to the i + N-1 frame picture in the first encoding manner, the method further comprises:
emptying the reference queue, and adding the characteristic information from the ith frame image to the (i + N-1) th frame image into the reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
18. The method of claim 1, wherein after determining the first prediction mode for the target LCU according to the correspondence between the motion types and prediction modes and the first motion type, the method comprises:
encoding a target CU in the target LCU according to the first prediction mode.
19. The method of claim 18, wherein the encoding the target CU of the target LCU according to the first prediction mode comprises:
determining whether an encoding cost of the target CU in the first prediction mode is less than a seventh value;
and in the case that the coding cost of the target CU in the first prediction mode is smaller than the seventh value, coding the target CU in the first prediction mode.
20. The method as recited in claim 19, wherein after determining whether the coding cost of the target CU in the first prediction mode is less than a seventh value, the method further comprises:
if the coding cost of the target CU in the first prediction mode is larger than or equal to the seventh value, adopting a seventh prediction mode to code the target CU;
and the coding cost of the target CU for coding by adopting the seventh prediction mode is less than the coding cost of the target CU for coding by adopting other prediction modes.
21. The method of claim 18, wherein after the encoding the target CU in the target LCU according to the first prediction mode if the first motion type is determined based on a reference queue, the method further comprises:
deleting the characteristic information of the target frame image in the reference queue, and adding the characteristic information of the ith frame image into the reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer; the target frame image meets a preset condition.
22. The method according to any one of claims 1 to 21, wherein the correspondence satisfies at least one of:
the undifferentiated static type and the Skip prediction mode have a corresponding relation;
the boundary motion type and the Direct prediction mode have a corresponding relation;
the specific motion type has a corresponding relation with a second prediction mode, and the second prediction mode is a first part prediction mode in the L prediction modes;
removing a specific motion type from corresponding relation with a prediction mode except a third prediction mode, wherein the third prediction mode is a second part prediction mode in the L prediction modes;
the common motion type has a corresponding relation with all the prediction modes;
wherein the L prediction modes are associated with the target LCU, L being a positive integer.
23. A prediction mode determination method, the method comprising:
determining a first motion type of a target Largest Coding Unit (LCU) in an ith frame image under the condition that the pixel difference between the ith frame image and an (i-1) th frame image is smaller than a first value, wherein i is an integer larger than 1;
and determining a first prediction mode of the target LCU according to the corresponding relation between the motion type and the prediction mode and the first motion type.
24. The method of claim 23, wherein determining the first motion type of the target LCU in the ith frame picture comprises:
acquiring a reference queue, wherein the reference queue comprises feature information of N frame images, the feature information comprises a prediction mode of each coding unit CU in an LCU of the frame images, and N is a positive integer;
determining M second LCUs in the reference queue according to the target LCU, wherein the M second LCUs and the target LCU are co-located LCUs, the M second LCUs comprise S CUs, L mutually different prediction modes exist in the S prediction modes of the S CUs, L is a positive integer smaller than or equal to S, S is an integer larger than or equal to M, and M is a positive integer;
and determining the first motion type according to L first scale values corresponding to the L prediction modes, wherein each first scale value is the value of the quantity ratio S of the corresponding prediction mode.
25. The method according to claim 24, wherein said determining the first motion type according to the L first scale values corresponding to the L prediction modes comprises:
judging whether a first proportional value corresponding to the Skip prediction mode in the L first proportional values is larger than a second value or not;
under the condition that a first proportion value corresponding to a Skip prediction mode in the L first proportion values is smaller than or equal to the second value, judging whether a first proportion value corresponding to a second prediction mode in the L first proportion values is larger than a fourth value;
under the condition that a first proportion value corresponding to a second prediction mode in the L first proportion values is smaller than or equal to the fourth value, judging whether a first proportion value corresponding to a third prediction mode in the L first proportion values is smaller than a fifth value;
determining that the first motion type is a specific motion type removed under the condition that a first proportional value corresponding to a third prediction mode in the L first proportional values is smaller than the fifth value;
wherein the second prediction mode is a first partial prediction mode of the L prediction modes; the third prediction mode is a second partial prediction mode of the L prediction modes; the second value is greater than the fifth value and the fourth value is greater than the fifth value.
26. The method of claim 25, wherein in case that the target LCU is a boundary LCU, said determining whether the first ratio value corresponding to the third prediction mode of the L first ratio values is smaller than a fifth value in case that the first ratio value corresponding to the second prediction mode of the L first ratio values is smaller than or equal to the fourth value comprises:
under the condition that a first proportion value corresponding to a second prediction mode in the L first proportion values is smaller than or equal to the fourth value, judging whether a first proportion value corresponding to a Direct prediction mode in the L first proportion values is larger than a third value or not;
under the condition that a first proportional value corresponding to a Direct prediction mode in the L first proportional values is smaller than or equal to the third value, judging whether a first proportional value corresponding to a second prediction mode in the L first proportional values is larger than a fourth value;
wherein the third value is greater than the fifth value.
27. The method of claim 26, further comprising:
determining that the first motion type is an undifferentiated static type when a first scale value corresponding to the Skip prediction mode among the L first scale values is greater than the second value;
determining that the first motion type is a boundary motion type when a first proportion value corresponding to a Direct prediction mode in the L first proportion values is larger than the third value;
determining that the first motion type is a specific motion type when a first proportion value corresponding to a second prediction mode in the L first proportion values is greater than the fourth value;
and determining that the first motion type is a normal motion type when a first proportion value corresponding to a third prediction mode in the L first proportion values is greater than or equal to the fifth value.
28. The method of claim 23, wherein the correspondence satisfies at least one of:
the undifferentiated static type and the Skip prediction mode have a corresponding relation;
the boundary motion type and the Direct prediction mode have a corresponding relation;
the specific motion type has a corresponding relation with a second prediction mode, and the second prediction mode is a first part prediction mode in the L prediction modes;
removing a specific motion type from corresponding relation with a prediction mode except a third prediction mode, wherein the third prediction mode is a second part prediction mode in the L prediction modes;
the common motion type has a corresponding relation with all the prediction modes;
wherein the L prediction modes are associated with the target LCU, L being a positive integer.
29. The method of claim 23, wherein after determining the first prediction mode for the target LCU based on the correspondence between motion types and prediction modes and the first motion type, the method further comprises:
encoding a target CU in the target LCU according to the first prediction mode.
30. The method of claim 29, wherein the encoding the target CU in the target LCU according to the first prediction mode comprises:
determining whether an encoding cost of the target CU in the first prediction mode is less than a seventh value;
and in the case that the coding cost of the target CU in the first prediction mode is smaller than the seventh value, coding the target CU in the first prediction mode.
31. The method as recited in claim 30, wherein after determining whether the coding cost of the target CU in the first prediction mode is less than a seventh value, the method further comprises:
if the coding cost of the target CU in the first prediction mode is larger than or equal to the seventh value, adopting a seventh prediction mode to code the target CU;
and the coding cost of the target CU for coding by adopting the seventh prediction mode is less than the coding cost of the target CU for coding by adopting other prediction modes.
32. The method of claim 29, wherein if the first motion type is determined based on a reference queue, after the encoding the target CU in the target LCU according to the first prediction mode, the method further comprises:
updating the reference queue by using the ith frame image according to a first-in first-out rule;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
33. The method of claim 23, wherein after determining the first prediction mode for the target LCU based on the correspondence between motion types and prediction modes and the first motion type, the method further comprises:
coding the ith frame image by adopting a first coding mode to obtain a first coding result;
acquiring a first prediction mode set corresponding to the ith frame of image according to the first coding result;
acquiring a second prediction mode set corresponding to the ith frame image, wherein the determination of each prediction mode in the second prediction mode set is related to the motion type, and the second prediction mode set comprises the first prediction mode;
determining whether the second set of prediction modes matches the first set of prediction modes;
under the condition that the second prediction mode set is not matched with the first prediction mode set, encoding the (i + 1) th frame image to the (i + N-1) th frame image by adopting the first encoding mode;
wherein, in the process of encoding the frame image by adopting the first encoding mode, the determination of the prediction mode of the LCU of the frame image is independent of the motion type of the LCU.
34. The method according to claim 33, wherein in case that the first motion type is determined based on a reference queue, after the encoding of the i +1 th frame picture to the i + N-1 th frame picture in the first encoding manner, the method further comprises:
emptying the reference queue, and adding the characteristic information from the ith frame image to the (i + N-1) th frame image into the reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
35. The method of claim 23, wherein after determining the first prediction mode of the target LCU and before determining the first prediction mode of the target LCU according to the correspondence between motion types and prediction modes and the first motion type, the method further comprises:
determining whether a scale value of a normal motion type among motion types of LCUs in H frame images including the ith frame image is less than a sixth value;
determining a first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type, including:
under the condition that the proportion value of the common motion type in the motion types of the LCU in the H frame images is smaller than the sixth value, determining a first prediction mode of the target LCU according to the corresponding relation between the motion types and the prediction mode and the first motion type;
wherein the H frame images are continuous, and H is a positive integer.
36. The method of claim 35, wherein after determining whether a scale value of a normal motion type of an LCU in H frame images including the ith frame image is less than a sixth value, the method further comprises:
under the condition that the proportion value of the common motion type in the motion types of the LCUs in the H frame images is larger than or equal to the sixth value, encoding the i frame image to the (i + N-1) frame image by adopting a first encoding mode;
wherein, in the process of encoding the frame image by adopting the first encoding mode, the determination of the prediction mode of the LCU of the frame image is independent of the motion type of the LCU.
37. The method according to claim 36, wherein in case that the first motion type is determined based on a reference queue, after the encoding of the i frame picture to the i + N-1 frame picture in the first encoding manner, the method further comprises:
emptying the reference queue, and adding the characteristic information from the ith frame image to the (i + N-1) th frame image into the reference queue;
the reference queue comprises feature information of N frame images, wherein N is a positive integer.
38. The method according to claim 23, wherein after determining the first motion type of the target largest coding unit LCU in the ith frame of image, the method comprises:
determining a motion type of a fifth LCU of an i + F +1 frame image as the first motion type, in case that the motion type of a fourth LCU of F frame images subsequent to the i frame image is the first motion type;
wherein the fourth LCU and the target LCU are co-located LCUs, and the fifth LCU and the target LCU are co-located LCUs; f is a positive integer.
39. The method according to claim 38, wherein the pixel difference between the i + F +2 frame image and the i + F +1 frame image is less than a first value;
after the determining the motion type of the fifth LCU of the (i + F + 1) th frame image as the first motion type, the method further comprises:
obtaining P LCUs included in the i + F +1 th frame image, wherein the P LCUs include R CUs, Q mutually different prediction modes exist in the R prediction modes of the R CUs, Q is a positive integer smaller than or equal to R, R is a positive integer larger than or equal to P, and P is a positive integer;
determining a second motion type of the target LCU according to Q second proportional values corresponding to the Q prediction modes, wherein each second proportional value is a value of the number ratio R of the corresponding prediction modes;
determining a third motion type of a third LCU of the i + F +2 th frame image according to a reference queue under the condition that the second motion type is different from the first motion type, wherein the third LCU and the target LCU are co-located LCUs, the reference queue comprises feature information of N frame images, and N is a positive integer;
determining a fourth prediction mode for the third LCU based on the third motion type.
40. The method of claim 39, wherein determining the second motion type of the target LCU according to Q second scale values corresponding to the Q prediction modes comprises:
judging whether a second proportional value corresponding to the Skip prediction mode in the Q second proportional values is larger than a second value or not;
under the condition that a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is smaller than or equal to the second value, judging whether a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than a fourth value;
under the condition that a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is smaller than or equal to the fourth value, judging whether a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is smaller than a fifth value or not;
determining that the second motion type of the target LCU is a specific motion type removed under the condition that a second proportional value corresponding to a sixth prediction mode in the Q second proportional values is smaller than the fifth value;
wherein the fifth prediction mode is a third partial prediction mode of the Q prediction modes; the sixth prediction mode is a fourth partial prediction mode of the Q prediction modes; the second value is greater than the fifth value and the fourth value is greater than the fifth value.
41. The method as claimed in claim 40, wherein in a case that the target LCU is a boundary LCU, and in a case that the second ratio value corresponding to the Skip prediction mode among the Q second ratio values is less than or equal to the second value, determining whether the second ratio value corresponding to a fifth prediction mode among the Q second ratio values is greater than a fourth value comprises:
under the condition that a second proportional value corresponding to the Skip prediction mode in the Q second proportional values is smaller than or equal to the second value, judging whether the second proportional value corresponding to the Direct prediction mode in the Q second proportional values is larger than a third value or not;
under the condition that a second proportion value corresponding to a Direct prediction mode in the Q second proportion values is larger than or equal to the third value, judging whether a second proportion value corresponding to a fifth prediction mode in the Q second proportion values is larger than a fourth value or not;
wherein the third value is greater than the fifth value.
42. The method of claim 41, further comprising:
determining that a second motion type of the target LCU is an undifferentiated stationary type when a second scale value corresponding to the Skip prediction mode among the Q second scale values is greater than the second value;
determining that the second motion type of the target LCU is a boundary motion type when a second proportional value corresponding to a Direct prediction mode among the Q second proportional values is greater than the third value;
determining that the second motion type of the target LCU is a specific motion type when a second proportion value corresponding to a fifth prediction mode among the Q second proportion values is greater than the fourth value;
determining that the second motion type of the target LCU is a normal motion type when a second proportion value corresponding to a sixth prediction mode among the Q second proportion values is greater than or equal to the fifth value.
43. A prediction mode determination device, characterized in that the prediction mode determination device comprises:
a first determining module, configured to determine a first motion type of a target largest coding unit LCU in an ith frame image, i being an integer greater than 1;
a second determining module, configured to determine a first prediction mode of the target LCU according to a correspondence between a motion type and a prediction mode and the first motion type.
44. A prediction mode determination device, characterized in that the prediction mode determination device comprises:
a third determining module, configured to determine a first motion type of a target largest coding unit LCU in an ith frame image if a pixel difference between the ith frame image and an (i-1) th frame image is smaller than a first value, where i is an integer greater than 1;
a fourth determining module, configured to determine the first prediction mode of the target LCU according to the correspondence between the motion types and the prediction modes and the first motion type.
45. A prediction mode determination device comprising: a transceiver, a memory, a processor, and a computer program stored on the memory and executable on the processor; the processor, configured to read a program in the memory to implement the steps in the method according to any one of claims 1 to 22 or the steps in the method according to any one of claims 23 to 42.
46. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, performs the steps in the method of any one of claims 1 to 22 or the steps in the method of any one of claims 23 to 42.
CN201911216418.5A 2019-12-02 2019-12-02 Prediction mode determination method, apparatus, and computer-readable storage medium Active CN111050166B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911216418.5A CN111050166B (en) 2019-12-02 2019-12-02 Prediction mode determination method, apparatus, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911216418.5A CN111050166B (en) 2019-12-02 2019-12-02 Prediction mode determination method, apparatus, and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN111050166A true CN111050166A (en) 2020-04-21
CN111050166B CN111050166B (en) 2023-08-15

Family

ID=70234425

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911216418.5A Active CN111050166B (en) 2019-12-02 2019-12-02 Prediction mode determination method, apparatus, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN111050166B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070211797A1 (en) * 2006-03-13 2007-09-13 Samsung Electronics Co., Ltd. Method, medium, and system encoding and/or decoding moving pictures by adaptively applying optimal prediction modes
CN103634606A (en) * 2012-08-21 2014-03-12 腾讯科技(深圳)有限公司 Video encoding method and apparatus
CN104038764A (en) * 2014-06-27 2014-09-10 华中师范大学 H.264-to-H.265 video transcoding method and transcoder
CN109302616A (en) * 2018-10-09 2019-02-01 北京佳讯飞鸿电气股份有限公司 A kind of HEVC Inter Prediction High-speed Algorithm based on RC prediction
CN109495738A (en) * 2017-09-12 2019-03-19 华为技术有限公司 A kind of decoding method and device of motion information

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070211797A1 (en) * 2006-03-13 2007-09-13 Samsung Electronics Co., Ltd. Method, medium, and system encoding and/or decoding moving pictures by adaptively applying optimal prediction modes
CN103634606A (en) * 2012-08-21 2014-03-12 腾讯科技(深圳)有限公司 Video encoding method and apparatus
CN104038764A (en) * 2014-06-27 2014-09-10 华中师范大学 H.264-to-H.265 video transcoding method and transcoder
CN109495738A (en) * 2017-09-12 2019-03-19 华为技术有限公司 A kind of decoding method and device of motion information
CN109302616A (en) * 2018-10-09 2019-02-01 北京佳讯飞鸿电气股份有限公司 A kind of HEVC Inter Prediction High-speed Algorithm based on RC prediction

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
连自锋; 景晓军; 孙松林; 黄海: "一种多尺度嵌套卷积神经网络模型", 《北京邮电大学学报》 *

Also Published As

Publication number Publication date
CN111050166B (en) 2023-08-15

Similar Documents

Publication Publication Date Title
KR102317576B1 (en) point cloud compression
KR101208863B1 (en) Selecting encoding types and predictive modes for encoding video data
RU2671307C1 (en) Method for predicting images and related device
RU2659733C2 (en) Method and device for coding and decoding the motion vector based on the reduced predictors-candidates of the motion vector
US7079057B2 (en) Context-based adaptive binary arithmetic coding method and apparatus
JP2888186B2 (en) Image encoding device and image decoding device
CN113905235A (en) Video image processing method and device
US20190037227A1 (en) Techniques for hardware video encoding
KR101409826B1 (en) Method for motion prediction using adaptive search range
US20190261001A1 (en) Encoding video using palette prediction and intra-block copy
CN101888546B (en) A kind of method of estimation and device
US20210084294A1 (en) Encoding video using two-stage intra search
CN112218076B (en) Video coding method, device and system and computer readable storage medium
WO2019001283A1 (en) Method and apparatus for controlling encoding resolution ratio
US20220284632A1 (en) Analysis device and computer-readable recording medium storing analysis program
JP5093349B2 (en) Image compression apparatus and image restoration apparatus
JP6914722B2 (en) Video coding device, video coding method and program
CN111050166A (en) Prediction mode determination method, apparatus, and computer-readable storage medium
US7280598B2 (en) Method for vector prediction
CN110557621B (en) Parameter acquisition method, pixel point pair selection method and related equipment
CN113365080B (en) Encoding and decoding method, device and storage medium for string coding technology
US20160127727A1 (en) Moving image coding device, moving image decoding device, moving image coding method and moving image decoding method
JP4547668B2 (en) Motion compensated predictive coding apparatus and motion compensated predictive coding method
CN115190309B (en) Video frame processing method, training device, video frame processing equipment and storage medium
RU2701087C1 (en) Method and device for encoding and decoding motion vector based on reduced motion vector predictors-candidates

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant