CN111050166B - 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
CN111050166B
CN111050166B CN201911216418.5A CN201911216418A CN111050166B CN 111050166 B CN111050166 B CN 111050166B CN 201911216418 A CN201911216418 A CN 201911216418A CN 111050166 B CN111050166 B CN 111050166B
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.)
Active
Application number
CN201911216418.5A
Other languages
Chinese (zh)
Other versions
CN111050166A (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

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 determining method, a prediction mode determining device and a computer readable storage medium. The prediction mode determining method comprises the following steps: determining a first motion type of a target maximum 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 invention can improve the efficiency of the prediction mode determination of the LCU.

Description

Prediction mode determination method, apparatus, and computer-readable storage medium
Technical Field
The embodiment of the invention relates to the technical field of video, in particular to a prediction mode determining method, prediction mode determining equipment and a computer readable storage medium.
Background
Currently, a traversal algorithm is adopted in the selection of a prediction mode of a Coding Unit (CU), and in one mode, a proper prediction mode is selected by traversing all prediction modes; alternatively, several most probable prediction modes may be selected for traversal, and other prediction modes traversed if no suitable prediction mode is found.
It can be seen that the prediction mode determination of the existing CU is inefficient.
Disclosure of Invention
The embodiment of the invention provides a prediction mode determining method, prediction mode determining equipment and a computer readable storage medium, which are used for solving the problem that the efficiency of determining the prediction mode of the conventional CU is low.
To solve the above problems, the present invention is achieved 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 maximum 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 the first motion type of the target maximum coding unit LCU in the ith frame image includes:
determining a first motion type of a target maximum coding unit LCU in an ith frame image under the condition that the ith frame image meets a first condition;
wherein the i-th 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 type of a first LCU of a previous k frame image of the ith frame image is the same, the first LCU and the target LCU are co-located LCUs, k is a positive integer, and i is an integer larger than k.
Optionally, in a case that the i-th frame image meets the first condition and includes that a pixel difference between the i-th frame image and the i-1-th frame image is smaller than a first value, the determining the first motion type of the target maximum coding unit LCU in the i-th frame image includes:
determining the first motion type according to a reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
Optionally, in the case that the feature information includes a prediction mode of each coding unit CU in the LCU of the frame image, the determining the first motion type according to the reference queue includes:
according to the target LCU, determining M second LCUs in the reference queue, 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 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 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 modes.
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 judging result;
wherein the first determination comprises at least one of:
judging whether a first scale value corresponding to a Skip prediction mode in the L first scale values is larger than a second value or not;
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 under the condition that the target LCU is a boundary LCU;
judging whether a first proportional value corresponding to a second predictive mode in the L first proportional values is larger than a fourth value or not, wherein the second predictive mode is a first partial predictive mode in the L predictive modes;
judging whether a first proportional value corresponding to a third predictive mode in the L first proportional values is smaller than a fifth value or not, wherein the third predictive mode is a second partial predictive mode in the L predictive 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:
Under the condition that the first judging result meets a second condition, determining the first motion type as a target motion type;
under the condition that the first judging result does not meet the second condition, determining that the first motion type is a common motion type;
wherein the first judging result meets a second condition includes at least one of the following:
a first scale value corresponding to a Skip prediction mode in the L first scale values is larger than the second scale value;
a first proportional value corresponding to a Direct prediction mode in the L first proportional values is larger than the third value;
a first ratio value corresponding to a second prediction mode in the L first ratio values is larger than the fourth value;
and a first proportional value corresponding to a third prediction mode in the L first proportional values is smaller than the fifth proportional value.
Optionally, the target motion type includes: indifferent still type, boundary motion type, specific motion type, and remove specific motion type;
and under the condition that the first judging result meets a second condition, determining that the first motion type is a target motion type, wherein the method comprises at least one of the following steps:
determining that the first motion type is a non-differential static type under the condition that a first scale value corresponding to a Skip prediction mode in the L first scale values is larger than the second scale value;
Determining that the first motion type is a boundary motion type under the condition that a first proportional value corresponding to a Direct prediction mode in the L first proportional values is larger than the third value;
determining that the first motion type is a specific motion type under the condition that a first ratio value corresponding to a second prediction mode in the L first ratio values is larger than the fourth value;
and determining the first motion type to be the specific motion type removed under the condition that a first scale value corresponding to a third prediction mode in the L first scale values is smaller than the fifth value.
Optionally, in a case that the i-th frame image meets a first condition and includes that a motion type of a first LCU of a previous k-frame image of the i-th frame image is the same, the determining the first motion type of the target maximum coding unit LCU in the i-th frame image includes:
and determining the motion type of the first LCU as the first motion type.
Optionally, the pixel difference between the i+1st frame image and the i frame image is smaller than a first value;
after the determining the first prediction mode of the target LCU, the method further comprises:
obtaining P LCUs included in the ith frame image, wherein the P LCUs comprise R CUs, Q mutually different prediction modes exist in 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 proportion values corresponding to the Q prediction modes, wherein each second proportion value is a value of a quantity 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 characteristic information of N frame images, and N is a positive integer;
and determining a fourth prediction mode of the third LCU according to the third motion type.
Optionally, the determining, according to the Q second scale values corresponding to the Q prediction modes, the second motion type of the target LCU includes:
executing the second judgment to obtain a second judgment result;
determining the second motion type according to the second judging result;
wherein the second determination comprises at least one of:
judging whether a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is larger than a second value or not;
judging whether a second proportion value corresponding to a Direct prediction mode in the Q second proportion values is larger than a third value or not under the condition that the target LCU is a boundary LCU;
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 partial 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 of prediction modes 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:
under the condition that the second judging result meets a third condition, determining the first motion type as a target motion type;
under the condition that the second judging result does not meet the third condition, determining that the first motion type is a common motion type;
wherein the second judging result meets a third condition including at least one of the following:
the second ratio value corresponding to the Skip prediction mode in the Q second ratio values is larger than the second value;
the second ratio value corresponding to the Direct prediction mode in the Q second ratio values is larger than the third value;
A second ratio value corresponding to a fifth prediction mode in the Q second ratio values is larger than the fourth value;
and a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is smaller than the fifth proportion value.
Optionally, the target motion type includes: indifferent still type, boundary motion type, specific motion type, and remove specific motion type;
and under the condition that the second judging result meets a third condition, determining that the first motion type is a target motion type, wherein the method comprises at least one of the following steps:
determining that the first motion type is an indiscriminate static type under the condition that a second proportion value corresponding to a 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 when 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 to be the specific motion type removed 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 type and the prediction mode 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 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 a 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;
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 irrelevant to the motion type of the LCU.
Optionally, in the case that the first motion type is determined based on a reference queue, after the encoding the i+1st frame image to the i+n-1 st frame image by using the first encoding mode, the method further includes:
Clearing the reference queue, and adding the characteristic information from the ith frame image to the (i+N-1) th frame image to the reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
Optionally, after the 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 type and the prediction mode and the first motion type, the method further includes:
determining whether a proportion value of a common motion type in motion types of LCUs in H frame images comprising the ith frame image is smaller than a sixth value;
the 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 includes:
under the condition that the proportion value of the common motion type in the motion types of LCUs 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 modes and the first motion type;
wherein the H frame images are continuous, and H is a positive integer.
Optionally, after determining whether the scale value of the common motion type of the LCU in the H frame images including the i-th frame image is smaller than the sixth value, the method further includes:
Under the condition that the proportion value of the common motion type in the motion types of LCUs in the H frame images is larger than or equal to the sixth value, encoding the ith frame image to the (i+N-1) th frame image by adopting a first encoding mode;
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 irrelevant to the motion type of the LCU.
Optionally, in the case that the first motion type is determined based on a reference queue, after the encoding the i-th frame image to the i+n-1-th frame image by using the first encoding mode, the method further includes:
clearing the reference queue, and adding the characteristic information from the ith frame image to the (i+N-1) th frame image to the reference queue;
the reference queue comprises characteristic 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 type and the prediction mode and the first motion type, the method includes:
and according to the first prediction mode, encoding a target CU in the target LCU.
Optionally, the encoding the target CU in the target LCU according to the first prediction mode includes:
Determining whether the coding cost of the target CU in the first prediction mode is smaller than a seventh value;
and under the condition that the coding cost of the target CU in the first prediction mode is smaller than the seventh value, the target CU is coded by adopting the first prediction mode.
Optionally, after determining whether the coding cost of the target CU in the first prediction mode is less than a seventh value, the method further includes:
under the condition that the coding cost of the target CU in the first prediction mode is greater 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 smaller than that 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 encoding a 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 satisfies a preset condition.
Optionally, the correspondence satisfies at least one of the following:
the indifferent static type has a corresponding relation with Skip prediction modes;
the boundary motion type has a corresponding relation with the Direct prediction mode;
the specific motion type has a corresponding relation with a second prediction mode, wherein the second prediction mode is a first part of prediction modes in L prediction modes;
removing the correspondence between the specific motion type and the prediction modes except for a third prediction mode, wherein the third prediction mode is a second part of prediction modes in L prediction modes;
the common motion type has a corresponding relation with all the prediction modes;
wherein the L prediction modes are related to the target LCU, and L is a positive integer.
In a second aspect, an embodiment of the present invention further provides a prediction mode determining method, where the method includes:
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;
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 the first motion type of the target maximum coding unit LCU in the ith frame image includes:
Acquiring a reference queue, wherein the reference queue comprises characteristic information of N frame images, the characteristic information comprises prediction modes of all coding units CU in LCUs of the frame images, and N is a positive integer;
according to the target LCU, determining M second LCUs in the reference queue, 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 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 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 modes.
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 scale value corresponding to a Skip prediction mode in the L first scale values is larger than a second value or not;
if the first scale value corresponding to the Skip prediction mode in the L first scale values is smaller than or equal to the second value, judging whether the first scale value corresponding to the second prediction mode in the L first scale values is larger than a fourth value;
Judging whether a first scale value corresponding to a third prediction mode in the L first scale values is smaller than a fifth value or not under the condition that the first scale value corresponding to the second prediction mode in the L first scale values is smaller than or equal to the fourth value;
determining that the first motion type is a specific motion type removal under the condition that a first scale value corresponding to a third prediction mode in the L first scale 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 the boundary LCU, and when the first scale value corresponding to the second prediction mode in the L first scale values is smaller than or equal to the fourth value, determining whether the first scale value corresponding to the third prediction mode in the L first scale values is smaller than a fifth value includes:
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 under the condition that the first proportional value corresponding to a second prediction mode in the L first proportional values is smaller than or equal to the fourth value;
Judging whether a first proportional value corresponding to a second predictive mode in the L first proportional values is larger than a fourth value or not under the condition that the first proportional value corresponding to the Direct predictive mode in the L first proportional values is smaller than or equal to the third value;
wherein the third value is greater than the fifth value.
Optionally, the method further comprises:
determining that the first motion type is a non-differential static type under the condition that a first scale value corresponding to a Skip prediction mode in the L first scale values is larger than the second scale value;
determining that the first motion type is a boundary motion type under the condition that a first proportional value corresponding to a Direct prediction mode in the L first proportional values is larger than the third value;
determining that the first motion type is a specific motion type under the condition that a first ratio value corresponding to a second prediction mode in the L first ratio values is larger than the fourth value;
and determining that the first motion type is a common motion type when a first scale value corresponding to a third prediction mode in the L first scale values is greater than or equal to the fifth value.
Optionally, the correspondence satisfies at least one of the following:
The indifferent static type has a corresponding relation with Skip prediction modes;
the boundary motion type has a corresponding relation with the Direct prediction mode;
the specific motion type has a corresponding relation with a second prediction mode, wherein the second prediction mode is a first part of prediction modes in L prediction modes;
removing the correspondence between the specific motion type and the prediction modes except for a third prediction mode, wherein the third prediction mode is a second part of prediction modes in L prediction modes;
the common motion type has a corresponding relation with all the prediction modes;
wherein the L prediction modes are related to the target LCU, and L is a positive integer.
Optionally, 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 method further includes:
and according to the first prediction mode, encoding a target CU in the target LCU.
Optionally, the encoding the target CU in the target LCU according to the first prediction mode includes:
determining whether the coding cost of the target CU in the first prediction mode is smaller than a seventh value;
and under the condition that the coding cost of the target CU in the first prediction mode is smaller than the seventh value, the target CU is coded by adopting the first prediction mode.
Optionally, after determining whether the coding cost of the target CU in the first prediction mode is less than a seventh value, the method further includes:
under the condition that the coding cost of the target CU in the first prediction mode is greater 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 smaller than that 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 encoding a 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 characteristic 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 type and the prediction mode 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 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 a 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;
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 irrelevant to the motion type of the LCU.
Optionally, in the case that the first motion type is determined based on a reference queue, after the encoding the i+1st frame image to the i+n-1 st frame image by using the first encoding mode, the method further includes:
clearing the reference queue, and adding the characteristic information from the ith frame image to the (i+N-1) th frame image to the reference queue;
The reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
Optionally, after the 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 type and the prediction mode and the first motion type, the method further includes:
determining whether a proportion value of a common motion type in motion types of LCUs in H frame images comprising the ith frame image is smaller than a sixth value;
the 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 includes:
under the condition that the proportion value of the common motion type in the motion types of LCUs 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 modes and the first motion type;
wherein the H frame images are continuous, and H is a positive integer.
Optionally, after determining whether the scale value of the common motion type of the LCU in the H frame images including the i-th frame image is smaller than the sixth value, the method further includes:
under the condition that the proportion value of the common motion type in the motion types of LCUs in the H frame images is larger than or equal to the sixth value, encoding the ith frame image to the (i+N-1) th frame image by adopting a first encoding mode;
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 irrelevant to the motion type of the LCU.
Optionally, in the case that the first motion type is determined based on a reference queue, after the encoding the i-th frame image to the i+n-1-th frame image by using the first encoding mode, the method further includes:
clearing the reference queue, and adding the characteristic information from the ith frame image to the (i+N-1) th frame image to the reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
Optionally, after the determining the first motion type of the target maximum coding unit LCU in the ith frame image, the method includes:
determining the motion type of a fifth LCU of the (i+F+1) th frame image as the first motion type under the condition that the motion type of a fourth LCU of the F frame images after the (i) th 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, the pixel difference between the i+f+2 frame image and the i+f+1 frame image is smaller than a first value;
After the motion type of the fifth LCU of the i+f+1 frame image is determined as the first motion type, the method further includes:
obtaining P LCUs included in the i+F+1 frame image, wherein the P LCUs include R CUs, Q mutually different prediction modes exist in 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 proportion values corresponding to the Q prediction modes, wherein each second proportion value is a value of a quantity ratio R of the corresponding prediction modes;
determining a third motion type of a third LCU of the i+F+2 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 characteristic information of N frame images, and N is a positive integer;
and determining a fourth prediction mode of the third LCU according to the third motion type.
Optionally, determining the second motion type of the target LCU according to Q second scale values corresponding to the Q prediction modes includes:
judging whether a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is larger than a second 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 or not under the condition that the 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 ratio value corresponding to a sixth prediction mode in the Q second ratio values is smaller than a fifth value or not under the condition that the second ratio value corresponding to the fifth prediction mode in the Q second ratio values is smaller than or equal to the fourth value;
determining that the second motion type of the target LCU is a specific motion type removal 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;
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 the boundary LCU, and when the second scale value corresponding to the Skip prediction mode in the Q second scale values is smaller than or equal to the second value, determining whether the second scale value corresponding to the fifth prediction mode in the Q second scale values is greater than a fourth value includes:
Judging whether a second proportion value corresponding to a Direct prediction mode in the Q second proportion values is larger than a third value or not under the condition that the 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 ratio value corresponding to a fifth prediction mode in the Q second ratio values is larger than a fourth value or not under the condition that the second ratio value corresponding to the Direct prediction mode in the Q second ratio values is larger than or equal to the third value;
wherein the third value is greater than the fifth value.
Optionally, the method further comprises:
determining that the second motion type of the target LCU is an indiscriminate static type under the condition that a second proportion value corresponding to a Skip prediction mode in the Q second proportion values is larger than the second value;
determining that the second motion type of the target LCU is a boundary motion type under the condition that a second proportion value corresponding to the Direct prediction mode in the Q second proportion values is larger than the third value;
determining that the second motion type of the target LCU 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 that the second motion type of the target LCU is the common motion type under the condition that a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is larger than or equal to the fifth value.
In a third aspect, an embodiment of the present invention further provides a prediction mode determining apparatus, including:
a first determining module, configured to determine a first motion type of a target maximum coding unit LCU in an ith frame image, where i is an integer greater than 1;
and the second determining module is used for 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.
In a fourth aspect, an embodiment of the present invention further provides a prediction mode determining apparatus, including:
a third determining module, configured to determine a first motion type of a target maximum coding unit LCU in an i-th frame image, where i is an integer greater than 1, when a pixel difference between the i-th frame image and the i-1-th frame image is less than a first value;
and the fourth determining module is used for 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.
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 a 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, embodiments of the present invention also provide a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the method according to the first aspect, or the steps of the method according to the second aspect.
In the embodiment of the invention, a prediction mode determining device determines a first motion type of a target maximum 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 embodiment of the invention can determine the prediction mode of the LCU through the motion type of the LCU, so that 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 that are needed in the description of the embodiments of the present invention will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort to a person of ordinary skill in the art.
FIG. 1a is a diagram of one of the coding effects provided by an embodiment of the present invention;
FIG. 1b is a second encoding effect diagram according to an embodiment of the present invention;
FIG. 1c is a third diagram of coding effects provided by embodiments of the present invention;
FIG. 2a is a diagram of a coding effect provided by an embodiment of the present invention;
FIG. 2b is a fifth diagram of coding effects provided by an embodiment of the present invention;
FIG. 2c is a diagram showing a coding effect according to an embodiment of the present invention;
FIG. 3a is a diagram of a coding effect provided by an embodiment of the present invention;
FIG. 3b is a diagram of coding effects according to an embodiment of the present invention;
FIG. 3c is a diagram of a coding effect provided by an 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 view of coding effects provided by embodiments of the present invention;
FIG. 4c is a diagram of a coding effect provided by an embodiment of the present invention;
FIG. 5 is a flowchart of a prediction mode determining method according to an embodiment of the present invention;
FIG. 6 is a second flowchart of a prediction mode determination method according to an embodiment of the present invention;
FIG. 7 is a third flowchart of a prediction mode determination method according to an embodiment of the present invention;
fig. 8 is one of schematic structural diagrams of a prediction mode determining apparatus provided in an embodiment of the present invention;
FIG. 9 is a second schematic 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 following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
For ease of understanding, some of the details relating to embodiments of the present invention are described below.
In an embodiment of the invention, the motion type of the largest coding unit (Large Coding Unit, LCU) is defined.
Alternatively, the motion type of the LCU may be defined based on the image of the LCU. Exemplary:
1) If the images of the LCU are substantially stationary and the same, the motion type of the LCU may be defined as a indifferent stationary type;
2) If the LCU is at the boundary of the image, the shot of the shot video moves along a certain direction, the image of the LCU is basically static, and the movement type of the LCU can be defined as the boundary movement type;
3) If the image of the LCU is in motion, the motion type of the LCU may be defined as a particular motion type.
It should be understood that the above-described manner of defining the motion type of the LCU is merely an example, and the embodiment of the present invention does not limit the manner of defining the motion type of the LCU.
In the embodiment of the invention, the motion type of the LCU is mainly used for determining the prediction mode of the LCU. Therefore, there is a correspondence between the motion type and the prediction mode. In particular, in the correspondence between the motion type and the prediction mode, one motion type may correspond to one or more prediction modes, which 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 modes may include: intra (Intra) prediction mode, inter (Inter) prediction mode, skip (Skip) prediction mode, direct (Direct) prediction mode, intra Block Copy (IBC) prediction mode.
In practical applications, the prediction mode corresponding to the motion type may 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 the encoding Unit (CU) in the LCU, so that the prediction mode corresponding to the motion type may be determined. In this way, 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 the low-latency P master file encoding (Lowdelay P Main Profile 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 coding result obtained by coding a 352×288 low motion (akiyo) reference sequence.
The result of encoding the image shown in fig. 1a is: the quantization parameter (Quantizer Parameter, QP) value is 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 uses of Skip prediction modes is 40, the number of uses of direct prediction modes is 1, and the number of uses of intra prediction modes, inter prediction modes and IBC prediction modes is 0.
The result of encoding the image shown in fig. 1b is: QP value 45; the total number of prediction modes used is 47 (i.e. the image of fig. 1a is divided into 47 CUs), where Skip prediction mode is used 46 times, direct prediction mode is used 1 time, intra prediction mode, inter prediction mode and IBC prediction mode are all used 0 time.
The result of encoding the image shown in fig. 1c is: QP value 45; the total number of prediction modes used is 50 (i.e. the image of fig. 1c is divided into 50 CUs), where the number of uses of Skip prediction modes is 49, the number of uses of direct prediction modes is 1, and the number of uses of intra prediction modes, inter prediction modes and IBC prediction modes is 0.
As can be seen from an analysis of the encoding results of the images shown in fig. 1a to 1 c: LCUs of the images shown in fig. 1a to 1c are basically encoded using Skip prediction modes. As shown in fig. 1a and 1b, it can be seen that the LCU image content belonging to the background block is similar, less variable, belonging to the indifferent still type; the LCU belonging to the moving body can basically judge the indifferent stationary type due to smaller movement amplitude.
Fig. 2a to 2c are 3 consecutive visual images of the encoded Basketball (Basketball) reference sequence image of 1920×1080. The sequence is characterized in that the lens moves left and right, and the moving body moves severely.
The result of encoding the image shown in fig. 2a is: QP value 45; the total number of prediction modes used is 841 (i.e. the image of fig. 2a is divided into 841 CUs), where the number of Intra prediction modes used is 98, the number of inter prediction modes used is 89, the number of skip prediction modes used is 482, the number of direct prediction modes used is 172, and the number of ibc prediction modes used is 0.
The result of encoding the image shown in fig. 2b is: QP value 45; the total number of prediction modes used is 994 (i.e. the image of fig. 2b is divided into 994 CUs), where Intra prediction mode is used a number of times of 198, inter prediction mode is used a number of times of 59, skip prediction mode is used a number of times of 475, direct prediction mode is used a number of times of 262, ibc prediction mode is used a number of times of 0.
The result of encoding the image shown in fig. 2c is: QP value 45; the total number of prediction modes used is 883 (i.e., the image of fig. 2c is divided into 883 CUs), where the number of Intra prediction modes used is 171, the number of inter prediction modes used is 70, the number of skip prediction modes used is 464, the number of direct prediction modes used is 178, and the number of ibc prediction modes used is 0.
Analysis of the encoding results of the images shown in fig. 2a to 2c gives: LCU positioned at the left and right boundaries is encoded in Direct prediction mode; LCUs belonging to background blocks are mostly coded in Skip prediction mode; the CUs in the LCU marked by the bold line box are mainly encoded in Direct prediction mode and Intra prediction mode.
In addition, the motion type of LCU positioned at the left and right boundaries belongs to the boundary motion type; the motion type of LCUs belonging to the background block belongs to the indifferent stationary type; the LCUs marked by the thick line boxes belong to a specific motion type for Direct and Intra.
Fig. 3a to 3c are 3 consecutive visual images of the coded City (City) reference sequence image of 1280×720.
The result of encoding the image shown in fig. 3a is: QP value 45; the total number of prediction modes used is 219 (i.e. the image of fig. 3a is divided into 219 CUs), where the number of Inter prediction modes used is 6, the number of skip prediction modes used is 213, and the number of intra prediction modes, direct prediction modes and IBC prediction modes used is 0.
The result of encoding the image shown in fig. 3b is: QP value 45; the total number of prediction modes used is 353 (i.e. the image of fig. 3b is divided into 353 CUs), wherein the number of Intra prediction modes used is 3, the number of inter prediction modes used is 9, the number of skip prediction modes used is 333, the number of direct prediction modes used is 8, and the number of ibc prediction modes used is 0.
The result of encoding the image shown in fig. 3c is: QP value 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 Intra prediction modes used is 1, the number of inter prediction modes used is 14, the number of skip prediction modes used is 224, the number of direct prediction modes used is 1, and the number of ibc prediction modes used is 0.
Analysis of the encoding results of the images shown in fig. 3a to 3c gives: for slow motion, fine-textured buildings, especially CUs in two LCUs of the red frame, inter prediction modes are more likely to be used, belonging to a particular motion type for Inter prediction modes.
Fig. 4a to 4c are 3 consecutive visual images of the encoded result of 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 encoding the image shown in fig. 4a is: QP value 27; the total number of prediction modes used is 4211 (i.e. the image of fig. 4a is divided into 4211 CUs), where the number of Intra prediction modes used is 278, the number of inter prediction modes used is 281, the number of skip prediction modes used is 1751, the number of direct prediction modes used is 1901, and the number of ibc prediction modes used is 0.
The result of encoding the image shown in fig. 4b is: QP value 27; the total number of prediction modes used is 4349 (i.e. the image of fig. 4b is divided into 4349 CUs), wherein the number of Intra prediction modes used is 230, the number of inter prediction modes used is 318, the number of skip prediction modes used is 1376, the number of direct prediction modes used is 2425, and the number of ibc prediction modes used is 0.
The result of encoding the image shown in fig. 4c is: QP value 27; the total number of prediction modes used is 3918 (i.e. the image of fig. 4c is divided into 3918 CUs), where Intra prediction mode is 177, inter prediction mode is 297, skip prediction mode is 1394, direct prediction mode is 2050, ibc prediction mode is 0.
Analysis of the encoding results of the images shown in fig. 4a to 4c gives: CU in LCU of cactus mainly encodes Direct prediction type, belonging to specific motion type aiming at Direct prediction type; for cards rotating clockwise on the wall, most of CUs in LCUs are encoded by Inter prediction modes, and belong to specific motion types aiming at the Inter prediction modes.
Analysis of a large number of experimental results including fig. 1a to fig. 4c shows that the motion types of the adjacent frames of image content and the optimal prediction modes have strong correlation and have corresponding relations. Specifically, the method can be expressed as follows:
1) If the motion type of the LCU is a non-differential static type, basically using Skip prediction mode; in other words, LCUs encoded in Skip prediction mode are mostly of the indifferent stationary type;
2) If the motion type of the LCU is boundary motion type, basically using a Direct prediction mode; in other words, most of boundary LCUs encoded 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 usually a Direct prediction mode, an Inter prediction mode and an Intra prediction mode, and the co-located LCUs have similarity in the selection of the prediction modes; in other words, most of the image contents of LCUs encoded in Direct prediction mode, inter prediction mode, intra prediction mode are moving.
It should be noted that, the correspondence between the motion type and the prediction mode is merely an example, and the specific expression of the correspondence between the motion type and the prediction mode is not limited.
From the foregoing, it can be known that the motion type of the LCU may be used to determine the prediction mode of the LCU, so in the embodiment of the present invention, for the LCU to be encoded, the prediction mode determining device may determine the prediction mode of the LCU by using a fast algorithm, that is, determine the motion type of the LCU first, and then determine the prediction mode of the LCU according to the motion type of the LCU. In this way, the rate of prediction mode determination of the LCU may be increased compared to determining the prediction mode of the LCU by the prediction mode determination device in a traversal manner.
The following describes a prediction mode determination method according to an embodiment of the present invention in detail.
Referring to fig. 5, fig. 5 is a schematic flow chart of a prediction mode determining method according to an embodiment of the present invention. As shown in fig. 5, the prediction mode determining method according to the embodiment of the present invention may include the steps of:
step 501, determining a first motion type of a target maximum coding unit LCU in an ith frame image, where i is an integer greater than 1.
In the embodiment of the present invention, the image of the first frame in the Group of images (Group of pictures) may be regarded as the first frame image, the image of the second frame may be regarded as the second frame image, the image of the i-th frame may be regarded as the i-th frame image, and so on.
In particular, the i-th frame image may be a forward predictive coded frame (P frame) or a bi-predictive interpolated coded frame (B frame) in a Group of images (Group of pictures); the target LCU may be any LCU in the ith frame image.
Step 502, determining a first prediction mode of the target LCU according to the correspondence between the motion type and the prediction mode and the first motion type.
In specific implementation, the prediction mode determining device may determine, according to the correspondence between the motion type and the prediction mode corresponding to the first motion type, then determine the first prediction mode according to the prediction mode corresponding to the first motion type.
The following describes the determination of the first prediction mode according to the prediction mode corresponding to the first motion type.
In a first implementation manner, the prediction mode determining device may determine the first prediction mode directly according to a 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 particular, in the case where the number of prediction modes corresponding to the first motion type is 1, the prediction mode determining apparatus may directly determine the prediction mode corresponding to the first motion type as the first prediction mode.
And under the condition that the number of the prediction modes corresponding to the first motion type is larger than 1, the prediction mode determining device can determine the prediction mode with the minimum coding cost in the prediction modes corresponding to the first motion type as the first prediction mode, so that the coding cost of the target LCU can be reduced.
In a second implementation manner, after determining the prediction mode corresponding to the first motion type, comparing the minimum coding cost of the target LCU in the prediction mode corresponding to the first motion type with a coding cost threshold to obtain a comparison result, and then determining the first prediction mode according to the comparison result.
If the coding cost is smaller than the seventh value, the coding cost is smaller; if the coding cost is greater than or equal to the seventh value, the coding cost is larger. In practical applications, the seventh value may be set according to practical requirements, which is not limited in the embodiment of the present invention.
Therefore, if the comparison result indicates that the minimum coding cost is smaller than the coding cost threshold, a first implementation manner may be adopted to determine, as the first prediction mode, a prediction mode with the minimum coding cost in the prediction modes corresponding to the first motion type.
If the comparison result is that the minimum coding result is greater than or equal to the coding cost threshold, other modes, such as a traversal mode, may be adopted to determine the first prediction mode of the prediction mode with smaller coding cost, so that the coding cost of the target LCU may 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.
According to the prediction mode determining method, the prediction mode of the LCU can be determined through 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.
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 indifferent static type has a corresponding relation with Skip prediction modes;
the boundary motion type has a corresponding relation with the Direct prediction mode;
the specific motion type has a corresponding relation with a second prediction mode, wherein the second prediction mode is a first part of prediction modes in L prediction modes;
removing the correspondence between the specific motion type and the prediction modes except for a third prediction mode, wherein the third prediction mode is a second part of prediction modes in L prediction modes;
the common motion type has a corresponding relation with all the prediction modes;
wherein the L prediction modes are related to the target LCU, and M is a positive integer.
It should be noted that, in the embodiment of the present invention, a specific implementation principle of determining, by the prediction mode determining device, the L prediction modes according to the target LCU may refer to the following description, which is not repeated herein. In addition, the expression form of the correspondence relationship described above is only an example, and thus the specific expression form of the correspondence relationship of the motion type and the prediction mode is not limited.
As can be seen from the foregoing experimental results in fig. 1a to fig. 4c, if the motion type of the LCU is a specific motion type, the prediction mode corresponding to the LCU is mainly a Direct prediction mode, an Inter prediction mode, and an Intra prediction mode. Thus, optionally, in a case where 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 a Direct prediction mode, an Inter prediction mode, and an Intra prediction mode, and the third prediction mode may also be at least one of a Direct prediction mode, an Inter prediction mode, and an 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:
the L prediction modes are assumed to include Direct prediction mode, inter prediction mode, and 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 correspondence relationship with the Direct prediction mode and the Inter prediction mode.
And 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 a correspondence with all prediction modes. Therefore, for an LCU whose motion type is determined to be a normal motion type, it can be considered that the LCU does not employ a fast algorithm to determine the prediction mode of the LCU.
In an embodiment of the present invention, optionally, the determining the first motion type of the target maximum coding unit LCU in the ith frame image includes:
under the condition that an ith frame image meets a first condition, determining a first motion type of a target maximum coding unit LCU in the ith frame image, wherein i is an integer greater than 1;
Wherein the i-th 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 type of a first LCU of a previous k frame image of the ith frame image is the same, the first LCU and the target LCU are co-located 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 the first case, the i-th frame image satisfying the first condition includes that a pixel difference between the i-th frame image and the i-1-th frame image is smaller than a first value.
Wherein, the pixel difference between the ith frame image and the ith-1 frame image can be used for reflecting the difference size between the ith frame image and the ith-1 frame image. If the pixel difference between the ith frame image and the i-1 th frame image is smaller than the first value, the difference between the ith frame image and the i-1 th frame image is smaller, so that the prediction mode determining device can enable a quick algorithm to determine the prediction mode of the LCU of the ith frame image.
In a specific implementation, in one implementation, the pixel difference between the ith frame image and the i-1 th frame image may be: and the difference value of the pixel values of the original image of the ith frame image and the ith-1 frame image.
In another implementation, the pixel difference between the i-th frame image and the i-1 th frame image may be an absolute average pixel difference of co-located LCUs of the i-th 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 i-th frame 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 the following, the first motion type of the target maximum coding unit LCU in the i-th frame image is determined.
Optionally, the determining the first motion type of the target maximum coding unit LCU in the ith frame image includes:
determining the first motion type according to a reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
The N frame images are located before the i frame image. Preferably, the N frame pictures may be an i-N frame picture through an i-1 frame picture in the GOP. In addition, the N frame images do not adopt the rapid algorithm of the embodiment of the invention to determine the prediction mode of the LCU.
In practical application, the value of N may be set according to practical requirements, which is not limited in this embodiment of the present invention, and alternatively, N may be 1 to 8, and exemplary, N may be 4.
For each of the N frame images, the characteristic information may include at least one of: frame number of the frame image; frame type of frame image; QP value for frame image; original image pixel values of the frame image; prediction modes of all the coding units CU in the LCU of the frame image; motion type of each LCU in the frame image.
In a specific implementation, optionally, in a case where the feature information includes a prediction mode of each coding unit CU in the LCU of the frame image, determining the first motion type according to the reference queue includes:
according to the target LCU, determining M second LCUs in the reference queue, 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 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;
Each first ratio value is a ratio of the number of the corresponding prediction modes to S.
Firstly, the M second LCUs in the reference queue are determined according to the target LCU.
In specific implementation, the prediction mode determining device may be configured to determine, according to at least one of the following information of the target LCU: the position of the target LCU in the ith frame of image; a frame class of the i-th frame image; and determining M second LCUs in the reference queue according to the QP value of the target LCU.
Optionally, the M second LCUs satisfy: the M second LCUs and the target LCU are co-located LCUs; the frame image to which each second LCU belongs in the M second LCUs is the same as the frame type of the ith frame image; and the difference value between the QP value of the quantization parameter of each second LCU in the M second LCUs and the QP value of the target LCU is smaller than an eighth value. Wherein the eighth value is freely settable, alternatively, the eighth value may be any one of values from 0 to 4.
The M second LCUs comprise S CUs, and S is an integer greater than or equal to M; each CU corresponds to a prediction mode, L prediction modes which are different from each other exist in S prediction modes of the S CUs, and L is a positive integer which is less than or equal to S. That is, the same prediction mode may exist among the S prediction modes.
The determining the first motion type according to the L first scale values corresponding to the L prediction modes is described below.
Each first proportion value is the value of the number ratio S of the corresponding prediction modes. In particular implementation, the prediction mode determining device may determine the number of each of the L prediction modes that occupies S prediction modes, and then, for each of the L prediction modes, may determine the value of the number ratio S occupied by the prediction mode among the S prediction modes as the 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. 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, and 2 prediction modes different from each other exist in 5 prediction modes of the 5 CUs, namely, prediction mode 1 and prediction mode 2, 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 proportion value corresponding to the prediction mode 1 is 1/5; the first ratio value corresponding to the 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 judging result;
wherein the first determination comprises at least one of:
judging whether a first scale value corresponding to a Skip prediction mode in the L first scale values is larger than a second value or not;
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 under the condition that the target LCU is a boundary LCU;
judging whether a first proportional value corresponding to a second predictive mode in the L first proportional values is larger than a fourth value or not, wherein the second predictive mode is a first partial predictive mode in the L predictive modes;
judging whether a first proportional value corresponding to a third predictive mode in the L first proportional values is smaller than a fifth value or not, wherein the third predictive mode is a second partial predictive mode in the L predictive 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 boundary LCU, that is, the determination may not be performed for LCUs other than the non-boundary LCU.
Further, the determining the first motion type according to the first determination result includes at least one of the following:
under the condition that the first judging result meets a second condition, determining the first motion type as a target motion type;
under the condition that the first judging result does not meet the second condition, determining that the first motion type is a common motion type;
wherein the second condition is satisfied to include at least one of:
a first scale value corresponding to a Skip prediction mode in the L first scale values is larger than the second scale value;
a first proportional value corresponding to a Direct prediction mode in the L first proportional values is larger than the third value;
a first ratio value corresponding to a second prediction mode in the L first ratio values is larger than the fourth value;
and a first proportional value corresponding to a third prediction mode in the L first proportional values is smaller than the fifth proportional value.
In 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 setting of the second value, the third value, the fourth value and the fifth value may satisfy the following condition:
when the first scale value corresponding to the Skip prediction mode in the L first scale values is greater than the second scale value, it may be stated that the Skip prediction mode in the L prediction modes occupies a large proportion;
when the first ratio value corresponding to the Direct prediction mode in the L first ratio values is greater than the second ratio value, it may be stated that the Direct prediction mode in the L prediction modes occupies a large proportion;
when the first scale value corresponding to the second prediction mode in the L first scale values is greater than the second value, it may be stated that the second prediction mode in the L prediction modes occupies a large proportion;
in the case that the first scale value corresponding to the third prediction mode of the L first scale values is smaller than the fifth scale value, it may be stated that the third prediction mode of the L prediction modes occupies a small proportion.
Alternatively, the second value may be set to 0.66, the third and fourth values 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 target motion type includes: indifferent still type, boundary motion type, specific motion type, and remove specific motion type;
And under the condition that the first judging result meets a second condition, determining that the first motion type is a target motion type, wherein the method comprises at least one of the following steps:
determining that the first motion type is a non-differential static type under the condition that a first scale value corresponding to a 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 under the condition that a first proportional value corresponding to a Direct prediction mode in the L first proportional values is larger than the third value;
determining that the first motion type is a specific motion type under the condition that a first scale value corresponding to a second prediction mode in the L first scale values is larger than the fourth value;
and determining the first motion type to be the specific motion type removed under the condition that a first scale value corresponding to a third prediction mode in the L first scale values is smaller than the fifth value.
In practical applications, in the case where the first judgment includes the above two or more judgments, the prediction mode determining apparatus may sequentially execute the judgments included in the first judgment, and in the course of executing the judgments in the first judgment, may determine the first motion type if a judgment result of a certain judgment satisfies one of the second conditions, and end executing the rest of the judgments in the first judgment, so that the rate of determination of the first motion type may be improved.
For ease of understanding, examples are illustrated below:
it is assumed that the first judgment includes all the above-described judgments, and the prediction mode determination device sequentially performs all the above-described judgments in the order from top to bottom. In addition, the target LCU is not a boundary LCU.
In practical application, the prediction mode determining device first determines whether a first scale value corresponding to a Skip prediction mode in the L first scale values is greater than a second scale value.
If it is determined that the first scale value corresponding to the Skip prediction mode in the L first scale values is greater than the second scale value, the first motion type may be directly determined as an indiscriminate still type.
If it is determined that the first scale value corresponding to the Skip prediction mode in the L first scale values is smaller than or equal to the second value, whether the first scale value corresponding to the second prediction mode in the L first scale values is larger than the fourth value may be continuously determined, and so on.
And in the second case, the motion type of the first LCU of the previous k frame image of the ith frame image meeting the first condition is the same.
In a specific implementation, the previous k frame image of the ith frame image may determine the prediction mode of the LCU by using a fast algorithm, or may be the prediction mode of the LCU determined by using other methods.
Optionally, the determining the first motion type of the target maximum coding unit LCU in the ith frame image includes:
and determining the motion type of the first LCU as the first motion type.
In particular, in consideration of strong content correlation between adjacent frame images, if the prediction modes of co-located LCUs of consecutive multi-frame images are the same, it can be predicted that in the following frame images, the possibility that the prediction modes of the co-located LCUs thereof remain the same decision is high, so that the motion type of the first LCU can be directly determined as the first motion type, and the rate of motion type determination of the LCU can be further improved in case two compared with case one.
For case two, in the case where the pixel difference between the i+1st frame image and the i frame image is smaller than the first value, the determination of the prediction mode of the third LCU of the i+1st frame image that is co-located with the target LCU may be determined in the following manner.
Optionally, after the determining the first prediction mode of the target LCU, the method further includes:
obtaining P LCUs included in the ith frame image, wherein the P LCUs comprise R CUs, Q mutually different prediction modes exist in 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 proportion values corresponding to the Q prediction modes, wherein each second proportion value is a value of a quantity 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 characteristic information of N frame images, and N is a positive integer;
and determining a fourth prediction mode of the third LCU according to the third motion type.
From the foregoing, it can be seen that if the prediction modes of the co-located LCUs of consecutive multi-frame images are the same, it is possible to predict that in the following frame images, the probability that the prediction modes of the co-located LCUs thereof remain the same decision is high, but it is not excluded that the decisions may be different. Therefore, after the i-th frame image finishes encoding, a second motion type of the target LCU may be determined according to Q second scale values corresponding to the Q prediction modes, and whether the second motion type is the same as the first motion type may be determined.
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 previous 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 co-located with the target LCU in the (i+1) th frame image can be determined in a case-one mode, 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 indicated that the content of the i-th frame image and the frame image preceding the i-th frame image has a smaller difference, so that 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 in the i+1-th frame image, which is co-located with the target LCU, can still be determined in a second case manner, so that the rate of determining the motion type of the LCU can be improved. And so on.
In the second case, "obtaining P LCUs included in the ith frame image, where the P LCUs include R CUs, Q prediction modes different from each other exist in R prediction modes of the R CUs, Q is a positive integer less than or equal to R, R is a positive integer greater 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, 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 prediction modes which are different from each other exist in 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; according to the L first scale values corresponding to the L prediction modes, the implementation principle of determining the first motion type "is similar, and the difference is that: in case one, the M second LCUs come from the reference queue, while in case two, the P LCUs come from the ith frame picture.
Therefore, the detailed description of the related content in the second case may be referred to in the first case, and will not be repeated herein.
Optionally, the determining, according to the Q second scale values corresponding to the Q prediction modes, the second motion type of the target LCU includes:
executing the second judgment to obtain a second judgment result;
determining the second motion type according to the second judging result;
wherein the second determination comprises at least one of:
judging whether a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is larger than a second value or not;
judging whether a second proportion value corresponding to a Direct prediction mode in the Q second proportion values is larger than a third value or not under the condition that the target LCU is a boundary LCU;
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 partial 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 of prediction modes 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:
under the condition that the second judging result meets a third condition, determining the first motion type as a target motion type;
under the condition that the second judging result does not meet the third condition, determining that the first motion type is a common motion type;
wherein the second judging result meets a third condition including at least one of the following:
the second ratio value corresponding to the Skip prediction mode in the Q second ratio values is larger than the second value;
the second ratio value corresponding to the Direct prediction mode in the Q second ratio values is larger than the third value;
a second ratio value corresponding to a fifth prediction mode in the Q second ratio values is larger than the fourth value;
and a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is smaller than the fifth proportion value.
Optionally, the target motion type includes: indifferent still type, boundary motion type, specific motion type, and remove specific motion type;
And under the condition that the second judging result meets a third condition, determining that the first motion type is a target motion type, wherein the method comprises at least one of the following steps:
determining that the first motion type is an indiscriminate static type under the condition that a second proportion value corresponding to a 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 when 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 to be the specific motion type removed 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 the 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 embodiments, specifically described as follows:
Embodiment one
Optionally, 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 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 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 a 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;
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 irrelevant to the motion type of the LCU.
When the embodiment of the invention adopts a quick algorithm to determine the prediction mode of the LCU, 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 mode, the prediction mode determining device uses the prediction mode of the LCU determined by other modes except the fast algorithm, for example, uses the traversal mode to determine the prediction mode of the LCU.
In this embodiment, the first prediction mode set may include a prediction mode of each LCU in the i-th frame image after encoding using the first encoding method. The second set of prediction modes may include prediction modes for LCUs in the i-th frame image determined using a fast algorithm.
In particular, the prediction mode determining device may determine whether the second prediction mode set matches the first prediction mode set by comparing prediction modes different from each other in the first prediction mode set with prediction modes different from each other 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 the 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:
assuming that the first prediction mode set includes 10 LCUs, and 10 prediction modes of the 10 LCUs include 8 Skip prediction modes and 2 Direct prediction modes; the second prediction mode set includes 10 LCUs, and the 10 prediction modes of the 10 LCUs include 9 Skip prediction modes and 1 Direct prediction mode. In addition, the preset range is assumed to be 0.2.
It can be seen that the duty cycle of Skip prediction mode is 0.8 and the duty cycle of direct prediction mode is 0.2 in the first prediction mode set; the duty ratio of Skip prediction mode in the second prediction mode set is 0.9, and the duty ratio of direct prediction mode is 0.1. In addition, the difference between the duty ratio of Skip prediction mode in the first prediction mode set and the duty ratio of Skip prediction mode in the second prediction mode set is within a preset range, and the difference between the duty ratio of Direct prediction mode in the first prediction mode set and the duty ratio of 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 the LCU in the i+1 frame that is co-located with the target LCU using a fast algorithm.
Optionally, in the case that the first motion type is determined based on a reference queue, after the encoding the i+1st frame image to the i+n-1 st frame image by using the first encoding mode, the method further includes:
Clearing the reference queue, and adding the characteristic information from the ith frame image to the (i+N-1) th frame image to the reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
In the 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 while the prediction mode corresponding to the first motion type is employed is not the most ideal prediction mode for encoding the target LUC, it can be explained that N image frames included in the reference queue are greatly different from the content of the i-th frame image, and therefore, the prediction mode determining apparatus can empty the reference queue and add the feature information of the i-th frame image to the i+n-1-th frame image to the reference queue, thereby improving the reference reliability of the reference queue.
In this embodiment, the prediction mode determining apparatus encodes the i-th frame image using the first encoding mode, and encodes the i-th frame image without using the prediction mode determined by the fast algorithm.
In practical application, the embodiment may be executed every G frames, where G is a positive integer, and may be specifically set according to practical requirements, which is not limited by 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 type and the prediction mode and the first motion type, the method includes:
and according to the first prediction mode, encoding a target CU in the target LCU.
It should be appreciated that the target CU may be any one of the target LCUs.
In particular implementations, the following two implementations may be included.
In an implementation one, the prediction mode determining device may directly encode the target CU with the first prediction mode.
In a second implementation manner, optionally, the encoding, according to the first prediction mode, a target CU in the target LCU includes:
determining whether the coding cost of the target CU in the first prediction mode is smaller than a seventh value;
and under the condition that the coding cost of the target CU in the first prediction mode is smaller than the seventh value, the target CU is coded by adopting the first prediction mode.
Optionally, after determining whether the coding cost of the target CU in the first prediction mode is less than a seventh value, the method further includes:
under the condition that the coding cost of the target CU in the first prediction mode is greater 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 smaller than that of the target CU for coding by adopting other prediction modes.
In specific implementation, the seventh value may be set to satisfy the following condition: when the coding cost of the target CU is smaller than the seventh value in the first prediction mode, it is indicated that the coding cost of coding the target CU using the first prediction mode is smaller; and when 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 coded by adopting the first prediction mode is larger.
Therefore, in the second embodiment, when the encoding cost of the target CU in the first prediction mode is smaller than the seventh value, the target CU may be directly encoded in the first prediction mode; and under the condition that the coding cost of the target CU in the first prediction mode is greater than or equal to the seventh value, determining a seventh prediction mode in other modes and coding the target CU by adopting the seventh prediction mode, so that the coding cost of the target CU can be ensured to be smaller.
In a second embodiment, optionally, in a case that the first motion type is determined based on a reference queue, after 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 satisfies a preset condition.
In particular, the target frame image may be the frame image stored for the longest time in the reference queue, i.e. the target frame image may be the frame image that first enters in the reference queue. In this case, it can be understood that the prediction mode determination device updates the reference queue according to the first-in first-out rule.
Of course, in other embodiments, the target frame image may be any B-frame or P-frame image.
In the second embodiment, the prediction mode determining apparatus encodes the i-th frame image using the prediction mode of the LCU determined by the fast algorithm.
In practical applications, the first and second embodiments may be combined. In the above description, it is understood that the first embodiment may be performed every G frame, and the second embodiment may be used to encode frame images in G frames at intervals, and the first embodiment may be used to encode frame images in other frames.
In an embodiment of the present invention, optionally, after the 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 type and the prediction mode and the first motion type, the method further includes:
determining whether a proportion value of a common motion type in motion types of LCUs in H frame images comprising the ith frame image is smaller than a sixth value;
the 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 includes:
under the condition that the proportion value of the common motion type in the motion types of LCUs 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 modes 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 fact that the proportion value of the common motion type in the motion types of the LCUs in the H frame images is normal is indicated, 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 modes and the first motion type, and the rate of determining the prediction mode is improved.
Optionally, after determining whether the scale value of the common motion type of the LCU in the H frame images including the i-th frame image is smaller than the sixth value, the method further includes:
under the condition that the proportion value of the common motion type in the motion types of LCUs in the H frame images is larger than or equal to the sixth value, encoding the ith frame image to the (i+N-1) th frame image by adopting a first encoding mode;
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 irrelevant to the motion type of the LCU.
And under the condition that the proportion value of the common motion type in the motion type of the LCU in the H frame images is larger than or equal to the sixth value, the proportion value of the common motion type in the motion type of the LCU in the H frame images is abnormal, so that the ith frame image to the (i+N-1) th frame image can be encoded by adopting a first encoding mode. The prediction modes of the co-located LCUs of the ith frame image to the (i+N-1) th frame image are determined by other modes besides a fast algorithm, so that the coding effect can be improved.
In specific implementation, the sixth value may be set according to actual requirements, which is not limited in the embodiment of the present invention. Alternatively, the setting of the sixth value may satisfy: and under the condition that the proportion value of the common motion type in the motion type of the LCU in the H frame images is smaller than the sixth value, the proportion value of the common motion type in the motion type of the LCU in the ith frame image is very small. Alternatively, the sixth value may be 1%.
Optionally, in the case that the first motion type is determined based on a reference queue, after the encoding the i-th frame image to the i+n-1-th frame image by using the first encoding mode, the method further includes:
clearing the reference queue, and adding the characteristic information from the ith frame image to the (i+N-1) th frame image to the reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
In the 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 proportion value of the common motion type in the motion types of LCUs in the i-th frame image is abnormal, it can be explained that N image frames included in the reference queue differ greatly from the content of the i-th frame image, and therefore, the prediction mode determining apparatus can empty the reference queue and add the feature information of the i-th frame image to the i+n-1-th frame image to the reference queue, so that the reference reliability of the reference queue can be improved.
The embodiment of the invention also provides a prediction mode determining method, and for convenience of understanding, please refer to fig. 6. As shown in fig. 6, the prediction mode determination method may include the steps of:
Step 601, determining a first motion type of a target maximum coding unit LCU in an ith frame image, where i is an integer greater than 1, when a pixel difference between the ith frame image and the i-1 th frame image is less than a first value.
Step 602, determining a 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 determining the first motion type of the target maximum coding unit LCU in the ith frame image includes:
acquiring a reference queue, wherein the reference queue comprises characteristic information of N frame images, the characteristic information comprises prediction modes of all coding units CU in LCUs of the frame images, and N is a positive integer;
according to the target LCU, determining M second LCUs in the reference queue, 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 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 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 modes.
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 scale value corresponding to a Skip prediction mode in the L first scale values is larger than a second value or not;
if the first scale value corresponding to the Skip prediction mode in the L first scale values is smaller than or equal to the second value, judging whether the first scale value corresponding to the second prediction mode in the L first scale values is larger than a fourth value;
judging whether a first scale value corresponding to a third prediction mode in the L first scale values is smaller than a fifth value or not under the condition that the first scale value corresponding to the second prediction mode in the L first scale values is smaller than or equal to the fourth value;
determining that the first motion type is a specific motion type removal under the condition that a first scale value corresponding to a third prediction mode in the L first scale 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 the boundary LCU, and when the first scale value corresponding to the second prediction mode in the L first scale values is smaller than or equal to the fourth value, determining whether the first scale value corresponding to the third prediction mode in the L first scale values is smaller than a fifth value includes:
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 under the condition that the first proportional value corresponding to a second prediction mode in the L first proportional values is smaller than or equal to the fourth value;
judging whether a first proportional value corresponding to a second predictive mode in the L first proportional values is larger than a fourth value or not under the condition that the first proportional value corresponding to the Direct predictive mode in the L first proportional values is smaller than or equal to the third value;
wherein the third value is greater than the fifth value.
Optionally, the method further comprises:
determining that the first motion type is a non-differential static type under the condition that a first scale value corresponding to a Skip prediction mode in the L first scale values is larger than the second scale value;
determining that the first motion type is a boundary motion type under the condition that a first proportional value corresponding to a Direct prediction mode in the L first proportional values is larger than the third value;
Determining that the first motion type is a specific motion type under the condition that a first ratio value corresponding to a second prediction mode in the L first ratio values is larger than the fourth value;
and determining that the first motion type is a common motion type when a first scale value corresponding to a third prediction mode in the L first scale values is greater than or equal to the fifth value.
Optionally, the correspondence satisfies at least one of the following:
the indifferent static type has a corresponding relation with Skip prediction modes;
the boundary motion type has a corresponding relation with the Direct prediction mode;
the specific motion type has a corresponding relation with a second prediction mode, wherein the second prediction mode is a first part of prediction modes in L prediction modes;
removing the correspondence between the specific motion type and the prediction modes except for a third prediction mode, wherein the third prediction mode is a second part of prediction modes in L prediction modes;
the common motion type has a corresponding relation with all the prediction modes;
wherein the L prediction modes are related to the target LCU, and L is a positive integer.
Optionally, 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 method further includes:
And according to the first prediction mode, encoding a target CU in the target LCU.
Optionally, the encoding the target CU in the target LCU according to the first prediction mode includes:
determining whether the coding cost of the target CU in the first prediction mode is smaller than a seventh value;
and under the condition that the coding cost of the target CU in the first prediction mode is smaller than the seventh value, the target CU is coded by adopting the first prediction mode.
Optionally, after determining whether the coding cost of the target CU in the first prediction mode is less than a seventh value, the method further includes:
under the condition that the coding cost of the target CU in the first prediction mode is greater 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 smaller than that 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 encoding a 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 characteristic 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 type and the prediction mode 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 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 a 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;
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 irrelevant to the motion type of the LCU.
Optionally, in the case that the first motion type is determined based on a reference queue, after the encoding the i+1st frame image to the i+n-1 st frame image by using the first encoding mode, the method further includes:
clearing the reference queue, and adding the characteristic information from the ith frame image to the (i+N-1) th frame image to the reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
Optionally, after the 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 type and the prediction mode and the first motion type, the method further includes:
determining whether a proportion value of a common motion type in motion types of LCUs in H frame images comprising the ith frame image is smaller than a sixth value;
the 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 includes:
under the condition that the proportion value of the common motion type in the motion types of LCUs 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 modes and the first motion type;
Wherein the H frame images are continuous, and H is a positive integer.
Optionally, after determining whether the scale value of the common motion type of the LCU in the H frame images including the i-th frame image is smaller than the sixth value, the method further includes:
under the condition that the proportion value of the common motion type in the motion types of LCUs in the H frame images is larger than or equal to the sixth value, encoding the ith frame image to the (i+N-1) th frame image by adopting a first encoding mode;
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 irrelevant to the motion type of the LCU.
Optionally, in the case that the first motion type is determined based on a reference queue, after the encoding the i-th frame image to the i+n-1-th frame image by using the first encoding mode, the method further includes:
clearing the reference queue, and adding the characteristic information from the ith frame image to the (i+N-1) th frame image to the reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
Optionally, after the determining the first motion type of the target maximum coding unit LCU in the ith frame image, the method includes:
Determining the motion type of a fifth LCU of the (i+F+1) th frame image as the first motion type under the condition that the motion type of a fourth LCU of the F frame images after the (i) th 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, the pixel difference between the i+f+2 frame image and the i+f+1 frame image is smaller than a first value;
after the motion type of the fifth LCU of the i+f+1 frame image is determined as the first motion type, the method further includes:
obtaining P LCUs included in the i+F+1 frame image, wherein the P LCUs include R CUs, Q mutually different prediction modes exist in 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 proportion values corresponding to the Q prediction modes, wherein each second proportion value is a value of a quantity ratio R of the corresponding prediction modes;
determining a third motion type of a third LCU of the i+F+2 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 characteristic information of N frame images, and N is a positive integer;
And determining a fourth prediction mode of the third LCU according to the third motion type.
Optionally, determining the second motion type of the target LCU according to Q second scale values corresponding to the Q prediction modes includes:
judging whether a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is larger than a second 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 or not under the condition that the 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 ratio value corresponding to a sixth prediction mode in the Q second ratio values is smaller than a fifth value or not under the condition that the second ratio value corresponding to the fifth prediction mode in the Q second ratio values is smaller than or equal to the fourth value;
determining that the second motion type of the target LCU is a specific motion type removal 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;
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 the boundary LCU, and when the second scale value corresponding to the Skip prediction mode in the Q second scale values is smaller than or equal to the second value, determining whether the second scale value corresponding to the fifth prediction mode in the Q second scale values is greater than a fourth value includes:
judging whether a second proportion value corresponding to a Direct prediction mode in the Q second proportion values is larger than a third value or not under the condition that the 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 ratio value corresponding to a fifth prediction mode in the Q second ratio values is larger than a fourth value or not under the condition that the second ratio value corresponding to the Direct prediction mode in the Q second ratio values is larger than or equal to the third value;
wherein the third value is greater than the fifth value.
Optionally, the method further comprises:
determining that the second motion type of the target LCU is an indiscriminate static type under the condition that a second proportion value corresponding to a Skip prediction mode in the Q second proportion values is larger than the second value;
determining that the second motion type of the target LCU is a boundary motion type under the condition that a second proportion value corresponding to the Direct prediction mode in the Q second proportion values is larger than the third value;
Determining that the second motion type of the target LCU 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 that the second motion type of the target LCU is the common motion type under the condition that a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is larger 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, the related implementation principle may be referred to the description in the method embodiment corresponding to fig. 5, and will not be repeated herein.
The prediction mode determining method of the embodiment of the invention can comprise the following steps:
1. the history information queue is initialized.
And (3) a fast algorithm is not performed on the first 4 frames, a historical information queue is established, and frame numbers, frame types, QP values, original image pixels, the number of prediction modes of each CU under all LCUs and LCU mode judgment references are stored. Wherein the LCU mode decision reference defaults to a normal motion type if the fast algorithm is not enabled.
The history information queue can be understood as the reference queue, and the mode decision reference can be understood as the motion type.
2. Frame level pre-analysis.
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.
3. LCU level mode decision references.
If a fast algorithm can be enabled, for each LCU of the current frame, a co-located LCU of the same frame type and similar QP value in the statistics reference history queue, a mode decision reference for that LCU is determined (indifferent still type, boundary motion type, specific motion type, removal of specific motion type, general motion type, etc.).
Taking out the reference history queue parity LCU and counting the proportion of each mode, sequentially judging the following conditions, and jumping out of the following conditions if a certain type is judged:
1) If the skip mode occupies a large proportion, the LCU at the position is judged to be of an indiscriminate static type;
2) If the direct mode of the LCU at the boundary occupies a large proportion, the LCU at the position is judged to be of a boundary motion type;
3) If the sum of the modes (including one) is a large proportion, determining the LCU at the position as a specific motion type;
4) If one or more modes account for a small proportion, determining the LCU at the position as removing the specific motion type;
5) If none of the above conditions is satisfied, the LCU at that location is determined to be of the normal motion type.
The LCU level mode judgment reference can be understood as the first case.
4. A mode decision reference is used.
1) For LCUs that are determined to be of the indifferent stationary type, only Skip mode is used;
2) For LCU determined as boundary motion type, only 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 a specified pattern;
5) For the determination of the normal motion type, no fast algorithm is used.
For a CU in the LCU of the indifferent still type, the boundary motion type, or the specific motion type, if the specified prediction mode has poor effect, that is, the mode of the minimum Rate-Distortion cost (RD cost) is large, then other prediction modes are used for encoding.
5. Optimization of the mode decision reference.
For frames that enable the fast algorithm, if consecutive multiframes, the co-located LCU still maintains the same mode decision reference, it can be predicted that in the next image, the possibility of adopting the same mode decision reference is high, the above three are skipped directly, and the LCU of the subsequent frame is set as the mode decision reference.
At this time, after the LCU encoding of the next frame is completed, it is checked whether the proportion of each mode satisfies the mode decision reference, and for the LCU that does not conform, the above three are recovered.
The optimization of the mode judgment reference can understand the second case.
6. Historical information queue update
After each encoding of the current frame, whether or not a fast algorithm is enabled, frame information that enters the history information queue earliest (the history information queue is not initialized) is removed, and relevant information of the frame is put into the queue.
7. Test quick algorithm 1
Every 8 frames, for the frames which can start the quick algorithm (if the frames can not be started, the quick algorithm is checked after 1 frame), firstly, the LCU level mode judgment of the step 3 is carried out, the quick algorithm is not used for coding the frames, the coding result of the LCU is compared with the judgment result of the step 3, and if the accuracy is met, the quick algorithm is continuously maintained. If the accuracy does not reach the expectation, the historical information queue is emptied, the next 3-frame shutdown fast algorithm is encoded, and the historical information queue is initialized.
8. Check fast algorithm 2.
If the fast algorithm can be used, it is checked that a certain frame or a plurality of consecutive frames have a larger proportion of LCU decision references as the common motion type, the frame is not encoded by the fast algorithm, the history information queue is emptied, the next 3 frames are encoded by closing the fast algorithm, and the history information queue is initialized.
It should be noted that, the various optional implementations described in the embodiments of the present invention may be implemented in combination with each other without collision, or may be implemented separately, which is not limited to the embodiments of the present invention.
For ease of understanding, the following is illustrated in connection with fig. 7:
as shown in fig. 7, the prediction mode determining method according to the embodiment of the present invention may include the steps of:
step 701, obtaining a next frame.
Step 702, determining whether a fast algorithm can be enabled.
If yes, go to step 703; otherwise, step 713 is performed.
Step 703, determining LCU mode decision references in sequence.
Step 704, determining whether the test fast algorithm 1 needs to be enabled.
If not, step 705 is performed, if not, step 711 is performed.
Step 705, determining whether the test fast algorithm 2 passes.
If yes, step 706 is performed, otherwise 709 is performed.
Step 706, using the mode decision reference.
Step 707, optimizing a mode judgment reference.
Step 708, initialize or update the history information queue.
Step 709, encoding without using a fast algorithm.
Step 710, clearing the history information queue.
Step 711, no fast algorithm encoding is used.
Step 712, determining whether the test fast algorithm 1 passes.
If yes, go to step 708, otherwise go to step 710.
Step 713, encoding without using a fast algorithm.
Step 714, determine if there is a next frame.
If yes, go to step 701; otherwise, ending the flow.
The embodiment of the invention provides a quick LCU-level prediction mode judgment algorithm based on historical information, which is used for obtaining a mode judgment reference of an LCU based on the historical information in the encoding process and combining the relation between image content and a prediction mode, refining the mode judgment reference to the LCU level, realizing accurate prediction of a CU prediction mode under the LCU, greatly reducing the operation amount of a mode type, reducing the time complexity and simultaneously reducing the performance loss.
In practical application, the prediction mode determining method adopting the embodiment of the invention is tested:
test environment: CPU, AMD 2600x; operating system: linux ubuntu 18.04.
Test conditions: AVS3 test conditions, test configuration: LD, LDP.
The test results (Anchor are HPM 5.0) are shown in the following table:
table 1: test result 1
Table 2: test result 2
As can be seen from tables 1 and 2, the Y performance loss for the pass-through sequences was 1.18% and the coding complexity was 86% for the LD configuration at HPM 5.0. Under LDP configuration, the Y performance penalty is 0.63% for the pass-through sequences, with a coding complexity of 89%.
The prediction mode determining method of the embodiment of the invention provides a new optimization thought for prediction mode judgment, refines to LCU level, and effectively and quickly optimizes, thereby greatly reducing time complexity, and simultaneously ensuring coding performance by using history information with strong correlation and various verification methods. The embodiment of the invention also provides a prediction mode determining device capable of executing the method embodiment. Since the principle of solving the problem by the prediction mode determining device 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 the repetition is not repeated.
Referring to fig. 8, fig. 8 is one of block diagrams of a prediction mode determining apparatus provided in an embodiment of the present invention. As shown in fig. 8, the prediction mode determination device 800 may include:
a first determining module 801, configured to determine a first motion type of a target maximum coding unit LCU in an ith frame image, where i is an integer greater than 1;
a second determining module 802, 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.
Optionally, the first determining module 801 is specifically configured to:
determining a first motion type of a target maximum coding unit LCU in an ith frame image under the condition that the ith frame image meets a first condition;
wherein the i-th 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 type of a first LCU of a previous k frame image of the ith frame image is the same, the first LCU and the target LCU are co-located LCUs, k is a positive integer, and i is an integer larger than k.
Optionally, in a case where the i-th frame image satisfies a first condition and includes that a pixel difference between the i-th 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 according to a reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
Optionally, in the case that the feature information includes a prediction mode of each coding unit CU in the LCU of the frame image, the first determining module 801 includes:
a first determining submodule, 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 prediction modes different from each other exist in 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;
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 a value of a quantity ratio S of the corresponding prediction modes.
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 judging result;
wherein the first determination comprises at least one of:
judging whether a first scale value corresponding to a Skip prediction mode in the L first scale values is larger than a second value or not;
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 under the condition that the target LCU is a boundary LCU;
judging whether a first proportional value corresponding to a second predictive mode in the L first proportional values is larger than a fourth value or not, wherein the second predictive mode is a first partial predictive mode in the L predictive modes;
judging whether a first proportional value corresponding to a third predictive mode in the L first proportional values is smaller than a fifth value or not, wherein the third predictive mode is a second partial predictive mode in the L predictive 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:
a first determining subunit, configured to determine, when the first determination result meets a second condition, that the first motion type is a target motion type;
a second determining subunit, configured to determine that the first motion type is a common motion type if the first determination result does not meet the second condition;
wherein the first judging result meets a second condition includes at least one of the following:
a first scale value corresponding to a Skip prediction mode in the L first scale values is larger than the second scale value;
a first proportional value corresponding to a Direct prediction mode in the L first proportional values is larger than the third value;
a first ratio value corresponding to a second prediction mode in the L first ratio values is larger than the fourth value;
and a first proportional value corresponding to a third prediction mode in the L first proportional values is smaller than the fifth proportional value.
Optionally, the target motion type includes: indifferent still type, boundary motion type, specific motion type, and remove specific motion type;
The first determination submodule is used for at least one of the following:
determining that the first motion type is a non-differential static type under the condition that a first scale value corresponding to a Skip prediction mode in the L first scale values is larger than the second scale value;
determining that the first motion type is a boundary motion type under the condition that a first proportional value corresponding to a Direct prediction mode in the L first proportional values is larger than the third value;
determining that the first motion type is a specific motion type under the condition that a first ratio value corresponding to a second prediction mode in the L first ratio values is larger than the fourth value;
and determining the first motion type to be the specific motion type removed under the condition that a first scale value corresponding to a third prediction mode in the L first scale values is smaller than the fifth value.
Optionally, in a case that the i-th frame image meets a first condition, and a motion type of a first LCU of a previous k-frame image including the i-th frame image is the same, the first determining module 801 is specifically configured to:
and determining the motion type of the first LCU as the first motion type.
Optionally, the pixel difference between the i+1st frame image and the i frame image is smaller than a first value;
The prediction mode determining module 801 further includes:
the first obtaining module is used for obtaining P LCUs included in the ith frame image after determining a first prediction mode of the target LCU, wherein the P LCUs include R CUs, Q prediction modes which are different from each other 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;
a fifth determining module, configured to determine a second motion type of the target LCU according to Q second scale values corresponding to the Q prediction modes, where each second scale value is a value of a number ratio R of the corresponding prediction modes;
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;
and a seventh determining module, configured to determine a fourth prediction mode of the third LCU according to the third motion type.
Optionally, the fifth determining module includes:
The second execution sub-module is used for executing second judgment to obtain a second judgment result;
the second determining submodule is used for determining the second motion type according to the second judging result;
wherein the second determination comprises at least one of:
judging whether a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is larger than a second value or not;
judging whether a second proportion value corresponding to a Direct prediction mode in the Q second proportion values is larger than a third value or not under the condition that the target LCU is a boundary LCU;
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 partial 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 of prediction modes 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 if the second determination result meets a third condition;
a third determining 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 judging result meets a third condition including at least one of the following:
the second ratio value corresponding to the Skip prediction mode in the Q second ratio values is larger than the second value;
the second ratio value corresponding to the Direct prediction mode in the Q second ratio values is larger than the third value;
a second ratio value corresponding to a fifth prediction mode in the Q second ratio values is larger than the fourth value;
and a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is smaller than the fifth proportion value.
Optionally, the target motion type includes: indifferent still type, boundary motion type, specific motion type, and remove specific motion type;
the third determining unit is configured to at least one of:
determining that the first motion type is an indiscriminate static type under the condition that a second proportion value corresponding to a 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 when 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 to be the specific motion type removed 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 device 800 further includes:
the first coding module is used for coding the ith frame image by adopting a first coding mode after 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, so as to obtain a first coding result;
the second acquisition module is used for acquiring a first prediction mode set corresponding to the ith frame image according to the first coding result;
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 configured to determine whether the second prediction mode set matches the first prediction mode set;
the second coding module is used for coding the (i+1) -th frame image to the (i+N-1) -th frame image by adopting the first coding mode under the condition that the second prediction mode set is not matched with the first prediction mode set;
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 irrelevant to the motion type of the LCU.
Optionally, in the case that the first motion type is determined based on a reference queue, the prediction mode determining device 800 further includes:
a first updating module, configured to empty the reference queue after encoding the i+1st frame image to the i+n-1 st frame image by using the first encoding manner, and add feature information of the i frame image to the i+n-1 st frame image to the reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
Optionally, the prediction mode determining device 800 further includes:
an eighth determining module, configured to determine, after the determining the first prediction mode of the target LCU, whether a ratio value of a common motion type in motion types of LCUs in H frame images including the i-th frame image is smaller than a sixth value, according to a correspondence between motion types and prediction modes and the first motion type, before determining the first prediction mode of the target LCU;
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 LCUs 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 modes and the first motion type;
wherein the H frame images are continuous, and H is a positive integer.
Optionally, the prediction mode determining device 800 further includes:
a third encoding module, configured to encode, after determining whether a ratio value of a normal motion type of an LCU in H frame images including the i frame image is smaller than a sixth value, the i frame image to the i+n-1 frame image by using a first encoding mode when the ratio value of the normal motion type of the LCU in the H frame images is greater than or equal to the sixth value;
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 irrelevant to the motion type of the LCU.
Optionally, in the case that the first motion type is determined based on a reference queue, the prediction mode determining device 800 further includes:
The second updating module is used for clearing the reference queue after the ith frame image to the (i+N-1) th frame image are encoded by adopting a first encoding mode, and adding the characteristic information of the ith frame image to the (i+N-1) th frame image into the reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
Optionally, the prediction mode determining apparatus 800 includes:
and the fourth coding module is used for coding 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 corresponding relation between the motion type and the prediction mode and the first motion type.
Optionally, the fourth encoding module includes:
a third determining submodule, configured to determine whether an encoding cost of the target CU in the first prediction mode is less than a seventh value;
and the first coding submodule is used for coding the target CU by adopting the first prediction mode under the condition that the coding cost of the target CU is smaller than the seventh value in the first prediction mode.
Optionally, the prediction mode determining device 800 further includes:
A second sub-module, configured to encode, after determining whether the encoding cost of the target CU in the first prediction mode is less than a seventh value, the target CU in the first prediction mode by using a seventh prediction mode if the encoding 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 smaller than that 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 prediction mode determining device 800 further includes:
a third updating module, configured to delete feature information of a 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 feature information of the i-th 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 satisfies a preset condition.
Optionally, the correspondence satisfies at least one of the following:
the indifferent static type has a corresponding relation with Skip prediction modes;
The boundary motion type has a corresponding relation with the Direct prediction mode;
the specific motion type has a corresponding relation with a second prediction mode, wherein the second prediction mode is a first part of prediction modes in L prediction modes;
removing the correspondence between the specific motion type and the prediction modes except for a third prediction mode, wherein the third prediction mode is a second part of prediction modes in L prediction modes;
the common motion type has a corresponding relation with all the prediction modes;
wherein the L prediction modes are related to the target LCU, and L is a positive integer.
In the embodiment of the invention, the prediction mode of the LCU can be determined by 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 further improved.
Referring to fig. 9, fig. 9 is one of block diagrams of a prediction mode determining apparatus provided in an embodiment of the present invention. As shown in fig. 9, the prediction mode determination apparatus 900 includes:
a third determining module 901, configured to determine, when a pixel difference between an i-th frame image and an i-1-th frame image is smaller than a first value, a first motion type of a target maximum coding unit LCU in the i-th frame image, where i is an integer greater than 1;
A fourth determining module 902, 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.
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, where the feature information includes prediction modes of CU of each coding unit in LCU of a frame image, and N is a positive integer;
a fifth determining submodule, 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 prediction modes different from each other exist in 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;
and the sixth 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 a value of a quantity ratio S of the corresponding prediction modes.
Optionally, the sixth determining submodule is specifically configured to:
judging whether a first scale value corresponding to a Skip prediction mode in the L first scale values is larger than a second value or not;
If the first scale value corresponding to the Skip prediction mode in the L first scale values is smaller than or equal to the second value, judging whether the first scale value corresponding to the second prediction mode in the L first scale values is larger than a fourth value;
judging whether a first scale value corresponding to a third prediction mode in the L first scale values is smaller than a fifth value or not under the condition that the first scale value corresponding to the second prediction mode in the L first scale values is smaller than or equal to the fourth value;
determining that the first motion type is a specific motion type removal under the condition that a first scale value corresponding to a third prediction mode in the L first scale 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 the case that the target LCU is a boundary LCU, the sixth determining submodule is specifically configured to:
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 under the condition that the first proportional value corresponding to a second prediction mode in the L first proportional values is smaller than or equal to the fourth value;
Judging whether a first proportional value corresponding to a second predictive mode in the L first proportional values is larger than a fourth value or not under the condition that the first proportional value corresponding to the Direct predictive mode in the L first proportional values is smaller than or equal to the third value;
wherein the third value is greater than the fifth value.
Optionally, the prediction mode determining apparatus 900 further includes:
a ninth determining module, configured to:
determining that the first motion type is a non-differential static type under the condition that a first scale value corresponding to a Skip prediction mode in the L first scale values is larger than the second scale value;
determining that the first motion type is a boundary motion type under the condition that a first proportional value corresponding to a Direct prediction mode in the L first proportional values is larger than the third value;
determining that the first motion type is a specific motion type under the condition that a first ratio value corresponding to a second prediction mode in the L first ratio values is larger than the fourth value;
and determining that the first motion type is a common motion type when a first scale value corresponding to a third prediction mode in the L first scale values is greater than or equal to the fifth value.
Optionally, the correspondence satisfies at least one of the following:
the indifferent static type has a corresponding relation with Skip prediction modes;
the boundary motion type has a corresponding relation with the Direct prediction mode;
the specific motion type has a corresponding relation with a second prediction mode, wherein the second prediction mode is a first part of prediction modes in L prediction modes;
removing the correspondence between the specific motion type and the prediction modes except for a third prediction mode, wherein the third prediction mode is a second part of prediction modes in L prediction modes;
the common motion type has a corresponding relation with all the prediction modes;
wherein the L prediction modes are related to the target LCU, and L is a positive integer.
Optionally, the prediction mode determining apparatus 900 further includes:
and a fifth coding module, configured to determine 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, and then code the target CU in the target LCU according to the first prediction mode.
Optionally, the fifth encoding module includes:
a seventh determining submodule, configured to determine whether an encoding cost of the target CU in the first prediction mode is less than a seventh value;
And a third coding sub-module, configured to code the target CU using the first prediction mode if the coding cost of the target CU in the first prediction mode is less than the seventh value.
Optionally, the prediction mode determining apparatus 900 further includes:
a sixth encoding module, configured to encode, after determining whether the encoding cost of the target CU in the first prediction mode is less than a seventh value, the target CU in the first prediction mode by using a seventh prediction mode if the encoding 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 smaller than that 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 prediction mode determining device 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 encoding the target CU in the target LCU according to the first prediction mode;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
Optionally, the prediction mode determining apparatus 900 further includes:
a seventh coding module, configured to determine a first prediction mode of the target LCU according to the correspondence between the motion type and the prediction mode and the first motion type, and then code the ith frame image by using a first coding manner to obtain a first coding result;
a fourth obtaining module, configured to obtain a first prediction mode set corresponding to the ith frame image according to the first coding result;
a fifth 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 tenth determining module configured to determine whether the second prediction mode set matches the first prediction mode set;
an eighth encoding module, configured to encode the i+1st frame image to the i+n-1 st frame image by using the first encoding mode when the second prediction mode set is not matched with the first prediction mode set;
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 irrelevant to the motion type of the LCU.
Optionally, the prediction mode determining apparatus 900 further includes:
a fifth updating module, configured to, in a case where the first motion type is determined based on a reference queue, empty the reference queue after encoding the i+1st frame image to the i+n-1 st frame image by using the first encoding manner, and add feature information of the i+n-1 st frame image to the reference queue;
the reference queue comprises characteristic 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 the first prediction mode of the target LCU, whether a ratio value of a common motion type in motion types of LCUs in H frame images including the ith frame image is smaller than a sixth value, before determining the first prediction mode of the target LCU according to a correspondence between motion types and prediction modes and the first motion type;
the fourth determining module 902902 specifically includes:
under the condition that the proportion value of the common motion type in the motion types of LCUs 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 modes 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 encode, after determining whether a ratio value of a normal motion type of an LCU in H frame images including the i frame image is smaller than a sixth value, the i frame image to the i+n-1 frame image by using a first encoding mode when the ratio value of the normal motion type of the LCU in the H frame images is greater than or equal to the sixth value;
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 irrelevant to 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 encoding the i-th frame image to the i+n-1-th frame image by using a first encoding manner, and add feature information of the i-th frame image to the i+n-1-th frame image to the reference queue;
the reference queue comprises characteristic 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 determine, after the determining the first motion type of the LCU of the target maximum coding unit in the ith frame image, a motion type of a fifth LCU of the i+f+1 frame image as the first motion type if a motion type of a fourth LCU of the F frame images after 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, the 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 obtain P LCUs included in the i+f+1 frame image after determining the motion type of the fifth LCU of the i+f+1 frame image as the first motion type, where the P LCUs include R CUs, Q prediction modes different from each other exist in R prediction modes of the R CUs, Q is a positive integer less 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 scale values corresponding to the Q prediction modes, where each second scale value is a value of a number ratio R of the corresponding prediction modes;
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 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;
and a fifteenth determining module, configured to determine a fourth prediction mode of the third LCU according to the third motion type.
Optionally, the thirteenth determining module is specifically configured to:
judging whether a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is larger than a second 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 or not under the condition that the 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 ratio value corresponding to a sixth prediction mode in the Q second ratio values is smaller than a fifth value or not under the condition that the second ratio value corresponding to the fifth prediction mode in the Q second ratio values is smaller than or equal to the fourth value;
determining that the second motion type of the target LCU is a specific motion type removal 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;
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, the thirteenth determining module is specifically configured to:
judging whether a second proportion value corresponding to a Direct prediction mode in the Q second proportion values is larger than a third value or not under the condition that the 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 ratio value corresponding to a fifth prediction mode in the Q second ratio values is larger than a fourth value or not under the condition that the second ratio value corresponding to the Direct prediction mode in the Q second ratio values is larger than or equal to the third value;
wherein the third value is greater than the fifth value.
Optionally, the prediction mode determining apparatus 900 further includes:
a fourteenth determination module for:
Determining that the second motion type of the target LCU is an indiscriminate static type under the condition that a second proportion value corresponding to a Skip prediction mode in the Q second proportion values is larger than the second value;
determining that the second motion type of the target LCU is a boundary motion type under the condition that a second proportion value corresponding to the Direct prediction mode in the Q second proportion values is larger than the third value;
determining that the second motion type of the target LCU 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 that the second motion type of the target LCU is the common motion type under the condition that a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is larger than or equal to the fifth value.
In the embodiment of the invention, the prediction mode of the LCU can be determined by 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 further improved.
Referring to fig. 10, fig. 10 is a second block diagram of a prediction mode determination apparatus provided in an embodiment of the present invention. As shown in fig. 10, the prediction mode determination apparatus 1000 may include:
A transceiver 1003 for receiving and transmitting data under control of process 1001.
Wherein in fig. 10, a bus architecture may comprise any number of interconnected buses and bridges, and in particular one or more processors represented by the processor 1001 and various circuits of memory represented by the memory 1002, linked together. The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, power management circuits, etc., which are well known in the art and, therefore, will not be described further herein. The bus interface provides an interface. The transceiver 1003 may be several elements, i.e. include 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 is configured to read a program in the memory 1002, and perform the following procedures:
Determining a first motion type of a target maximum 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 perform the following steps:
determining a first motion type of a target maximum coding unit LCU in an ith frame image under the condition that the ith frame image meets a first condition;
wherein the i-th 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 type of a first LCU of a previous k frame image of the ith frame image is the same, the first LCU and the target LCU are co-located LCUs, k is a positive integer, and i is an integer larger than k.
Optionally, in a case that the i-th frame image satisfies the first condition and includes that a pixel difference between the i-th 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 according to a reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
Optionally, in case 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, perform the following steps:
according to the target LCU, determining M second LCUs in the reference queue, 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 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 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 modes.
Optionally, the processor 1001 is further configured to read the computer program, and perform the following steps:
executing the first judgment to obtain a first judgment result;
determining the first motion type according to the first judging result;
wherein the first determination comprises at least one of:
judging whether a first scale value corresponding to a Skip prediction mode in the L first scale values is larger than a second value or not;
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 under the condition that the target LCU is a boundary LCU;
Judging whether a first proportional value corresponding to a second predictive mode in the L first proportional values is larger than a fourth value or not, wherein the second predictive mode is a first partial predictive mode in the L predictive modes;
judging whether a first proportional value corresponding to a third predictive mode in the L first proportional values is smaller than a fifth value or not, wherein the third predictive mode is a second partial predictive mode in the L predictive 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 perform at least one of the following:
under the condition that the first judging result meets a second condition, determining the first motion type as a target motion type;
under the condition that the first judging result does not meet the second condition, determining that the first motion type is a common motion type;
wherein the first judging result meets a second condition includes at least one of the following:
a first scale value corresponding to a Skip prediction mode in the L first scale values is larger than the second scale value;
a first proportional value corresponding to a Direct prediction mode in the L first proportional values is larger than the third value;
A first ratio value corresponding to a second prediction mode in the L first ratio values is larger than the fourth value;
and a first proportional value corresponding to a third prediction mode in the L first proportional values is smaller than the fifth proportional value.
Optionally, the target motion type includes: indifferent still type, boundary motion type, specific motion type, and remove specific motion type;
the processor 1001 is further configured to read the computer program, and perform at least one of:
determining that the first motion type is a non-differential static type under the condition that a first scale value corresponding to a Skip prediction mode in the L first scale values is larger than the second scale value;
determining that the first motion type is a boundary motion type under the condition that a first proportional value corresponding to a Direct prediction mode in the L first proportional values is larger than the third value;
determining that the first motion type is a specific motion type under the condition that a first ratio value corresponding to a second prediction mode in the L first ratio values is larger than the fourth value;
and determining the first motion type to be the specific motion type removed under the condition that a first scale value corresponding to a third prediction mode in the L first scale values is smaller than the fifth value.
Optionally, in case that the i-th frame image satisfies the first condition that the motion type of the first LCU of the previous k-frame image including the i-th frame image is the same, the processor 1001 is further configured to read the computer program, perform the following steps:
and determining the motion type of the first LCU as the first motion type.
Optionally, the pixel difference between the i+1st frame image and the i frame image is smaller than a first value;
after the determining the first prediction mode of the target LCU, the method further comprises:
obtaining P LCUs included in the ith frame image, wherein the P LCUs comprise R CUs, Q mutually different prediction modes exist in 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 proportion values corresponding to the Q prediction modes, wherein each second proportion value is a value of a quantity 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 characteristic information of N frame images, and N is a positive integer;
And determining a fourth prediction mode of the third LCU according to the third motion type.
Optionally, the processor 1001 is further configured to read the computer program, and perform the following steps:
executing the second judgment to obtain a second judgment result;
determining the second motion type according to the second judging result;
wherein the second determination comprises at least one of:
judging whether a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is larger than a second value or not;
judging whether a second proportion value corresponding to a Direct prediction mode in the Q second proportion values is larger than a third value or not under the condition that the target LCU is a boundary LCU;
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 partial 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 of prediction modes 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 perform at least one of the following:
under the condition that the second judging result meets a third condition, determining the first motion type as a target motion type;
under the condition that the second judging result does not meet the third condition, determining that the first motion type is a common motion type;
wherein the second judging result meets a third condition including at least one of the following:
the second ratio value corresponding to the Skip prediction mode in the Q second ratio values is larger than the second value;
the second ratio value corresponding to the Direct prediction mode in the Q second ratio values is larger than the third value;
a second ratio value corresponding to a fifth prediction mode in the Q second ratio values is larger than the fourth value;
and a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is smaller than the fifth proportion value.
Optionally, the target motion type includes: indifferent still type, boundary motion type, specific motion type, and remove specific motion type;
the processor 1001 is further configured to read the computer program, and perform at least one of:
determining that the first motion type is an indiscriminate static type under the condition that a second proportion value corresponding to a 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 when 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 to be the specific motion type removed 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 perform 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 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 a 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;
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 irrelevant to the motion type of the LCU.
Optionally, in case the first motion type is determined based on a reference queue, the processor 1001 is further configured to read the computer program, perform the following steps:
clearing the reference queue, and adding the characteristic information from the ith frame image to the (i+N-1) th frame image to the reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
Optionally, the processor 1001 is further configured to read the computer program, and perform the following steps:
determining whether a proportion value of a common motion type in motion types of LCUs in H frame images comprising the ith frame image is smaller than a sixth value;
the 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 includes:
Under the condition that the proportion value of the common motion type in the motion types of LCUs 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 modes 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 perform the following steps:
under the condition that the proportion value of the common motion type in the motion types of LCUs in the H frame images is larger than or equal to the sixth value, encoding the ith frame image to the (i+N-1) th frame image by adopting a first encoding mode;
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 irrelevant to the motion type of the LCU.
Optionally, in case the first motion type is determined based on a reference queue, the processor 1001 is further configured to read the computer program, perform the following steps:
clearing the reference queue, and adding the characteristic information from the ith frame image to the (i+N-1) th frame image to the reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
Optionally, the processor 1001 is further configured to read the computer program, and perform the following steps:
and according to the first prediction mode, encoding a target CU in the target LCU.
Optionally, the encoding the target CU in the target LCU according to the first prediction mode includes:
determining whether the coding cost of the target CU in the first prediction mode is smaller than a seventh value;
and under the condition that the coding cost of the target CU in the first prediction mode is smaller than the seventh value, the target CU is coded by adopting the first prediction mode.
Optionally, the processor 1001 is further configured to read the computer program, and perform the following steps:
under the condition that the coding cost of the target CU in the first prediction mode is greater 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 smaller than that of the target CU for coding by adopting other prediction modes.
Optionally, in case the first motion type is determined based on a reference queue, the processor 1001 is further configured to read the computer program, perform 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 satisfies a preset condition.
Optionally, the correspondence satisfies at least one of the following:
the indifferent static type has a corresponding relation with Skip prediction modes;
the boundary motion type has a corresponding relation with the Direct prediction mode;
the specific motion type has a corresponding relation with a second prediction mode, wherein the second prediction mode is a first part of prediction modes in L prediction modes;
removing the correspondence between the specific motion type and the prediction modes except for a third prediction mode, wherein the third prediction mode is a second part of prediction modes in L prediction modes;
the common motion type has a corresponding relation with all the prediction modes;
wherein the L prediction modes are related to the target LCU, and L is a positive integer.
For this embodiment, the prediction mode determining device provided by the embodiment of the present invention may execute the method embodiment corresponding to fig. 5, where the implementation principle and the technical effect are similar, and this embodiment is not repeated herein.
In another embodiment, the processor 1001 is configured to read a program in the memory 1002, and perform the following procedures:
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;
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 perform the following steps:
acquiring a reference queue, wherein the reference queue comprises characteristic information of N frame images, the characteristic information comprises prediction modes of all coding units CU in LCUs of the frame images, and N is a positive integer;
according to the target LCU, determining M second LCUs in the reference queue, 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 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 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 modes.
Optionally, the processor 1001 is further configured to read the computer program, and perform the following steps:
judging whether a first scale value corresponding to a Skip prediction mode in the L first scale values is larger than a second value or not;
if the first scale value corresponding to the Skip prediction mode in the L first scale values is smaller than or equal to the second value, judging whether the first scale value corresponding to the second prediction mode in the L first scale values is larger than a fourth value;
judging whether a first scale value corresponding to a third prediction mode in the L first scale values is smaller than a fifth value or not under the condition that the first scale value corresponding to the second prediction mode in the L first scale values is smaller than or equal to the fourth value;
determining that the first motion type is a specific motion type removal under the condition that a first scale value corresponding to a third prediction mode in the L first scale 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 the boundary LCU, and when the first scale value corresponding to the second prediction mode in the L first scale values is smaller than or equal to the fourth value, the processor 1001 is further configured to read the computer program, and perform the following steps:
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 under the condition that the first proportional value corresponding to a second prediction mode in the L first proportional values is smaller than or equal to the fourth value;
judging whether a first proportional value corresponding to a second predictive mode in the L first proportional values is larger than a fourth value or not under the condition that the first proportional value corresponding to the Direct predictive mode in the L first proportional values is smaller than or equal to the third value;
wherein the third value is greater than the fifth value.
Optionally, the processor 1001 is further configured to read the computer program, and perform the following steps:
determining that the first motion type is a non-differential static type under the condition that a first scale value corresponding to a Skip prediction mode in the L first scale values is larger than the second scale value;
determining that the first motion type is a boundary motion type under the condition that a first proportional value corresponding to a Direct prediction mode in the L first proportional values is larger than the third value;
Determining that the first motion type is a specific motion type under the condition that a first ratio value corresponding to a second prediction mode in the L first ratio values is larger than the fourth value;
and determining that the first motion type is a common motion type when a first scale value corresponding to a third prediction mode in the L first scale values is greater than or equal to the fifth value.
Optionally, the correspondence satisfies at least one of the following:
the indifferent static type has a corresponding relation with Skip prediction modes;
the boundary motion type has a corresponding relation with the Direct prediction mode;
the specific motion type has a corresponding relation with a second prediction mode, wherein the second prediction mode is a first part of prediction modes in L prediction modes;
removing the correspondence between the specific motion type and the prediction modes except for a third prediction mode, wherein the third prediction mode is a second part of prediction modes in L prediction modes;
the common motion type has a corresponding relation with all the prediction modes;
wherein the L prediction modes are related to the target LCU, and L is a positive integer.
Optionally, the processor 1001 is further configured to read the computer program, and perform the following steps:
And according to the first prediction mode, encoding a target CU in the target LCU.
Optionally, the encoding the target CU in the target LCU according to the first prediction mode includes:
determining whether the coding cost of the target CU in the first prediction mode is smaller than a seventh value;
and under the condition that the coding cost of the target CU in the first prediction mode is smaller than the seventh value, the target CU is coded by adopting the first prediction mode.
Optionally, the processor 1001 is further configured to read the computer program, and perform the following steps:
under the condition that the coding cost of the target CU in the first prediction mode is greater 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 smaller than that of the target CU for coding by adopting other prediction modes.
Optionally, the processor 1001 is further configured to read the computer program, and perform 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 characteristic information of N frame images, wherein N is a positive integer.
Optionally, the processor 1001 is further configured to read the computer program, and perform 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 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 a 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;
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 irrelevant to the motion type of the LCU.
Optionally, the processor 1001 is further configured to read the computer program, and perform the following steps:
clearing the reference queue, and adding the characteristic information from the ith frame image to the (i+N-1) th frame image to the reference queue;
The reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
Optionally, the processor 1001 is further configured to read the computer program, and perform the following steps:
determining whether a proportion value of a common motion type in motion types of LCUs in H frame images comprising the ith frame image is smaller than a sixth value;
under the condition that the proportion value of the common motion type in the motion types of LCUs 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 modes 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 perform the following steps:
under the condition that the proportion value of the common motion type in the motion types of LCUs in the H frame images is larger than or equal to the sixth value, encoding the ith frame image to the (i+N-1) th frame image by adopting a first encoding mode;
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 irrelevant to the motion type of the LCU.
Optionally, in case the first motion type is determined based on a reference queue, the processor 1001 is further configured to read the computer program, perform the following steps:
clearing the reference queue, and adding the characteristic information from the ith frame image to the (i+N-1) th frame image to the reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
Optionally, the processor 1001 is further configured to read the computer program, and perform the following steps:
determining the motion type of a fifth LCU of the (i+F+1) th frame image as the first motion type under the condition that the motion type of a fourth LCU of the F frame images after the (i) th 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, the 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 perform the following steps:
obtaining P LCUs included in the i+F+1 frame image, wherein the P LCUs include R CUs, Q mutually different prediction modes exist in 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 proportion values corresponding to the Q prediction modes, wherein each second proportion value is a value of a quantity ratio R of the corresponding prediction modes;
determining a third motion type of a third LCU of the i+F+2 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 characteristic information of N frame images, and N is a positive integer;
and determining a fourth prediction mode of the third LCU according to the third motion type.
Optionally, the processor 1001 is further configured to read the computer program, and perform the following steps:
judging whether a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is larger than a second 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 or not under the condition that the 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 ratio value corresponding to a sixth prediction mode in the Q second ratio values is smaller than a fifth value or not under the condition that the second ratio value corresponding to the fifth prediction mode in the Q second ratio values is smaller than or equal to the fourth value;
Determining that the second motion type of the target LCU is a specific motion type removal 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;
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 the boundary LCU, and the second scale value corresponding to the Skip prediction mode in the Q second scale values is smaller than or equal to the second value, the processor 1001 is further configured to read the computer program, and perform the following steps:
judging whether a second proportion value corresponding to a Direct prediction mode in the Q second proportion values is larger than a third value or not under the condition that the 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 ratio value corresponding to a fifth prediction mode in the Q second ratio values is larger than a fourth value or not under the condition that the second ratio value corresponding to the Direct prediction mode in the Q second ratio values is larger than or equal to the third value;
Wherein the third value is greater than the fifth value.
Optionally, the processor 1001 is further configured to read the computer program, and perform the following steps:
determining that the second motion type of the target LCU is an indiscriminate static type under the condition that a second proportion value corresponding to a Skip prediction mode in the Q second proportion values is larger than the second value;
determining that the second motion type of the target LCU is a boundary motion type under the condition that a second proportion value corresponding to the Direct prediction mode in the Q second proportion values is larger than the third value;
determining that the second motion type of the target LCU 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 that the second motion type of the target LCU is the common motion type under the condition that a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is larger than or equal to the fifth value.
For this embodiment, the prediction mode determining device provided by the embodiment of the present invention may execute the method embodiment corresponding to fig. 6, where the implementation principle and the technical effect are similar, and this embodiment is not repeated here.
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 maximum 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 the first motion type of the target maximum coding unit LCU in the ith frame image includes:
determining a first motion type of a target maximum coding unit LCU in an ith frame image under the condition that the ith frame image meets a first condition;
wherein the i-th 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 type of a first LCU of a previous k frame image of the ith frame image is the same, the first LCU and the target LCU are co-located LCUs, k is a positive integer, and i is an integer larger than k.
Optionally, in a case that the i-th frame image meets the first condition and includes that a pixel difference between the i-th frame image and the i-1-th frame image is smaller than a first value, the determining the first motion type of the target maximum coding unit LCU in the i-th frame image includes:
Determining the first motion type according to a reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
Optionally, in the case that the feature information includes a prediction mode of each coding unit CU in the LCU of the frame image, the determining the first motion type according to the reference queue includes:
according to the target LCU, determining M second LCUs in the reference queue, 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 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 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 modes.
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 judging result;
wherein the first determination comprises at least one of:
Judging whether a first scale value corresponding to a Skip prediction mode in the L first scale values is larger than a second value or not;
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 under the condition that the target LCU is a boundary LCU;
judging whether a first proportional value corresponding to a second predictive mode in the L first proportional values is larger than a fourth value or not, wherein the second predictive mode is a first partial predictive mode in the L predictive modes;
judging whether a first proportional value corresponding to a third predictive mode in the L first proportional values is smaller than a fifth value or not, wherein the third predictive mode is a second partial predictive mode in the L predictive 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:
under the condition that the first judging result meets a second condition, determining the first motion type as a target motion type;
under the condition that the first judging result does not meet the second condition, determining that the first motion type is a common motion type;
Wherein the first judging result meets a second condition includes at least one of the following:
a first scale value corresponding to a Skip prediction mode in the L first scale values is larger than the second scale value;
a first proportional value corresponding to a Direct prediction mode in the L first proportional values is larger than the third value;
a first ratio value corresponding to a second prediction mode in the L first ratio values is larger than the fourth value;
and a first proportional value corresponding to a third prediction mode in the L first proportional values is smaller than the fifth proportional value.
Optionally, the target motion type includes: indifferent still type, boundary motion type, specific motion type, and remove specific motion type;
and under the condition that the first judging result meets a second condition, determining that the first motion type is a target motion type, wherein the method comprises at least one of the following steps:
determining that the first motion type is a non-differential static type under the condition that a first scale value corresponding to a Skip prediction mode in the L first scale values is larger than the second scale value;
determining that the first motion type is a boundary motion type under the condition that a first proportional value corresponding to a Direct prediction mode in the L first proportional values is larger than the third value;
Determining that the first motion type is a specific motion type under the condition that a first ratio value corresponding to a second prediction mode in the L first ratio values is larger than the fourth value;
and determining the first motion type to be the specific motion type removed under the condition that a first scale value corresponding to a third prediction mode in the L first scale values is smaller than the fifth value.
Optionally, in a case that the i-th frame image meets a first condition and includes that a motion type of a first LCU of a previous k-frame image of the i-th frame image is the same, the determining the first motion type of the target maximum coding unit LCU in the i-th frame image includes:
and determining the motion type of the first LCU as the first motion type.
Optionally, the pixel difference between the i+1st frame image and the i frame image is smaller than a first value;
after the determining the first prediction mode of the target LCU, the method further comprises:
obtaining P LCUs included in the ith frame image, wherein the P LCUs comprise R CUs, Q mutually different prediction modes exist in 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 proportion values corresponding to the Q prediction modes, wherein each second proportion value is a value of a quantity 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 characteristic information of N frame images, and N is a positive integer;
and determining a fourth prediction mode of the third LCU according to the third motion type.
Optionally, the determining, according to the Q second scale values corresponding to the Q prediction modes, the second motion type of the target LCU includes:
executing the second judgment to obtain a second judgment result;
determining the second motion type according to the second judging result;
wherein the second determination comprises at least one of:
judging whether a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is larger than a second value or not;
judging whether a second proportion value corresponding to a Direct prediction mode in the Q second proportion values is larger than a third value or not under the condition that the target LCU is a boundary LCU;
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 partial 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 of prediction modes 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:
under the condition that the second judging result meets a third condition, determining the first motion type as a target motion type;
under the condition that the second judging result does not meet the third condition, determining that the first motion type is a common motion type;
wherein the second judging result meets a third condition including at least one of the following:
the second ratio value corresponding to the Skip prediction mode in the Q second ratio values is larger than the second value;
the second ratio value corresponding to the Direct prediction mode in the Q second ratio values is larger than the third value;
A second ratio value corresponding to a fifth prediction mode in the Q second ratio values is larger than the fourth value;
and a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is smaller than the fifth proportion value.
Optionally, the target motion type includes: indifferent still type, boundary motion type, specific motion type, and remove specific motion type;
and under the condition that the second judging result meets a third condition, determining that the first motion type is a target motion type, wherein the method comprises at least one of the following steps:
determining that the first motion type is an indiscriminate static type under the condition that a second proportion value corresponding to a 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 when 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 to be the specific motion type removed 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 type and the prediction mode 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 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 a 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;
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 irrelevant to the motion type of the LCU.
Optionally, in the case that the first motion type is determined based on a reference queue, after the encoding the i+1st frame image to the i+n-1 st frame image by using the first encoding mode, the method further includes:
Clearing the reference queue, and adding the characteristic information from the ith frame image to the (i+N-1) th frame image to the reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
Optionally, after the 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 type and the prediction mode and the first motion type, the method further includes:
determining whether a proportion value of a common motion type in motion types of LCUs in H frame images comprising the ith frame image is smaller than a sixth value;
the 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 includes:
under the condition that the proportion value of the common motion type in the motion types of LCUs 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 modes and the first motion type;
wherein the H frame images are continuous, and H is a positive integer.
Optionally, after determining whether the scale value of the common motion type of the LCU in the H frame images including the i-th frame image is smaller than the sixth value, the method further includes:
Under the condition that the proportion value of the common motion type in the motion types of LCUs in the H frame images is larger than or equal to the sixth value, encoding the ith frame image to the (i+N-1) th frame image by adopting a first encoding mode;
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 irrelevant to the motion type of the LCU.
Optionally, in the case that the first motion type is determined based on a reference queue, after the encoding the i-th frame image to the i+n-1-th frame image by using the first encoding mode, the method further includes:
clearing the reference queue, and adding the characteristic information from the ith frame image to the (i+N-1) th frame image to the reference queue;
the reference queue comprises characteristic 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 type and the prediction mode and the first motion type, the method includes:
and according to the first prediction mode, encoding a target CU in the target LCU.
Optionally, the encoding the target CU in the target LCU according to the first prediction mode includes:
Determining whether the coding cost of the target CU in the first prediction mode is smaller than a seventh value;
and under the condition that the coding cost of the target CU in the first prediction mode is smaller than the seventh value, the target CU is coded by adopting the first prediction mode.
Optionally, after determining whether the coding cost of the target CU in the first prediction mode is less than a seventh value, the method further includes:
under the condition that the coding cost of the target CU in the first prediction mode is greater 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 smaller than that 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 encoding a 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 satisfies a preset condition.
Optionally, the correspondence satisfies at least one of the following:
the indifferent static type has a corresponding relation with Skip prediction modes;
the boundary motion type has a corresponding relation with the Direct prediction mode;
the specific motion type has a corresponding relation with a second prediction mode, wherein the second prediction mode is a first part of prediction modes in L prediction modes;
removing the correspondence between the specific motion type and the prediction modes except for a third prediction mode, wherein the third prediction mode is a second part of prediction modes in L prediction modes;
the common motion type has a corresponding relation with all the prediction modes;
wherein the L prediction modes are related to the target LCU, and L is a positive integer.
In a second embodiment, the computer program is executable by a processor to perform the steps of:
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;
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 the first motion type of the target maximum coding unit LCU in the ith frame image includes:
Acquiring a reference queue, wherein the reference queue comprises characteristic information of N frame images, the characteristic information comprises prediction modes of all coding units CU in LCUs of the frame images, and N is a positive integer;
according to the target LCU, determining M second LCUs in the reference queue, 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 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 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 modes.
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 scale value corresponding to a Skip prediction mode in the L first scale values is larger than a second value or not;
if the first scale value corresponding to the Skip prediction mode in the L first scale values is smaller than or equal to the second value, judging whether the first scale value corresponding to the second prediction mode in the L first scale values is larger than a fourth value;
Judging whether a first scale value corresponding to a third prediction mode in the L first scale values is smaller than a fifth value or not under the condition that the first scale value corresponding to the second prediction mode in the L first scale values is smaller than or equal to the fourth value;
determining that the first motion type is a specific motion type removal under the condition that a first scale value corresponding to a third prediction mode in the L first scale 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 the boundary LCU, and when the first scale value corresponding to the second prediction mode in the L first scale values is smaller than or equal to the fourth value, determining whether the first scale value corresponding to the third prediction mode in the L first scale values is smaller than a fifth value includes:
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 under the condition that the first proportional value corresponding to a second prediction mode in the L first proportional values is smaller than or equal to the fourth value;
Judging whether a first proportional value corresponding to a second predictive mode in the L first proportional values is larger than a fourth value or not under the condition that the first proportional value corresponding to the Direct predictive mode in the L first proportional values is smaller than or equal to the third value;
wherein the third value is greater than the fifth value.
Optionally, the method further comprises:
determining that the first motion type is a non-differential static type under the condition that a first scale value corresponding to a Skip prediction mode in the L first scale values is larger than the second scale value;
determining that the first motion type is a boundary motion type under the condition that a first proportional value corresponding to a Direct prediction mode in the L first proportional values is larger than the third value;
determining that the first motion type is a specific motion type under the condition that a first ratio value corresponding to a second prediction mode in the L first ratio values is larger than the fourth value;
and determining that the first motion type is a common motion type when a first scale value corresponding to a third prediction mode in the L first scale values is greater than or equal to the fifth value.
Optionally, the correspondence satisfies at least one of the following:
The indifferent static type has a corresponding relation with Skip prediction modes;
the boundary motion type has a corresponding relation with the Direct prediction mode;
the specific motion type has a corresponding relation with a second prediction mode, wherein the second prediction mode is a first part of prediction modes in L prediction modes;
removing the correspondence between the specific motion type and the prediction modes except for a third prediction mode, wherein the third prediction mode is a second part of prediction modes in L prediction modes;
the common motion type has a corresponding relation with all the prediction modes;
wherein the L prediction modes are related to the target LCU, and L is a positive integer.
Optionally, 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 method further includes:
and according to the first prediction mode, encoding a target CU in the target LCU.
Optionally, the encoding the target CU in the target LCU according to the first prediction mode includes:
determining whether the coding cost of the target CU in the first prediction mode is smaller than a seventh value;
and under the condition that the coding cost of the target CU in the first prediction mode is smaller than the seventh value, the target CU is coded by adopting the first prediction mode.
Optionally, after determining whether the coding cost of the target CU in the first prediction mode is less than a seventh value, the method further includes:
under the condition that the coding cost of the target CU in the first prediction mode is greater 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 smaller than that 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 encoding a 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 characteristic 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 type and the prediction mode 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 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 a 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;
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 irrelevant to the motion type of the LCU.
Optionally, in the case that the first motion type is determined based on a reference queue, after the encoding the i+1st frame image to the i+n-1 st frame image by using the first encoding mode, the method further includes:
clearing the reference queue, and adding the characteristic information from the ith frame image to the (i+N-1) th frame image to the reference queue;
The reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
Optionally, after the 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 type and the prediction mode and the first motion type, the method further includes:
determining whether a proportion value of a common motion type in motion types of LCUs in H frame images comprising the ith frame image is smaller than a sixth value;
the 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 includes:
under the condition that the proportion value of the common motion type in the motion types of LCUs 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 modes and the first motion type;
wherein the H frame images are continuous, and H is a positive integer.
Optionally, after determining whether the scale value of the common motion type of the LCU in the H frame images including the i-th frame image is smaller than the sixth value, the method further includes:
under the condition that the proportion value of the common motion type in the motion types of LCUs in the H frame images is larger than or equal to the sixth value, encoding the ith frame image to the (i+N-1) th frame image by adopting a first encoding mode;
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 irrelevant to the motion type of the LCU.
Optionally, in the case that the first motion type is determined based on a reference queue, after the encoding the i-th frame image to the i+n-1-th frame image by using the first encoding mode, the method further includes:
clearing the reference queue, and adding the characteristic information from the ith frame image to the (i+N-1) th frame image to the reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
Optionally, after the determining the first motion type of the target maximum coding unit LCU in the ith frame image, the method includes:
determining the motion type of a fifth LCU of the (i+F+1) th frame image as the first motion type under the condition that the motion type of a fourth LCU of the F frame images after the (i) th 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, the pixel difference between the i+f+2 frame image and the i+f+1 frame image is smaller than a first value;
After the motion type of the fifth LCU of the i+f+1 frame image is determined as the first motion type, the method further includes:
obtaining P LCUs included in the i+F+1 frame image, wherein the P LCUs include R CUs, Q mutually different prediction modes exist in 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 proportion values corresponding to the Q prediction modes, wherein each second proportion value is a value of a quantity ratio R of the corresponding prediction modes;
determining a third motion type of a third LCU of the i+F+2 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 characteristic information of N frame images, and N is a positive integer;
and determining a fourth prediction mode of the third LCU according to the third motion type.
Optionally, determining the second motion type of the target LCU according to Q second scale values corresponding to the Q prediction modes includes:
judging whether a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is larger than a second 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 or not under the condition that the 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 ratio value corresponding to a sixth prediction mode in the Q second ratio values is smaller than a fifth value or not under the condition that the second ratio value corresponding to the fifth prediction mode in the Q second ratio values is smaller than or equal to the fourth value;
determining that the second motion type of the target LCU is a specific motion type removal 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;
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 the boundary LCU, and when the second scale value corresponding to the Skip prediction mode in the Q second scale values is smaller than or equal to the second value, determining whether the second scale value corresponding to the fifth prediction mode in the Q second scale values is greater than a fourth value includes:
Judging whether a second proportion value corresponding to a Direct prediction mode in the Q second proportion values is larger than a third value or not under the condition that the 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 ratio value corresponding to a fifth prediction mode in the Q second ratio values is larger than a fourth value or not under the condition that the second ratio value corresponding to the Direct prediction mode in the Q second ratio values is larger than or equal to the third value;
wherein the third value is greater than the fifth value.
Optionally, the method further comprises:
determining that the second motion type of the target LCU is an indiscriminate static type under the condition that a second proportion value corresponding to a Skip prediction mode in the Q second proportion values is larger than the second value;
determining that the second motion type of the target LCU is a boundary motion type under the condition that a second proportion value corresponding to the Direct prediction mode in the Q second proportion values is larger than the third value;
determining that the second motion type of the target LCU 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 that the second motion type of the target LCU is the common motion type under the condition that a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is larger than or equal to the fifth value.
In the several embodiments provided in the present application, it should be understood that the disclosed methods and apparatus may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may be physically included separately, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.
The integrated units implemented in the form of software functional units described above may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform part of the steps of the prediction mode determining method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
While the foregoing is directed to the preferred embodiments of the present invention, it will be appreciated by those skilled in the art that various modifications and adaptations can be made without departing from the principles of the present invention, and such modifications and adaptations are intended to be comprehended within the scope of the present invention.

