Data processing method and device, electronic equipment and computer readable storage medium
By detecting the decoder status and dynamically adjusting the decoding status, the problem of low decoding efficiency is solved, the decoding speed and playback effect of audio and video data is improved, and the increase in hardware costs is avoided.
Patent Information
- Application Number
- CN202310682425.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-08
- Publication Date
- 2024-12-10
AI Technical Summary
In the prior art, the decoder's decoding efficiency is not high, resulting in the problem of stuttering audio and video playback.
By detecting the decoder's decoding state change instruction, determining its current state, and converting it to a preset decoding state or accelerated decoding state based on the unit decoding time and state, it is determined whether to loop filter the data frame to improve decoding efficiency.
The improvement of decoding efficiency is achieved, which avoids the increase in hardware costs, improves the accuracy and adaptability of decoding speed, and ensures smooth playback of audio and video data.
Smart Images

Figure CN119110062A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of multimedia technology, and more specifically, to a data processing method, device, electronic device, and computer-readable storage medium. Background Art
[0002] With the development of network communication, the traffic of network audio and video has increased rapidly. After encoding, audio and video data are transmitted in a compressed format. The decoder can decode the received compressed data and restore it to analog audio and video information so that the player can play the audio and video. The decoding rate of the decoder will directly affect the playback effect of audio and video. For example, in online live broadcast and on-demand services, it is necessary to ensure the real-time data transmission and playback of audio and video.
[0003] In the process of data decoding by the decoder, the decoded data is usually temporarily stored in the buffer area, and the decoded data in the buffer area can only be played after waiting for the next key data frame to refresh the data code stream. When the hardware performance of the decoder is insufficient, there will often be slow decoding speed and audio and video playback jams. In the prior art, decoding can be accelerated by upgrading the hardware of the decoder and adopting a multi-channel parallel data processing process, but this solution has the problem of low decoding efficiency. Summary of the invention
[0004] The embodiments of the present application provide a data processing method, device, electronic device and computer-readable storage medium, which can solve the problem of low decoding efficiency in the prior art. The technical solution is as follows:
[0005] According to one aspect of an embodiment of the present application, a data processing method is provided, the method comprising:
[0006] If a decoding state change instruction for the decoder is detected, the current first decoding state of the decoder is determined; wherein the first decoding state includes a preset decoding state or an accelerated decoding state; the preset decoding state is achieved by performing loop filtering processing on a data frame for which loop filtering is enabled during the encoding process; the accelerated decoding state is achieved by not performing loop filtering processing on a target frame in a data frame code stream; the target frame includes a non-reference frame having an inter-frame reference in the data frame code stream;
[0007] Determining a second decoding state of the decoder based on the unit decoding duration of the decoder and the first decoding state; wherein the second decoding state includes a preset decoding state or an accelerated decoding state;
[0008] The data frame to be decoded is decoded according to the second decoding state.
[0009] In a possible implementation, the determining the second decoding state of the decoder based on the unit decoding duration and the first decoding state of the decoder includes:
[0010] When the first decoding state is a preset decoding state and the unit decoding time length is greater than or equal to the first time threshold, determining that the second decoding state of the decoder is an accelerated decoding state;
[0011] When the first decoding state is an accelerated decoding state and the unit decoding duration is less than or equal to a second time threshold, the second decoding state of the decoder is determined to be a preset decoding state; wherein the second time threshold is less than the first time threshold.
[0012] In a possible implementation, when the second decoding state is the accelerated decoding state, decoding the data frame to be decoded according to the second decoding state includes:
[0013] Decode and convert the data frame to be decoded to obtain the target frame data;
[0014] It is determined whether to skip loop filtering processing for target frame data according to the frame attribute of the data frame to be decoded, so as to complete decoding of the data frame to be decoded.
[0015] In yet another possible implementation, the determining whether to skip loop filtering for target frame data according to the frame attribute of the data frame to be decoded includes:
[0016] When the frame attribute of the data frame to be decoded includes a reference frame, determining a loop filtering state of the data frame to be decoded; determining whether to perform loop filtering processing on the target frame data according to the loop filtering state;
[0017] When the frame attributes of the frame to be decoded include a non-reference frame, loop filtering processing is skipped for the target frame data, and the target frame data is used as the decoded data.
[0018] In yet another possible implementation, when the second decoding state is a preset decoding state, decoding the data frame to be decoded according to the second decoding state includes:
[0019] Decode and convert the data frame to be decoded to obtain the target frame data;
[0020] When it is determined that the loop filtering state of the data frame to be decoded is in the on state, determining the loop filtering parameters, performing loop filtering processing on the target frame data based on the loop filtering parameters, and using the target frame data after the loop filtering processing as the decoded data;
[0021] When it is determined that the loop filtering state of the data frame to be decoded is in the closed state, the target frame data is used as the decoding data.
[0022] In another possible implementation, the decoding state change instruction is triggered based on any of the following:
[0023] detecting that the number of first frames of data frames decoded by the decoder exceeds a preset number of units after the second decoding state was last determined;
[0024] It is detected that the time from the last determination of the second decoding state to the current first time exceeds the preset unit time.
[0025] In another possible implementation, the unit decoding time of the decoder is obtained based on any of the following methods:
[0026] Calculating a unit decoding time length of the decoder according to a decoding time taken by the decoder to decode the data frames of the first number of frames;
[0027] The unit decoding time length of the decoder is calculated according to the number of data frames decoded by the decoder within the first time.
[0028] According to another aspect of an embodiment of the present application, a data processing device is provided, the device comprising:
[0029] A first determination module is used to determine the current first decoding state of the decoder if a decoding state change instruction for the decoder is detected; wherein the first decoding state includes a preset decoding state or an accelerated decoding state; the preset decoding state is achieved by performing loop filtering processing on a data frame with loop filtering turned on during the encoding process; the accelerated decoding state is achieved by not performing loop filtering processing on a target frame in a data frame code stream; the target frame includes a non-reference frame having an inter-frame reference in the data frame code stream;
[0030] A second determining module, configured to determine a second decoding state of the decoder based on a unit decoding duration of the decoder and the first decoding state; wherein the second decoding state includes a preset decoding state or an accelerated decoding state;
[0031] The decoding module is used to decode the data frame to be decoded according to the second decoding state.
[0032] In a possible implementation, when determining the second decoding state of the decoder based on the unit decoding duration of the decoder and the first decoding state, the second determining module is configured to:
[0033] When the first decoding state is a preset decoding state and the unit decoding time length is greater than or equal to the first time threshold, determining that the second decoding state of the decoder is an accelerated decoding state;
[0034] When the first decoding state is an accelerated decoding state and the unit decoding duration is less than or equal to a second time threshold, the second decoding state of the decoder is determined to be a preset decoding state; wherein the second time threshold is less than the first time threshold.
[0035] In a possible implementation, when the second decoding state is the accelerated decoding state, the decoding module is used to:
[0036] Decode and convert the data frame to be decoded to obtain the target frame data;
[0037] It is determined whether to skip loop filtering processing for target frame data according to the frame attribute of the data frame to be decoded, so as to complete decoding of the data frame to be decoded.
[0038] In yet another possible implementation, when determining whether to skip loop filtering for target frame data according to the frame attribute of the data frame to be decoded, the decoding module is configured to:
[0039] When the frame attribute of the data frame to be decoded includes a reference frame, determining a loop filtering state of the data frame to be decoded; determining whether to perform loop filtering processing on the target frame data according to the loop filtering state;
[0040] When the frame attributes of the frame to be decoded include a non-reference frame, loop filtering processing is skipped for the target frame data, and the target frame data is used as the decoded data.
[0041] In yet another possible implementation, when the second decoding state is a preset decoding state, the decoding module, when decoding the data frame to be decoded according to the second decoding state, is configured to:
[0042] Decode and convert the data frame to be decoded to obtain the target frame data;
[0043] When it is determined that the loop filtering state of the data frame to be decoded is in the on state, determining the loop filtering parameters, performing loop filtering processing on the target frame data based on the loop filtering parameters, and using the target frame data after the loop filtering processing as the decoded data;
[0044] When it is determined that the loop filtering state of the data frame to be decoded is in the closed state, the target frame data is used as the decoding data.
[0045] In another possible implementation, the decoding state change instruction is triggered based on any of the following:
[0046] detecting that the number of first frames of data frames decoded by the decoder exceeds a preset number of units after the second decoding state was last determined;
[0047] It is detected that the time from the last determination of the second decoding state to the current first time exceeds the preset unit time.
[0048] In another possible implementation, the unit decoding time of the decoder is obtained based on any of the following methods:
[0049] Calculating a unit decoding time length of the decoder according to a decoding time taken by the decoder to decode the data frames of the first number of frames;
[0050] The unit decoding time length of the decoder is calculated according to the number of data frames decoded by the decoder within the first time.
[0051] According to another aspect of an embodiment of the present application, an electronic device is provided, which includes: a memory, a processor, and a computer program stored in the memory, and the processor executes the computer program to implement the steps of the method shown in the first aspect of the embodiment of the present application.
[0052] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method shown in the first aspect of the embodiments of the present application are implemented.
[0053] According to one aspect of an embodiment of the present application, a computer program product is provided, which includes a computer program, and when the computer program is executed by a processor, the steps of the method shown in the first aspect of the embodiment of the present application are implemented.
[0054] The beneficial effects of the technical solution provided by the embodiment of the present application are:
[0055] After detecting a decoding state change instruction for a decoder, an embodiment of the present application determines a first decoding state of the decoder, and then determines a second decoding state of the decoder based on a unit decoding duration of the decoder and the first decoding state, so as to decode a data frame to be decoded according to the second decoding state of the decoder; wherein, the first decoding state of the decoder includes a preset decoding state or an accelerated decoding state, the preset decoding state is achieved by performing loop filtering on a data frame for which loop filtering is turned on during the encoding process, and the accelerated decoding state is achieved by not performing loop filtering on a target frame in a data frame code stream; at the same time, the target frame may be a non-reference frame with an inter-frame reference in a data frame code stream, and skipping loop filtering on the target frame during the decoding process will not cause differences in the reference frame during the decoding process, thereby avoiding decoding errors of the current data frame; the present application achieves effective improvement in decoding efficiency by skipping loop filtering on the target frame in the data frame code stream.
[0056] Different from the decoding process in the prior art based on hardware upgrade or multi-channel parallel data processing, which leads to increased hardware cost, the embodiment of the present application realizes precise adjustment of the decoding speed by adaptively converting the decoding state of the decoder according to the unit decoding time of the current decoder, without increasing the hardware cost, thereby improving the accuracy and adaptability of the decoding, ensuring the playback effect of the decoded data frame, and effectively improving the playback efficiency of the data frame. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in describing the embodiments of the present application.
[0058] Figure 1 A schematic diagram of an application scenario of a data processing method provided in an embodiment of the present application;
[0059] Figure 2 A flowchart of a data processing method provided in an embodiment of the present application;
[0060] Figure 3 A schematic diagram of a decoding process of a decoder in an accelerated decoding state in a data processing method provided in an embodiment of the present application;
[0061] Figure 4 A schematic diagram of an inter-frame reference relationship in a data processing method provided in an embodiment of the present application;
[0062] Figure 5 A schematic diagram of a decoding process of a decoder in a preset decoding state in a data processing method provided in an embodiment of the present application;
[0063] Figure 6 A schematic diagram of a flow chart of triggering a decoding state change instruction based on a fixed number of decoding frames in a data processing method provided in an embodiment of the present application;
[0064] Figure 7 A schematic diagram of a flow chart of triggering a decoding state change instruction based on a fixed decoding time in a data processing method provided in an embodiment of the present application;
[0065] Figure 8 A flowchart of an exemplary data processing method provided in an embodiment of the present application;
[0066] Fig. 9 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;
[0067] Fig.10 A schematic diagram of the structure of a data processing electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0068] The embodiments of the present application are described below in conjunction with the drawings in the present application. It should be understood that the implementation methods described below in conjunction with the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions of the embodiments of the present application.
[0069] It will be understood by those skilled in the art that, unless specifically stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the terms "including" and "comprising" used in the embodiments of the present application refer to that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements and / or components, but do not exclude the implementation as other features, information, data, steps, operations, elements, components and / or combinations thereof supported by the technical field. It should be understood that when we say that an element is "connected" or "coupled" to another element, the one element may be directly connected or coupled to the other element, or it may refer to that the one element and the other element establish a connection relationship through an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein indicates at least one of the items defined by the term, for example, "A and / or B" may be implemented as "A", or as "B", or as "A and B".
[0070] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0071] Optionally, the data processing method provided in the embodiment of the present application can be implemented based on cloud technology. For example, the data frame code stream to be decoded can be stored in a cloud service platform for data decoding, and the cloud service platform can decode the above data frame code stream.
[0072] Cloud technology refers to a hosting technology that unifies hardware, software, network and other resources within a wide area network or local area network to achieve data computing, storage, processing and sharing.
[0073] Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The backend services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the rapid development and application of the Internet industry, in the future, each item may have its own identification mark, which needs to be transmitted to the backend system for logical processing. Data of different levels will be processed separately. All kinds of industry data need strong system backing support, which can only be achieved through cloud computing.
[0074] Cloud computing refers to the delivery and use model of IT infrastructure, which means obtaining required resources through the network in an on-demand and easily scalable manner; in a broad sense, cloud computing refers to the delivery and use model of services, which means obtaining required services through the network in an on-demand and easily scalable manner. This service can be related to IT and software, the Internet, or other services. Cloud computing is the product of the development and integration of traditional computer and network technologies such as grid computing, distributed computing, parallel computing, utility computing, network storage technologies, virtualization, and load balancing.
[0075] With the development of the Internet, real-time data streams, and the diversification of connected devices, as well as the promotion of search services, social networks, mobile commerce, and open collaboration, cloud computing has developed rapidly. Different from the previous parallel distributed computing, the emergence of cloud computing will promote revolutionary changes in the entire Internet model and enterprise management model from the perspective of concept. Specifically, the process of determining the second decoding state based on the unit decoding time of the decoder and the first decoding state in the embodiment of the present application can be implemented based on cloud computing.
[0076] The current mainstream coding standards include H.265 (High Efficiency Video Coding Standard), H.266 (Versatile Video Coding Codec Standard) and AV1 (the first generation video coding standard developed by the Open Media Alliance); the coding tools based on the above coding standards all have loop filtering modules; among them, the loop filtering processing corresponding to H.265 includes sampling adaptive offset and deblocking filtering; the loop filtering processing corresponding to H.266 adds an additional adaptive loop filtering processing on the basis of H.265. The inventors found that due to the complexity of the encoding process, the complexity of these loop filtering processes in the encoding process is very small, but it can provide a relatively objective rate-distortion performance gain; however, the complexity of the data processing in the decoding process is much smaller than that in the encoding process, and the loop filtering processing in the decoding process will consume a large part of the decoding time. For example, in decoders based on H.265 and H.266, the computational complexity of the loop filtering accounts for about 30% to 40%. Therefore, the inventors found that the loop filtering processing in the decoding process has a greater impact on the decoding efficiency.
[0077] The data processing method, device, electronic device and computer-readable storage medium provided in this application are intended to solve the above technical problems in the prior art.
[0078] The following describes several exemplary embodiments to illustrate the technical solutions of the embodiments of the present application and the technical effects produced by the technical solutions of the present application. It should be noted that the following embodiments can refer to, draw on or combine with each other, and the same terms, similar features and similar implementation steps in different embodiments will not be described repeatedly.
[0079] like Figure 1 As shown, the data processing method of the present application can be applied to Figure 1 In the scenario shown, specifically, if the server 101 detects a decoding state change instruction for the decoder, it determines the current first decoding state of the decoder, and then determines the second decoding state of the decoder based on the unit decoding time of the decoder and the first decoding state, and then decodes the data frame to be decoded according to the second decoding state to obtain decoded data, and sends the decoded data to the terminal 102, so that the terminal 102 plays the audio and video corresponding to the decoded data.
[0080] Figure 1 In the scenario shown, the above data processing method can be performed in a server, and in other scenarios, it can also be performed in a terminal.
[0081] Those skilled in the art can understand that the server used here can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected by wired or wireless communication, and this application does not limit this.
[0082] The present application provides a data processing method, such as Figure 2 As shown, it can be applied to a server or terminal for data processing, and the method includes:
[0083] S201: If a decoding state change instruction for a decoder is detected, determine a current first decoding state of the decoder.
[0084] Among them, the first decoding state includes a preset decoding state or an accelerated decoding state; the preset decoding state is achieved by performing loop filtering on the data frame with loop filtering turned on in the encoding process; the accelerated decoding state is achieved by not performing loop filtering on the target frame in the data frame code stream; the target frame includes a non-reference frame with an inter-frame reference in the data frame code stream.
[0085] Optionally, the decoding state change instruction can be triggered based on a user input operation, or can be automatically generated based on a preset time interval, or can be triggered based on the decoding time or number of decoded frames of the decoder, which is not specifically limited in the embodiments of the present application.
[0086] Specifically, the server or terminal for data processing can detect the client terminal at a preset time interval, and when a decoding state change instruction for the decoder sent by the client terminal is detected, the first decoding state of the decoder is determined. The server or terminal for data processing can communicate with the client terminal through a network based on a wired or wireless connection; the decoder can be integrated into the server or terminal for data processing.
[0087] S202: Determine a second decoding state of the decoder based on the unit decoding duration of the decoder and the first decoding state.
[0088] The second decoding state includes a preset decoding state or an accelerated decoding state; the decoding rate of the preset decoding state is lower than the decoding rate of the accelerated decoding state. The above-mentioned unit decoding time length can be the average time length of decoding each data frame by the decoder.
[0089] Specifically, a server or terminal for data processing can detect the unit decoding time length of the decoder in real time, and when the first decoding state is a preset decoding state and the unit decoding time length is not less than a first time threshold corresponding to the preset decoding state, the decoder is converted from the preset decoding state to an accelerated decoding state. When the first decoding state is an accelerated decoding state and the unit decoding time length is not greater than a second time threshold corresponding to the accelerated decoding state, the decoder is converted from the accelerated decoding state to the preset decoding state.
[0090] S203: Decode the data frame to be decoded according to the second decoding state.
[0091] Specifically, when the second decoding state is a preset decoding state, the server or terminal used for data processing can determine the loop filtering on state of the data frame to be decoded during the encoding process, and decode the data frame to be decoded according to the loop filtering on state; when the second decoding state is an accelerated decoding state, the server or terminal used for data processing can determine the frame attributes of the data frame to be decoded; and skip the loop filtering processing for the data frame whose frame attributes are non-reference frames to complete the decoding of the data frame.
[0092] After detecting a decoding state change instruction for a decoder, an embodiment of the present application determines a first decoding state of the decoder, and then determines a second decoding state of the decoder based on a unit decoding duration of the decoder and the first decoding state, so as to decode a data frame to be decoded according to the second decoding state of the decoder; wherein, the first decoding state of the decoder includes a preset decoding state or an accelerated decoding state, the preset decoding state is achieved by performing loop filtering on a data frame for which loop filtering is turned on during the encoding process, and the accelerated decoding state is achieved by not performing loop filtering on a target frame in a data frame code stream; at the same time, the target frame may be a non-reference frame with an inter-frame reference in a data frame code stream, and skipping loop filtering on the target frame during the decoding process will not cause differences in the reference frame during the decoding process, thereby avoiding decoding errors of the current data frame; the present application achieves effective improvement in decoding efficiency by skipping loop filtering on the target frame in the data frame code stream.
[0093] Different from the decoding process in the prior art based on hardware upgrade or multi-channel parallel data processing, which leads to increased hardware cost, the embodiment of the present application realizes precise adjustment of the decoding speed by adaptively converting the decoding state of the decoder according to the unit decoding time of the current decoder, without increasing the hardware cost, thereby improving the accuracy and adaptability of the decoding, ensuring the playback effect of the decoded data frame, and effectively improving the playback efficiency of the data frame.
[0094] In an embodiment of the present application, a possible implementation method is provided, wherein the second decoding state of the decoder is determined based on the unit decoding duration and the first decoding state of the decoder, including:
[0095] When the first decoding state is a preset decoding state and the unit decoding time length is greater than or equal to the first time threshold, determining that the second decoding state of the decoder is an accelerated decoding state;
[0096] When the first decoding state is the accelerated decoding state and the unit decoding time length is less than or equal to the second time threshold, it is determined that the second decoding state of the decoder is the preset decoding state.
[0097] The second time threshold is smaller than the first time threshold.
[0098] In other embodiments, when the first decoding state is a preset decoding state and the unit decoding time is less than the first time threshold, the second decoding state of the decoder remains unchanged, that is, it is the preset decoding state; when the first decoding state is an accelerated decoding state and the unit decoding time is greater than the second time threshold, the second decoding state of the decoder remains unchanged, that is, it is the accelerated decoding state.
[0099] In an embodiment of the present application, when the frame rate of the data frame code stream is f, the first time threshold may be 1 / f, and the second time threshold may be 0.6 / f; when the decoder is in a preset decoding state and the unit decoding time is not less than 1 / f, it means that the current decoding rate of the decoder is too low, which may easily cause the data frame data to be played jammed, and the second decoding state is determined to be an accelerated decoding state to increase the decoding rate of the decoder; when the decoder is in an accelerated decoding state and the unit decoding time is not greater than 0.6 / f, it means that the current decoding rate of the decoder is sufficient for complete decoding, and the decoder can be restored from the accelerated decoding state to the preset decoding state to reduce the resources occupied and consumed by the decoder.
[0100] The embodiment of the present application determines the second decoding state of the decoder through the unit decoding time of the decoder and the first decoding state; when the first decoding state is the preset decoding state and the unit decoding time of the decoder is too long, it is necessary to accelerate the current decoding rate of the decoder to avoid the jamming phenomenon of the data frame data playback; when the first decoding state is the accelerated decoding state and the unit decoding time of the decoder is too short, it is necessary to reduce the current decoding speed of the decoder to avoid unnecessary resource consumption of the decoder; when the hardware device jitters, that is, the performance is unstable, or when the hardware device completes other tasks competing for resources, the decoder can be switched from the accelerated decoding state to the preset decoding state to ensure the stability of the hardware performance and improve the decoding efficiency of the decoder.
[0101] In an embodiment of the present application, a possible implementation is provided, when the second decoding state is the accelerated decoding state, decoding the data frame to be decoded according to the second decoding state, including:
[0102] S301, decoding and converting the data frame to be decoded to obtain target frame data.
[0103] Specifically, a server or terminal for data processing may perform decoding conversions such as code stream analysis, inverse prediction, inverse quantization, and inverse transformation on the data frame to be decoded to obtain target frame data.
[0104] S302 : Determine whether to skip loop filtering processing for target frame data according to frame attributes of the data frame to be decoded, so as to complete decoding of the data frame to be decoded.
[0105] The frame attributes of the data frame include a reference frame or a non-reference frame.
[0106] Specifically, for a data frame code stream with inter-frame references, the correct decoding of the current frame data depends on the correct decoding of the reference frame that is referenced by it. If the reference frame has loop filtering turned on during encoding, it will also undergo loop filtering when used as a reference for the current frame data to ensure consistency in encoding and decoding and avoid deviations in the decoding process of the current frame data. For non-reference frames in the data frame code stream, if loop filtering is turned on during encoding, loop filtering can be skipped during decoding. Since it will not be referenced by other frames and does not have a dependency relationship with other frames, loop filtering can be skipped when decoding non-reference frames to reduce the complexity of decoding calculations and improve decoding efficiency.
[0107] In an embodiment of the present application, when the decoder is in an accelerated decoding state, by decoding and converting the data frame to be decoded, and determining the frame attributes of the data frame to be decoded, so as to determine whether to skip the loop filtering processing for the target frame data obtained by the decoding conversion according to the frame attributes of the data frame, that is, whether it is a reference frame, the complexity of the data frame decoding calculation can be effectively reduced, and the decoding accuracy of the data frame to be decoded can be ensured.
[0108] A possible implementation method is provided in the embodiment of the present application, such as Figure 3 As shown, the above-mentioned determining whether to skip loop filtering processing for target frame data according to the frame attribute of the data frame to be decoded includes:
[0109] When the frame attribute of the data frame to be decoded includes a reference frame, determining a loop filtering state of the data frame to be decoded; determining whether to perform loop filtering processing on the target frame data according to the loop filtering state;
[0110] When the frame attributes of the frame to be decoded include a non-reference frame, loop filtering processing is skipped for the target frame data, and the target frame data is used as the decoded data.
[0111] Specifically, Figure 4 The data frames in the data frame code stream shown in the figure include eight frames of data, including ah. The arrows in the figure represent the reference relationship between frames. For example, frame b is referenced by frames a and c. That is to say, only frames a, c, e, and f are not used as reference frames for other frames, that is, frames a, c, e, and f are non-reference frames. Therefore, when decoding, skipping loop filtering for the above non-reference frames will not cause decoding abnormalities of other data frames.
[0112] In practical applications, the code stream that complies with the coding standard has a syntax element bit to identify whether the current data frame will be referenced by other data frames. Taking H.266 as an example, there is a syntax element called ph_non_ref_pic_flag in the image header of each frame. If its value is 1, it means that this frame will not be referenced by other frames, and the loop filtering can be skipped to speed up.
[0113] In some implementations, a server or terminal for performing data processing may obtain syntax elements of a data frame to be decoded, and determine frame attributes according to values of the syntax elements.
[0114] The embodiment of the present application determines whether to skip loop filtering for the target frame data after decoding conversion by obtaining the frame attributes of the frame to be decoded. When the data frame to be decoded is a reference frame, it can be determined whether to perform loop filtering on the target frame data according to the loop filtering state of the data frame to be decoded during encoding; when the data frame to be decoded is a non-reference frame, regardless of whether the loop filtering state is turned on during encoding, the loop filtering is skipped during decoding, thereby improving decoding efficiency.
[0115] A possible implementation method is provided in the embodiment of the present application, such as Figure 5 As shown, when the second decoding state is the preset decoding state, decoding the data frame to be decoded according to the second decoding state includes:
[0116] S401, decoding and converting the data frame to be decoded to obtain target frame data.
[0117] Specifically, a server or terminal for data processing may perform decoding conversions such as code stream analysis, inverse prediction, inverse quantization, and inverse transformation on the data frame to be decoded to obtain target frame data.
[0118] S402, when it is determined that the loop filtering state of the data frame to be decoded is in the on state, determining loop filtering parameters, performing loop filtering processing on the target frame data based on the loop filtering parameters, and using the target frame data after the loop filtering processing as decoded data;
[0119] When it is determined that the loop filtering state of the data frame to be decoded is in the closed state, the target frame data is used as the decoding data.
[0120] In an embodiment of the present application, when the decoder is in a preset decoding state, after decoding and converting the data frame to be decoded, it can determine whether to perform loop filtering on the target frame data based on the loop filtering on state of the data frame during encoding, thereby improving the accuracy of the decoded data; at the same time, in the preset decoding state, the decoder has no resource competition tasks, and by performing loop filtering on the data frame with loop filtering turned on during encoding, the stability of the decoder performance can be guaranteed.
[0121] A possible implementation method is provided in an embodiment of the present application, wherein the above decoding state change instruction is triggered based on any of the following:
[0122] It is detected that after the second decoding state is determined last time, the number of first frames of data frames decoded by the decoder exceeds the preset unit number.
[0123] Specifically, Figure 6 As shown, a server or terminal used for data processing can count the decoded data frames of the decoder based on a counter after detecting the last determination of the second decoding state. When the number of decoded data frames reaches a unit number, a decoding state change instruction is triggered and the counter is reset to zero.
[0124] It is detected that the time from the last determination of the second decoding state to the current first time exceeds the preset unit time.
[0125] Specifically, Figure 7 As shown, the server or terminal for data processing can trigger a decoding state change instruction at a preset unit time interval after detecting the second decoding state was determined last time.
[0126] The embodiment of the present application triggers a decoding state change instruction through a fixed number of decoded data frames or a fixed decoding time, thereby achieving real-time monitoring of the decoding state of the decoder, ensuring that the decoding state of the decoder is adaptively updated according to the current decoding rate, and effectively improving the decoding efficiency of the decoder.
[0127] A possible implementation method is provided in an embodiment of the present application. The unit decoding time length of the above decoder is obtained based on any of the following methods:
[0128] The unit decoding time length of the decoder is calculated according to the decoding time taken by the decoder to decode the data frames of the first number of frames.
[0129] The unit decoding time length of the decoder is calculated according to the number of data frames decoded by the decoder within the first time.
[0130] In some implementations, when the first frame number is S1, and the decoding time for decoding the S1 frame data frame is T1, the unit decoding time length of the decoder can be obtained according to the ratio of the decoding time to the first frame number, ie, T1 / S1.
[0131] In other implementations, when the first time is T2, and the number of data frames decoded by the decoder within T2 is S2, the unit decoding time length of the decoder can be obtained based on the ratio of the first time to the number of decoded frames, ie, T2 / S2.
[0132] The embodiment of the present application determines the unit decoding duration of the decoder by the decoding time of a fixed first number of data frames, or the number of data frames decoded within a fixed first time, so as to obtain the real-time decoding rate of the decoder and ensure the accurate conversion of the decoding state of the subsequent decoder.
[0133] In order to better understand the above data processing method, Figure 8An example of a data processing method of the present application is described in detail. The data processing method can be applied to a decoder. The method comprises the following steps:
[0134] S501, after receiving a data frame to be decoded, the decoder starts decoding and counts the number of data frames decoded by the decoder based on a counter.
[0135] S502: When the number of decoded data frames reaches the unit number, a decoding state change instruction is generated.
[0136] S503, the decoder determines the current first decoding state of the decoder in response to the decoding state change instruction; and calculates the unit decoding time length of the decoder according to the decoding time to complete decoding of a unit number of data frames.
[0137] The first decoding state includes a preset decoding state or an accelerated decoding state.
[0138] S504, if the first decoding state is a preset decoding state, when the unit decoding time of the decoder is greater than or equal to the first time threshold, the second decoding state of the decoder is determined to be an accelerated decoding state; when the unit decoding time of the decoder is less than the first time threshold, the decoder maintains the preset decoding state unchanged.
[0139] Among them, the preset decoding state is achieved by performing loop filtering on the data frame with loop filtering turned on in the encoding process; the accelerated decoding state is achieved by not performing loop filtering on the target frame in the data frame code stream; the target frame includes a non-reference frame with an inter-frame reference in the data frame code stream.
[0140] S505, if the first decoding state is the accelerated decoding state, when the unit decoding time is less than or equal to the second time threshold, the second decoding state of the decoder is determined to be the preset decoding state; when the unit decoding time of the decoder is greater than the second time threshold, the decoder maintains the accelerated decoding state unchanged.
[0141] The second time threshold is smaller than the first time threshold.
[0142] S506, resetting the counter to zero, the decoder decodes the data frame based on the second decoding state, and repeats the decoding steps of S501-S505 until all the data frames to be decoded are decoded.
[0143] Specifically, the decoder decodes the data frame based on the second decoding state including:
[0144] Perform code stream analysis, inverse prediction, inverse quantization, inverse transformation and other decoding conversions on the data frame to be decoded to obtain the target frame data;
[0145] The data frame to be decoded is decoded according to the second decoding state.
[0146] In some implementations, when the second decoding state is the accelerated decoding state, decoding the data frame to be decoded according to the second decoding state includes:
[0147] Obtaining a syntax element of a data frame to be decoded, and determining a frame attribute according to a value of the syntax element;
[0148] When the frame attribute of the data frame to be decoded includes a reference frame, determining a loop filtering state of the data frame to be decoded; determining whether to perform loop filtering processing on the target frame data according to the loop filtering state;
[0149] When the frame attributes of the frame to be decoded include a non-reference frame, loop filtering processing is skipped for the target frame data, and the target frame data is used as the decoded data.
[0150] In some other implementations, when the second decoding state is a preset decoding state, decoding the data frame to be decoded according to the second decoding state includes:
[0151] When it is determined that the loop filtering state of the data frame to be decoded is in the on state, determining the loop filtering parameters, performing loop filtering processing on the target frame data based on the loop filtering parameters, and using the target frame data after the loop filtering processing as the decoded data;
[0152] When it is determined that the loop filtering state of the data frame to be decoded is in the closed state, the target frame data is used as the decoding data.
[0153] After detecting a decoding state change instruction for a decoder, an embodiment of the present application determines a first decoding state of the decoder, and then determines a second decoding state of the decoder based on a unit decoding duration of the decoder and the first decoding state, so as to decode a data frame to be decoded according to the second decoding state of the decoder; wherein, the first decoding state of the decoder includes a preset decoding state or an accelerated decoding state, the preset decoding state is achieved by performing loop filtering on a data frame for which loop filtering is turned on during the encoding process, and the accelerated decoding state is achieved by not performing loop filtering on a target frame in a data frame code stream; at the same time, the target frame may be a non-reference frame with an inter-frame reference in a data frame code stream, and skipping loop filtering on the target frame during the decoding process will not cause differences in the reference frame during the decoding process, thereby avoiding decoding errors of the current data frame; the present application achieves effective improvement in decoding efficiency by skipping loop filtering on the target frame in the data frame code stream.
[0154] Different from the decoding process in the prior art based on hardware upgrade or multi-channel parallel data processing, which leads to increased hardware cost, the embodiment of the present application realizes precise adjustment of the decoding speed by adaptively converting the decoding state of the decoder according to the unit decoding time of the current decoder, without increasing the hardware cost, thereby improving the accuracy and adaptability of the decoding, ensuring the playback effect of the decoded data frame, and effectively improving the playback efficiency of the data frame.
[0155] The present application embodiment provides a data processing device, such as Fig. 9 As shown, the data processing device 90 may include: a first determination module 901, a second determination module 902 and a decoding module 903;
[0156] The first determination module 901 is used to determine the current first decoding state of the decoder if a decoding state change instruction for the decoder is detected; wherein the first decoding state includes a preset decoding state or an accelerated decoding state; the preset decoding state is achieved by performing loop filtering processing on a data frame with loop filtering turned on during the encoding process; the accelerated decoding state is achieved by not performing loop filtering processing on a target frame in a data frame code stream; the target frame includes a non-reference frame having an inter-frame reference in the data frame code stream;
[0157] A second determining module 902 is used to determine a second decoding state of the decoder based on the unit decoding duration of the decoder and the first decoding state; wherein the second decoding state includes a preset decoding state or an accelerated decoding state;
[0158] The decoding module 903 is used to decode the data frame to be decoded according to the second decoding state.
[0159] A possible implementation manner is provided in an embodiment of the present application. When the second determining module 902 determines the second decoding state of the decoder based on the unit decoding duration and the first decoding state of the decoder, it is configured to:
[0160] When the first decoding state is a preset decoding state and the unit decoding time length is greater than or equal to the first time threshold, determining that the second decoding state of the decoder is an accelerated decoding state;
[0161] When the first decoding state is an accelerated decoding state and the unit decoding duration is less than or equal to a second time threshold, the second decoding state of the decoder is determined to be a preset decoding state; wherein the second time threshold is less than the first time threshold.
[0162] A possible implementation manner is provided in an embodiment of the present application. When the second decoding state is the accelerated decoding state, the decoding module 903 is used to:
[0163] Decode and convert the data frame to be decoded to obtain the target frame data;
[0164] It is determined whether to skip loop filtering processing for target frame data according to the frame attribute of the data frame to be decoded, so as to complete decoding of the data frame to be decoded.
[0165] A possible implementation method is provided in an embodiment of the present application. When the decoding module 903 determines whether to skip loop filtering processing for target frame data according to the frame attribute of the data frame to be decoded, it is used to:
[0166] When the frame attribute of the data frame to be decoded includes a reference frame, determining a loop filtering state of the data frame to be decoded; determining whether to perform loop filtering processing on the target frame data according to the loop filtering state;
[0167] When the frame attributes of the frame to be decoded include a non-reference frame, loop filtering processing is skipped for the target frame data, and the target frame data is used as the decoded data.
[0168] A possible implementation manner is provided in an embodiment of the present application. When the second decoding state is a preset decoding state, the decoding module 903 is used to:
[0169] Decode and convert the data frame to be decoded to obtain the target frame data;
[0170] When it is determined that the loop filtering state of the data frame to be decoded is in the on state, determining the loop filtering parameters, performing loop filtering processing on the target frame data based on the loop filtering parameters, and using the target frame data after the loop filtering processing as the decoded data;
[0171] When it is determined that the loop filtering state of the data frame to be decoded is in the closed state, the target frame data is used as the decoding data.
[0172] A possible implementation method is provided in an embodiment of the present application, wherein the above decoding state change instruction is triggered based on any of the following:
[0173] detecting that the number of first frames of data frames decoded by the decoder exceeds a preset number of units after the second decoding state was last determined;
[0174] It is detected that the time from the last determination of the second decoding state to the current first time exceeds the preset unit time.
[0175] A possible implementation method is provided in an embodiment of the present application. The unit decoding time length of the above decoder is obtained based on any of the following methods:
[0176] Calculating a unit decoding time length of the decoder according to a decoding time taken by the decoder to decode the data frames of the first number of frames;
[0177] The unit decoding time length of the decoder is calculated according to the number of data frames decoded by the decoder within the first time.
[0178] The device of the embodiments of the present application can execute the method provided by the embodiments of the present application, and the implementation principles are similar. The actions performed by each module in the device of each embodiment of the present application correspond to the steps in the method of each embodiment of the present application. For the detailed functional description of each module of the device, please refer to the description in the corresponding method shown in the previous text, which will not be repeated here.
[0179] After detecting a decoding state change instruction for a decoder, an embodiment of the present application determines a first decoding state of the decoder, and then determines a second decoding state of the decoder based on a unit decoding duration of the decoder and the first decoding state, so as to decode a data frame to be decoded according to the second decoding state of the decoder; wherein, the first decoding state of the decoder includes a preset decoding state or an accelerated decoding state, the preset decoding state is achieved by performing loop filtering on a data frame for which loop filtering is turned on during the encoding process, and the accelerated decoding state is achieved by not performing loop filtering on a target frame in a data frame code stream; at the same time, the target frame may be a non-reference frame with an inter-frame reference in a data frame code stream, and skipping loop filtering on the target frame during the decoding process will not cause differences in the reference frame during the decoding process, thereby avoiding decoding errors of the current data frame; the present application achieves effective improvement in decoding efficiency by skipping loop filtering on the target frame in the data frame code stream.
[0180] Different from the decoding process in the prior art based on hardware upgrade or multi-channel parallel data processing, which leads to increased hardware cost, the embodiment of the present application realizes precise adjustment of the decoding speed by adaptively converting the decoding state of the decoder according to the unit decoding time of the current decoder, without increasing the hardware cost, thereby improving the accuracy and adaptability of the decoding, ensuring the playback effect of the decoded data frame, and effectively improving the playback efficiency of the data frame.
[0181] In an embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory, the processor executes the above-mentioned computer program to implement the steps of the data processing method, which can be implemented compared with the related art: after detecting a decoding state change instruction for a decoder, the embodiment of the present application determines a first decoding state of the decoder, and then determines a second decoding state of the decoder based on the unit decoding time length of the decoder and the first decoding state, so as to decode the data frame to be decoded according to the second decoding state of the decoder; wherein, the first decoding state of the decoder includes a preset decoding state or an accelerated decoding state, the preset decoding state is implemented by performing loop filtering processing on the data frame with loop filtering turned on in the encoding process, and the accelerated decoding state is implemented by not performing loop filtering processing on the target frame in the data frame code stream; at the same time, the target frame can be a non-reference frame with an inter-frame reference in the data frame code stream, and skipping loop filtering processing on the target frame during the decoding process will not cause differences in the reference frame during the decoding process, and can avoid decoding errors of the current data frame; the present application effectively improves the decoding efficiency by skipping loop filtering processing on the target frame in the data frame code stream. Different from the decoding process in the prior art based on hardware upgrade or multi-channel parallel data processing, which leads to increased hardware cost, the embodiment of the present application realizes precise adjustment of the decoding speed by adaptively converting the decoding state of the decoder according to the unit decoding time of the current decoder, without increasing the hardware cost, thereby improving the accuracy and adaptability of the decoding, ensuring the playback effect of the decoded data frame, and effectively improving the playback efficiency of the data frame.
[0182] In an alternative embodiment, an electronic device is provided, such as Fig.10 As shown, Fig.10 The electronic device 100 shown includes: a processor 1001 and a memory 1003. The processor 1001 and the memory 1003 are connected, such as through a bus 1002. Optionally, the electronic device 100 may also include a transceiver 1004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 1004 is not limited to one, and the structure of the electronic device 100 does not constitute a limitation on the embodiments of the present application.
[0183] Processor 1001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 1001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0184] The bus 1002 may include a path to transmit information between the above components. The bus 1002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 1002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0185] The memory 1003 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, without limitation herein.
[0186] The memory 1003 is used to store the computer program for executing the embodiment of the present application, and the execution is controlled by the processor 1001. The processor 1001 is used to execute the computer program stored in the memory 1003 to implement the steps shown in the above method embodiment.
[0187] The electronic devices include, but are not limited to, mobile terminals such as mobile phones, notebook computers, PADs, etc. and fixed terminals such as digital TVs, desktop computers, etc.
[0188] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps and corresponding contents of the aforementioned method embodiment can be implemented.
[0189] The embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that when the computer device executes the computer instructions, the following conditions are achieved:
[0190] If a decoding state change instruction for the decoder is detected, the current first decoding state of the decoder is determined; wherein the first decoding state includes a preset decoding state or an accelerated decoding state; the preset decoding state is achieved by performing loop filtering processing on a data frame for which loop filtering is enabled during the encoding process; the accelerated decoding state is achieved by not performing loop filtering processing on a target frame in a data frame code stream; the target frame includes a non-reference frame having an inter-frame reference in the data frame code stream;
[0191] Determining a second decoding state of the decoder based on the unit decoding duration of the decoder and the first decoding state; wherein the second decoding state includes a preset decoding state or an accelerated decoding state;
[0192] The data frame to be decoded is decoded according to the second decoding state.
[0193] The terms "first", "second", "third", "fourth", "1", "2", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that shown or described in the drawings.
[0194] It should be understood that, although each operation step is indicated by arrows in the flowchart of the embodiment of the present application, the implementation order of these steps is not limited to the order indicated by the arrows. Unless clearly stated herein, in some implementation scenarios of the embodiment of the present application, the implementation steps in each flowchart can be performed in other orders according to demand. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on actual implementation scenarios. Some or all of these sub-steps or stages may be executed at the same time, and each sub-step or stage in these sub-steps or stages may also be executed at different times respectively. In different scenarios of execution time, the execution order of these sub-steps or stages may be flexibly configured according to demand, and the embodiment of the present application does not limit this.
[0195] The above is only an optional implementation method for some implementation scenarios of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the technical concept of the solution of the present application, other similar implementation methods based on the technical ideas of the present application are also within the protection scope of the embodiments of the present application.
Claims
1. A data processing method, It is characterized in that include: If a decoding state change instruction for the decoder is detected, the current first decoding state of the decoder is determined; wherein the first decoding state includes a preset decoding state or an accelerated decoding state; the preset decoding state is achieved by performing loop filtering processing on a data frame for which loop filtering is enabled during the encoding process; the accelerated decoding state is achieved by not performing loop filtering processing on a target frame in a data frame code stream; the target frame includes a non-reference frame having an inter-frame reference in the data frame code stream; Determining a second decoding state of the decoder based on the unit decoding time length of the decoder and the first decoding state; wherein the second decoding state includes a preset decoding state or an accelerated decoding state; The data frame to be decoded is decoded according to the second decoding state.
2. The method according to claim 1, It is characterized in that The determining the second decoding state of the decoder based on the unit decoding duration of the decoder and the first decoding state includes: When the first decoding state is a preset decoding state and the unit decoding time length is greater than or equal to a first time threshold, determining that the second decoding state of the decoder is an accelerated decoding state; When the first decoding state is an accelerated decoding state and the unit decoding duration is less than or equal to a second time threshold, the second decoding state of the decoder is determined to be a preset decoding state; wherein the second time threshold is less than the first time threshold.
3. The method according to claim 1, It is characterized in that When the second decoding state is the accelerated decoding state, decoding the data frame to be decoded according to the second decoding state includes: Decoding and converting the data frame to be decoded to obtain target frame data; Determine whether to skip loop filtering processing for the target frame data according to the frame attribute of the data frame to be decoded, so as to complete decoding of the data frame to be decoded.
4. The method according to claim 3, It is characterized in that The determining whether to skip loop filtering for the target frame data according to the frame attribute of the data frame to be decoded comprises: When the frame attribute of the data frame to be decoded includes a reference frame, determining a loop filtering state of the data frame to be decoded; and determining whether to perform loop filtering processing on the target frame data according to the loop filtering state; When the frame attribute of the frame to be decoded includes a non-reference frame, loop filtering processing is skipped for the target frame data, and the target frame data is used as decoded data.
5. The method according to claim 1, It is characterized in that When the second decoding state is a preset decoding state, decoding the data frame to be decoded according to the second decoding state includes: Decoding and converting the data frame to be decoded to obtain target frame data; When it is determined that the loop filtering state of the data frame to be decoded is in the on state, determining loop filtering parameters, performing loop filtering processing on the target frame data based on the loop filtering parameters, and using the target frame data after the loop filtering processing as decoded data; When it is determined that the loop filtering state of the data frame to be decoded is in the closed state, the target frame data is used as the decoding data.
6. The method according to claim 1, It is characterized in that The decoding state change instruction is triggered based on any of the following: detecting that the number of first frames of data frames decoded by the decoder exceeds a preset number of units after the second decoding state was last determined; It is detected that the time from the last determination of the second decoding state to the current first time exceeds the preset unit time.
7. The method according to claim 6, It is characterized in that The unit decoding time of the decoder is obtained based on any of the following methods: Calculating a unit decoding duration of the decoder according to a decoding time taken by the decoder to decode the first number of data frames; The unit decoding time length of the decoder is calculated according to the number of data frames decoded by the decoder within the first time.
8. A data processing device, It is characterized in that include: A first determination module is used to determine the current first decoding state of the decoder if a decoding state change instruction for the decoder is detected; wherein the first decoding state includes a preset decoding state or an accelerated decoding state; the preset decoding state is achieved by performing loop filtering processing on a data frame with loop filtering turned on during the encoding process; the accelerated decoding state is achieved by not performing loop filtering processing on a target frame in a data frame code stream; the target frame includes a non-reference frame having an inter-frame reference in the data frame code stream; A second determining module, configured to determine a second decoding state of the decoder based on a unit decoding duration of the decoder and the first decoding state; wherein the second decoding state includes a preset decoding state or an accelerated decoding state; A decoding module is used to decode the data frame to be decoded according to the second decoding state.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory, It is characterized in that The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