Claims (44)

1. A prediction mode determination method, the method comprising:
determining a first motion type of a target maximum coding unit LCU in an ith frame image, wherein i is an integer greater than 1;
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;
The correspondence satisfies at least one of:
the indifferent static type has a corresponding relation with Skip prediction modes;
the boundary motion type has a corresponding relation with the Direct prediction mode;
the specific motion type has a corresponding relation with a second prediction mode, wherein the second prediction mode is a first part of prediction modes in L prediction modes;
removing the correspondence between the specific motion type and the prediction modes except for a third prediction mode, wherein the third prediction mode is a second part of prediction modes in L prediction modes;
the common motion type has a corresponding relation with all the prediction modes;
wherein the L prediction modes are related to the target LCU, and L is a positive integer.
2. The method according to claim 1, wherein determining the first motion type of the target largest coding unit LCU in the i-th frame image comprises:
determining a first motion type of a target maximum coding unit LCU in an ith frame image under the condition that the ith frame image meets a first condition;
wherein the i-th 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 type of a first LCU of a previous k frame image of the ith frame image is the same, the first LCU and the target LCU are co-located LCUs, k is a positive integer, and i is an integer larger than k.
3. The method according to claim 2, wherein, in case the i-th frame image satisfies a first condition including that a pixel difference between the i-th frame image and the i-1 th frame image is smaller than a first value, the determining the first motion type of the target maximum coding unit LCU in the i-th frame image includes:
determining the first motion type according to a reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
4. A method according to claim 3, wherein, in case the characteristic information comprises a prediction mode of each coding unit CU in an LCU of a frame picture, the determining the first motion type from a reference queue comprises:
according to the target LCU, determining M second LCUs in the reference queue, 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 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 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 modes.
5. The method of claim 4, wherein determining the first motion type according to 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 judging result;
wherein the first determination comprises at least one of:
judging whether a first scale value corresponding to a Skip prediction mode in the L first scale values is larger than a second value or not;
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 under the condition that the target LCU is a boundary LCU;
judging whether a first proportional value corresponding to a second predictive mode in the L first proportional values is larger than a fourth value or not, wherein the second predictive mode is a first partial predictive mode in the L predictive modes;
judging whether a first proportional value corresponding to a third predictive mode in the L first proportional values is smaller than a fifth value or not, wherein the third predictive mode is a second partial predictive mode in the L predictive 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 motion type based on the first determination comprises at least one of:
under the condition that the first judging result meets a second condition, determining the first motion type as a target motion type;
under the condition that the first judging result does not meet the second condition, determining that the first motion type is a common motion type;
wherein the first judging result meets a second condition includes at least one of the following:
a first scale value corresponding to a Skip prediction mode in the L first scale values is larger than the second scale value;
a first proportional value corresponding to a Direct prediction mode in the L first proportional values is larger than the third value;
a first ratio value corresponding to a second prediction mode in the L first ratio values is larger than the fourth value;
and a first proportional value corresponding to a third prediction mode in the L first proportional values is smaller than the fifth proportional value.
7. The method of claim 6, wherein the target motion type comprises: indifferent still type, boundary motion type, specific motion type, and remove specific motion type;
And under the condition that the first judging result meets a second condition, determining that the first motion type is a target motion type, wherein the method comprises at least one of the following steps:
determining that the first motion type is a non-differential static type under the condition that a first scale value corresponding to a Skip prediction mode in the L first scale values is larger than the second scale value;
determining that the first motion type is a boundary motion type under the condition that a first proportional value corresponding to a Direct prediction mode in the L first proportional values is larger than the third value;
determining that the first motion type is a specific motion type under the condition that a first ratio value corresponding to a second prediction mode in the L first ratio values is larger than the fourth value;
and determining the first motion type to be the specific motion type removed under the condition that a first scale value corresponding to a third prediction mode in the L first scale values is smaller than the fifth value.
8. The method according to claim 2, wherein the determining the first motion type of the target largest coding unit LCU in the i-th frame image, in case the i-th frame image satisfies a first condition comprising the same motion type of the first LCU of the previous k-frame image of the i-th frame image, comprises:
And determining the motion type of the first LCU as the first motion type.
9. The method of claim 8, wherein a pixel difference between an i+1st frame image and the i frame image is less than a first value;
after the determining the first prediction mode of the target LCU, the method further comprises:
obtaining P LCUs included in the ith frame image, wherein the P LCUs comprise R CUs, Q mutually different prediction modes exist in 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 proportion values corresponding to the Q prediction modes, wherein each second proportion value is a value of a quantity 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 characteristic information of N frame images, and N is a positive integer;
and determining a fourth prediction mode of the third LCU according to the third motion type.
10. The method of claim 9, wherein determining the second motion type of the target LCU according to the Q second scale values corresponding to the Q prediction modes comprises:
executing the second judgment to obtain a second judgment result;
determining the second motion type according to the second judging result;
wherein the second determination comprises at least one of:
judging whether a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is larger than a second value or not;
judging whether a second proportion value corresponding to a Direct prediction mode in the Q second proportion values is larger than a third value or not under the condition that the target LCU is a boundary LCU;
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 partial 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 of prediction modes 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 motion type based on the second determination result comprises at least one of:
under the condition that the second judging result meets a third condition, determining the first motion type as a target motion type;
under the condition that the second judging result does not meet the third condition, determining that the first motion type is a common motion type;
wherein the second judging result meets a third condition including at least one of the following:
the second ratio value corresponding to the Skip prediction mode in the Q second ratio values is larger than the second value;
the second ratio value corresponding to the Direct prediction mode in the Q second ratio values is larger than the third value;
a second ratio value corresponding to a fifth prediction mode in the Q second ratio values is larger than the fourth value;
and a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is smaller than the fifth proportion value.
12. The method of claim 11, wherein the target motion type comprises: indifferent still type, boundary motion type, specific motion type, and remove specific motion type;
And under the condition that the second judging result meets a third condition, determining that the first motion type is a target motion type, wherein the method comprises at least one of the following steps:
determining that the first motion type is an indiscriminate static type under the condition that a second proportion value corresponding to a 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 when 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 to be the specific motion type removed 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 of the target LCU according to the correspondence between the motion type and the prediction mode 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 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 a 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;
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 irrelevant to the motion type of the LCU.
14. The method according to claim 13, wherein, in the case where the first motion type is determined based on a reference queue, after the encoding of the i+1st frame image to the i+n-1 th frame image in the first encoding manner, the method further comprises:
clearing the reference queue, and adding the characteristic information from the ith frame image to the (i+N-1) th frame image to the reference queue;
The reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
15. The method of claim 1, wherein after the determining the first prediction mode of the target LCU, before the 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 method further comprises:
determining whether a proportion value of a common motion type in motion types of LCUs in H frame images comprising the ith frame image is smaller than a sixth value;
the 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 includes:
under the condition that the proportion value of the common motion type in the motion types of LCUs 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 modes 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 the scale value of the common motion type of the LCU in the H frame images including the i 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 LCUs in the H frame images is larger than or equal to the sixth value, encoding the ith frame image to the (i+N-1) th frame image by adopting a first encoding mode;
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 irrelevant to the motion type of the LCU.
17. The method according to claim 16, wherein, in the case where the first motion type is determined based on a reference queue, after the encoding of the i-th frame image to the i+n-1-th frame image using the first encoding method, the method further comprises:
clearing the reference queue, and adding the characteristic information from the ith frame image to the (i+N-1) th frame image to the reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
18. The method according to claim 1, wherein 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 method comprises:
And according to the first prediction mode, encoding a target CU in the target LCU.
19. The method of claim 18, wherein the encoding the target CU in the target LCU according to the first prediction mode comprises:
determining whether the coding cost of the target CU in the first prediction mode is smaller than a seventh value;
and under the condition that the coding cost of the target CU in the first prediction mode is smaller than the seventh value, the target CU is coded by adopting the first prediction mode.
20. The method of claim 19, wherein after the determining whether the coding cost of the target CU in the first prediction mode is less than a seventh value, the method further comprises:
under the condition that the coding cost of the target CU in the first prediction mode is greater 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 smaller than that of the target CU for coding by adopting other prediction modes.
21. The method of claim 18, wherein, in the case where the first motion type is determined based on a reference queue, the method further comprises, after encoding a target CU in the target LCU according to the first prediction mode:
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 satisfies a preset condition.
22. A prediction mode determination method, the method comprising:
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;
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;
the correspondence satisfies at least one of:
the indifferent static type has a corresponding relation with Skip prediction modes;
the boundary motion type has a corresponding relation with the Direct prediction mode;
the specific motion type has a corresponding relation with a second prediction mode, wherein the second prediction mode is a first part of prediction modes in L prediction modes;
removing the correspondence between the specific motion type and the prediction modes except for a third prediction mode, wherein the third prediction mode is a second part of prediction modes in L prediction modes;
The common motion type has a corresponding relation with all the prediction modes;
wherein the L prediction modes are related to the target LCU, and L is a positive integer.
23. The method of claim 22, wherein determining the first motion type of the target largest coding unit LCU in the i-th frame image comprises:
acquiring a reference queue, wherein the reference queue comprises characteristic information of N frame images, the characteristic information comprises prediction modes of all coding units CU in LCUs of the frame images, and N is a positive integer;
according to the target LCU, determining M second LCUs in the reference queue, 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 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 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 modes.
24. The method of claim 23, wherein determining the first motion type according to L first scale values corresponding to the L prediction modes comprises:
Judging whether a first scale value corresponding to a Skip prediction mode in the L first scale values is larger than a second value or not;
if the first scale value corresponding to the Skip prediction mode in the L first scale values is smaller than or equal to the second value, judging whether the first scale value corresponding to the second prediction mode in the L first scale values is larger than a fourth value;
judging whether a first scale value corresponding to a third prediction mode in the L first scale values is smaller than a fifth value or not under the condition that the first scale value corresponding to the second prediction mode in the L first scale values is smaller than or equal to the fourth value;
determining that the first motion type is a specific motion type removal under the condition that a first scale value corresponding to a third prediction mode in the L first scale 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.
25. The method of claim 24, wherein, in the case where the target LCU is a boundary LCU, the determining whether the first scale value corresponding to the third prediction mode of the L first scale values is smaller than a fifth value if the first scale value corresponding to the second prediction mode of the L first scale values is smaller than or equal to the fourth value comprises:
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 under the condition that the first proportional value corresponding to a second prediction mode in the L first proportional values is smaller than or equal to the fourth value;
judging whether a first proportional value corresponding to a second predictive mode in the L first proportional values is larger than a fourth value or not under the condition that the first proportional value corresponding to the Direct predictive mode in the L first proportional values is smaller than or equal to the third value;
wherein the third value is greater than the fifth value.
26. The method of claim 25, wherein the method further comprises:
determining that the first motion type is a non-differential static type under the condition that a first scale value corresponding to a Skip prediction mode in the L first scale values is larger than the second scale value;
determining that the first motion type is a boundary motion type under the condition that a first proportional value corresponding to a Direct prediction mode in the L first proportional values is larger than the third value;
determining that the first motion type is a specific motion type under the condition that a first ratio value corresponding to a second prediction mode in the L first ratio values is larger than the fourth value;
And determining that the first motion type is a common motion type when a first scale value corresponding to a third prediction mode in the L first scale values is greater than or equal to the fifth value.
27. The method of claim 22, wherein 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 method further comprises:
and according to the first prediction mode, encoding a target CU in the target LCU.
28. The method of claim 27, wherein the encoding the target CU in the target LCU according to the first prediction mode comprises:
determining whether the coding cost of the target CU in the first prediction mode is smaller than a seventh value;
and under the condition that the coding cost of the target CU in the first prediction mode is smaller than the seventh value, the target CU is coded by adopting the first prediction mode.
29. The method of claim 28, wherein after the determining whether the coding cost of the target CU in the first prediction mode is less than a seventh value, the method further comprises:
Under the condition that the coding cost of the target CU in the first prediction mode is greater 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 smaller than that of the target CU for coding by adopting other prediction modes.
30. The method of claim 27, wherein, in the case where the first motion type is determined based on a reference queue, the method further comprises, after encoding a target CU in the target LCU according to the first prediction mode:
updating the reference queue by using the ith frame image according to a first-in first-out rule;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
31. The method of claim 22, wherein 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 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 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 a 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;
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 irrelevant to the motion type of the LCU.
32. The method of claim 31, wherein, in the case where the first motion type is determined based on a reference queue, after encoding the i+1st frame image to the i+n-1 th frame image in the first encoding manner, the method further comprises:
clearing the reference queue, and adding the characteristic information from the ith frame image to the (i+N-1) th frame image to the reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
33. The method of claim 22, wherein after the determining the first prediction mode of the target LCU, before the 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 method further comprises:
determining whether a proportion value of a common motion type in motion types of LCUs in H frame images comprising the ith frame image is smaller than a sixth value;
the 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 includes:
under the condition that the proportion value of the common motion type in the motion types of LCUs 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 modes and the first motion type;
wherein the H frame images are continuous, and H is a positive integer.
34. The method of claim 33, wherein after determining whether the scale value of the common motion type of the LCU in the H frame images including the i 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 LCUs in the H frame images is larger than or equal to the sixth value, encoding the ith frame image to the (i+N-1) th frame image by adopting a first encoding mode;
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 irrelevant to the motion type of the LCU.
35. The method of claim 34, wherein, in the case where the first motion type is determined based on a reference queue, after the encoding the i-th frame image to the i+n-1-th frame image in the first encoding manner, the method further comprises:
clearing the reference queue, and adding the characteristic information from the ith frame image to the (i+N-1) th frame image to the reference queue;
the reference queue comprises characteristic information of N frame images, wherein N is a positive integer.
36. The method according to claim 22, wherein after determining the first motion type of the target largest coding unit LCU in the i-th frame image, the method comprises:
determining the motion type of a fifth LCU of the (i+F+1) th frame image as the first motion type under the condition that the motion type of a fourth LCU of the F frame images after the (i) th 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.
37. The method of claim 36, wherein a pixel difference between an i+f+2 frame image and the i+f+1 frame image is less than a first value;
after the motion type of the fifth LCU of the i+f+1 frame image is determined as the first motion type, the method further includes:
obtaining P LCUs included in the i+F+1 frame image, wherein the P LCUs include R CUs, Q mutually different prediction modes exist in 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 proportion values corresponding to the Q prediction modes, wherein each second proportion value is a value of a quantity ratio R of the corresponding prediction modes;
determining a third motion type of a third LCU of the i+F+2 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 characteristic information of N frame images, and N is a positive integer;
And determining a fourth prediction mode of the third LCU according to the third motion type.
38. The method of claim 37, wherein determining a second motion type of the target LCU based on Q second scale values corresponding to the Q prediction modes comprises:
judging whether a second proportion value corresponding to the Skip prediction mode in the Q second proportion values is larger than a second 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 or not under the condition that the 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 ratio value corresponding to a sixth prediction mode in the Q second ratio values is smaller than a fifth value or not under the condition that the second ratio value corresponding to the fifth prediction mode in the Q second ratio values is smaller than or equal to the fourth value;
determining that the second motion type of the target LCU is a specific motion type removal 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;
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.
39. The method of claim 38, wherein, in the case that the target LCU is a boundary LCU, the determining whether the second scale value corresponding to the fifth prediction mode in the Q second scale values is greater than a fourth value if the second scale value corresponding to the Skip prediction mode in the Q second scale values is less than or equal to the second value comprises:
judging whether a second proportion value corresponding to a Direct prediction mode in the Q second proportion values is larger than a third value or not under the condition that the 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 ratio value corresponding to a fifth prediction mode in the Q second ratio values is larger than a fourth value or not under the condition that the second ratio value corresponding to the Direct prediction mode in the Q second ratio values is larger than or equal to the third value;
wherein the third value is greater than the fifth value.
40. The method of claim 39, further comprising:
determining that the second motion type of the target LCU is an indiscriminate static type under the condition that a second proportion value corresponding to a Skip prediction mode in the Q second proportion values is larger than the second value;
Determining that the second motion type of the target LCU is a boundary motion type under the condition that a second proportion value corresponding to the Direct prediction mode in the Q second proportion values is larger than the third value;
determining that the second motion type of the target LCU 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 that the second motion type of the target LCU is the common motion type under the condition that a second proportion value corresponding to a sixth prediction mode in the Q second proportion values is larger than or equal to the fifth value.
41. A prediction mode determination apparatus, characterized in that the prediction mode determination apparatus comprises:
a first determining module, configured to determine a first motion type of a target maximum coding unit LCU in an ith frame image, where i is an integer greater than 1;
the second determining module is used for 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;
the correspondence satisfies at least one of:
the indifferent static type has a corresponding relation with Skip prediction modes;
the boundary motion type has a corresponding relation with the Direct prediction mode;
The specific motion type has a corresponding relation with a second prediction mode, wherein the second prediction mode is a first part of prediction modes in L prediction modes;
removing the correspondence between the specific motion type and the prediction modes except for a third prediction mode, wherein the third prediction mode is a second part of prediction modes in L prediction modes;
the common motion type has a corresponding relation with all the prediction modes;
wherein the L prediction modes are related to the target LCU, and L is a positive integer.
42. A prediction mode determination apparatus, characterized in that the prediction mode determination apparatus comprises:
a third determining module, configured to determine a first motion type of a target maximum coding unit LCU in an i-th frame image, where i is an integer greater than 1, when a pixel difference between the i-th frame image and the i-1-th frame image is less than a first value;
a fourth 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;
the correspondence satisfies at least one of:
the indifferent static type has a corresponding relation with Skip prediction modes;
the boundary motion type has a corresponding relation with the Direct prediction mode;
The specific motion type has a corresponding relation with a second prediction mode, wherein the second prediction mode is a first part of prediction modes in L prediction modes;
removing the correspondence between the specific motion type and the prediction modes except for a third prediction mode, wherein the third prediction mode is a second part of prediction modes in L prediction modes;
the common motion type has a corresponding relation with all the prediction modes;
wherein the L prediction modes are related to the target LCU, and L is a positive integer.
43. 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 is configured to read a program in a memory to implement the steps of the method according to any one of claims 1 to 21 or the steps of the method according to any one of claims 22 to 40.
44. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor performs the steps of the method of any one of claims 1 to 21 or the steps of the method of any one of claims 22 to 40.
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 CN111050166A (en) 2020-04-21
CN111050166B true 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 (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101330630B1 (en) * 2006-03-13 2013-11-22 삼성전자주식회사 Method and apparatus for encoding moving picture, method and apparatus for decoding moving picture, applying adaptively an optimal prediction mode

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
连自锋 ; 景晓军 ; 孙松林 ; 黄海.一种多尺度嵌套卷积神经网络模型.《北京邮电大学学报》.2016, *

Also Published As

Publication number Publication date
CN111050166A (en) 2020-04-21

Similar Documents

Publication Publication Date Title
US9699459B2 (en) Image encoding apparatus, image encoding method, image decoding apparatus, and image decoding method
EP1389016B1 (en) Improved motion estimation and block matching pattern
KR101904404B1 (en) Method and device for encoding a sequence of images and method and device for decoding a sequence of images
JP4898467B2 (en) Coding mode determination method and apparatus for variable block size motion prediction
US7978103B2 (en) Code amount estimating device, image coding apparatus including the code amount estimating device, and code amount estimating method
US10652570B2 (en) Moving image encoding device, moving image encoding method, and recording medium for recording moving image encoding program
CN101087417A (en) Picture coding device
CN101888546B (en) A kind of method of estimation and device
KR101409826B1 (en) Method for motion prediction using adaptive search range
CN113905235A (en) Video image processing method and device
JP6652068B2 (en) Moving picture coding apparatus, moving picture coding method and moving picture coding program
CN111050166B (en) Prediction mode determination method, apparatus, and computer-readable storage medium
CN112073733A (en) Video coding and decoding method and device based on motion vector angle prediction
JPH10507331A (en) Method and system for encoding an image sequence and associating the encoded signal with a storage medium, and method and system for decoding such an encoded signal
CN114040209A (en) Motion estimation method, motion estimation device, electronic equipment and storage medium
CN115190309B (en) Video frame processing method, training device, video frame processing equipment and storage medium
CN116472556B (en) Prediction method, encoder, decoder, and storage medium
EP4391541A1 (en) Motion estimation method and apparatus in encoding process, device, storage medium, and program product
JP2008072608A (en) Apparatus and method for encoding image
CN112004099A (en) Intra-frame block copy prediction method and device and computer readable storage medium
JP5276957B2 (en) Video coding method and apparatus
CN116708826A (en) Video encoding method and device, video decoding method and device
CN115834882A (en) Intra-frame prediction method and device, electronic equipment and storage medium
CN116366839A (en) Prediction mode decision method, device, equipment and storage medium
JP2012178669A (en) Moving image encoding apparatus, moving image encoding method, and moving image encoding program

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