Video processing method, apparatus, device, storage medium and program product

By determining an appropriate third resolution and target filter size, and using SIMD instructions to control the video scaling model, the problem of low video scaling efficiency is solved, improving playback smoothness and user experience.

CN115580750BActive Publication Date: 2026-04-28龙芯中科(合肥)技术有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
龙芯中科(合肥)技术有限公司
Filing Date
2021-06-21
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

In existing technologies, because users randomly adjust the resolution of the playback window, it is impossible to calculate a suitable filter size, resulting in low video scaling efficiency, high resource consumption, and affecting playback smoothness and user experience.

Method used

By obtaining the resolution of the initial video and the user input, and combining it with the constant S, a suitable third resolution and target filter size are determined. SIMD instructions are then used to control the video scaling model for scaling, reducing the number of processing steps.

Benefits of technology

It improves video scaling efficiency, reduces CPU resource usage, and enhances playback smoothness and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115580750B_ABST
    Figure CN115580750B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a video processing method, device, equipment, storage medium and program product, the method comprises: receiving a first instruction input by a user; obtaining a first resolution of an initial video; determining a third resolution and a target filter size according to the first resolution, a second resolution and a constant S, the third resolution being a resolution of a playing window used for playing the initial video, the constant S being a number of pixels that can be processed at a time by a SIMD instruction, the target filter size being n times of S, n being 1 / 2 or a positive integer; performing scaling processing on the initial video by a video scaling model under control of the SIMD instruction according to the third resolution and the target filter size, to obtain a target video. The video processing method, device, equipment, storage medium and program product provided by the embodiments of the present application can improve the scaling efficiency of the video.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of video processing technology, and in particular to a video processing method, apparatus, device, storage medium, and program product. Background Technology

[0002] Electronic devices (such as mobile phones and computers) typically include a video player, which displays video in a playback window. Users can adjust the resolution (i.e., size) of the playback window while watching the video.

[0003] Currently, the initial resolution of a video is fixed. After the user adjusts the resolution of the playback window, the video typically needs to be scaled to obtain the target video. The resolution of the target video is then matched with the resolution of the playback window, allowing the target video to be played within the adjusted playback window. In related technologies, a filter size is calculated using the initial resolution and the adjusted playback window resolution. Based on this filter size, a video scaling model is controlled using Single Instruction Multiple Data (SMID) commands to scale the video, resulting in the target video.

[0004] In the aforementioned related technologies, since users can randomly adjust the resolution of the playback window, it may be impossible to calculate a suitable filter size based on the initial resolution and the adjusted resolution of the playback window. This results in a large number of processing steps for scaling the video using the SMID instruction-controlled video scaling model, leading to low efficiency in video scaling. Summary of the Invention

[0005] This application provides a video processing method, apparatus, device, storage medium, and program product to improve the scaling efficiency of videos.

[0006] In a first aspect, embodiments of this application provide a video processing method, including:

[0007] Obtain the initial resolution of the video;

[0008] Receive a first instruction input by the user, wherein the first instruction includes a second resolution;

[0009] Based on the first resolution, the second resolution, and the constant S, a third resolution and a target filter size are determined; the third resolution is the resolution of the playback window used to play the initial video, the constant S is the number of pixels that a SIMD instruction can process at one time, and the target filter size is n times S, where n is 1 / 2 or a positive integer.

[0010] Based on the third resolution and the target filter size, the initial video is scaled using a video scaling model controlled by SIMD instructions to obtain the target video.

[0011] In one possible design, determining the third resolution and the target filter size based on the first resolution, the second resolution, and the constant S includes:

[0012] Generate an initial filter size based on the first resolution and the second resolution;

[0013] The target filter size is determined based on the initial filter size and the constant S;

[0014] The third resolution is generated based on the target filter size and the first resolution.

[0015] In one possible design, determining the target filter size based on the initial filter size and the constant S includes:

[0016] Based on the constant S, perform a remainder operation on the initial filter size to obtain the remainder;

[0017] If the remainder is greater than or equal to a preset threshold, the ratio of the initial filter size to the constant S is rounded up to the nearest integer to obtain a first positive integer, and the product of the constant S and the first positive integer is determined as the target filter size.

[0018] If the remainder is less than a preset threshold, the ratio of the initial filter size to the constant S is rounded down to the nearest integer to obtain a second positive integer, and the product of the constant S and the second positive integer is determined as the target filter size.

[0019] In one possible design, determining the third resolution and the target filter size based on the first resolution, the second resolution, and the constant S includes:

[0020] Based on the first resolution and the constant S, multiple window resolutions are determined;

[0021] Based on the second resolution, the third resolution is determined among the plurality of window resolutions;

[0022] The target filter size is determined based on the third resolution.

[0023] In one possible design, determining multiple window resolutions based on the first resolution and the constant S includes:

[0024] Determine the product of the constant S with each of the multiple values ​​of n;

[0025] For each product, the first preset model is solved based on the product, the scaling factor of the video scaling model, and the first width of the first resolution to obtain the window width of the window resolution corresponding to the product.

[0026] The product of the first height of the first resolution and the window width, and the ratio of the product to the first width, are determined as the window height of the window resolution corresponding to the product.

[0027] In one possible design, determining the third resolution among the plurality of window resolutions based on the second resolution includes:

[0028] The window resolution with the smallest difference from the second resolution among the plurality of window resolutions is determined as the third resolution.

[0029] In one possible design, determining the third resolution among the plurality of window resolutions based on the second resolution includes:

[0030] Obtain the matching degree between the second resolution and each of the plurality of window resolutions;

[0031] The window resolution with the highest matching degree among the multiple window resolutions is determined as the third resolution.

[0032] In one possible design, obtaining the matching degree between the second resolution and each of the plurality of window resolutions includes:

[0033] For each window resolution, the window width and window height of that window resolution are combined to obtain a first vector;

[0034] The second width and the second height of the second resolution are combined to obtain the second vector;

[0035] The cosine similarity between the first vector and the second vector is determined as the matching degree between the second resolution and the window resolution.

[0036] In one possible design, determining the target filter size based on the third resolution includes:

[0037] The product corresponding to the third resolution is used to determine the target filter size.

[0038] In one possible design, determining the third resolution and the target filter size based on the first resolution, the second resolution, and the constant S includes:

[0039] Based on the first resolution, multiple window resolutions corresponding to the first resolution are determined from a preset list; the preset list includes multiple video resolutions, each video resolution corresponds to multiple optional filter sizes, each optional filter size corresponds to a window resolution, and the optional filter size is the product of the constant S and the value of n;

[0040] Based on the second resolution, the third resolution is determined among the plurality of window resolutions;

[0041] The target filter size is determined based on the third resolution.

[0042] In one possible design, the method also includes:

[0043] Play the target video through a playback window with a third resolution.

[0044] Secondly, embodiments of this application provide a video processing apparatus, including: an acquisition module, a receiving module, a determining module, and a processing module; wherein,

[0045] The acquisition module is used to acquire the first resolution of the initial video;

[0046] The receiving module is used to receive a first instruction input by the user, wherein the first instruction includes a second resolution;

[0047] The determining module is used to determine a third resolution and a target filter size based on the first resolution, the second resolution, and a constant S; the third resolution is the resolution of the playback window used to play the initial video, the constant S is the number of pixels that a SIMD instruction can process at one time, and the target filter size is n times S, where n is 1 / 2 or a positive integer.

[0048] The processing module is used to scale the initial video using a video scaling model via SIMD instructions based on the third resolution and the target filter size, to obtain the target video.

[0049] In one possible design, the module is specifically used for:

[0050] Generate an initial filter size based on the first resolution and the second resolution;

[0051] The target filter size is determined based on the initial filter size and the constant S;

[0052] The third resolution is generated based on the target filter size and the first resolution.

[0053] In one possible design, the module is specifically used for:

[0054] Based on the constant S, perform a remainder operation on the initial filter size to obtain the remainder;

[0055] If the remainder is greater than or equal to a preset threshold, the ratio of the initial filter size to the constant S is rounded up to the nearest integer to obtain a first positive integer, and the product of the constant S and the first positive integer is determined as the target filter size.

[0056] If the remainder is less than a preset threshold, the ratio of the initial filter size to the constant S is rounded down to the nearest integer to obtain a second positive integer, and the product of the constant S and the second positive integer is determined as the target filter size.

[0057] In one possible design, the module is specifically used for:

[0058] Based on the first resolution and the constant S, multiple window resolutions are determined;

[0059] Based on the second resolution, the third resolution is determined among the plurality of window resolutions;

[0060] The target filter size is determined based on the third resolution.

[0061] In one possible design, the module is specifically used for:

[0062] Determine the product of the constant S with each of the multiple values ​​of n;

[0063] For each product, the first preset model is solved based on the product, the scaling factor of the video scaling model, and the first width of the first resolution to obtain the window width of the window resolution corresponding to the product.

[0064] The product of the first height of the first resolution and the window width, and the ratio of the product to the first width, are determined as the window height of the window resolution corresponding to the product.

[0065] In one possible design, the module is specifically used for:

[0066] The window resolution with the smallest difference from the second resolution among the plurality of window resolutions is determined as the third resolution.

[0067] In one possible design, the module is specifically used for:

[0068] Obtain the matching degree between the second resolution and each of the plurality of window resolutions;

[0069] The window resolution with the highest matching degree among the multiple window resolutions is determined as the third resolution.

[0070] In one possible design, the module is specifically used for:

[0071] For each window resolution, the window width and window height of that window resolution are combined to obtain a first vector;

[0072] The second width and the second height of the second resolution are combined to obtain the second vector;

[0073] The cosine similarity between the first vector and the second vector is determined as the matching degree between the second resolution and the window resolution.

[0074] In one possible design, the module is specifically used for:

[0075] The product corresponding to the third resolution is used to determine the target filter size.

[0076] In one possible design, the module is specifically used for:

[0077] Based on the first resolution, multiple window resolutions corresponding to the first resolution are determined from a preset list; the preset list includes multiple video resolutions, multiple optional filter sizes corresponding to each video resolution, and a window resolution corresponding to each optional filter size, wherein the optional filter size is the product of the constant S and the value of n;

[0078] Based on the second resolution, the third resolution is determined among the plurality of window resolutions;

[0079] The target filter size is determined based on the third resolution.

[0080] In one possible design, the device further includes a playback module; wherein the playback module is used to play the target video through a playback window having a third resolution.

[0081] Thirdly, embodiments of this application provide an electronic device, including: a processor and a memory;

[0082] The memory stores computer-executed instructions;

[0083] The processor executes computer execution instructions stored in the memory, causing the processor to perform the video processing method as described in any one of the first aspects above.

[0084] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the video processing method as described in any one of the first aspects above.

[0085] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the video processing method as described in any one of the first aspects above.

[0086] This application provides a video processing method, apparatus, device, storage medium, and program product. The method includes: obtaining a first resolution of an initial video; receiving a first instruction input by a user, the first instruction including a second resolution; determining a third resolution and a target filter size based on the first resolution, the second resolution, and a constant S; wherein the third resolution is the resolution of a playback window used to play the initial video, the constant S is the number of pixels that a SIMD instruction can process at one time, and the target filter size is n times S, where n is 1 / 2 or a positive integer; and scaling the initial video using a video scaling model controlled by a SIMD instruction based on the third resolution and the target filter size to obtain a target video. In the above method, the first resolution, the second resolution, and the constant S are used to determine the third resolution and the target filter size, ensuring that the target filter size is a suitable filter size. This avoids the problem in the prior art where a suitable filter size cannot be calculated based on the resolution of the randomly adjusted playback window. Furthermore, based on the third resolution and the target filter size, the initial video is scaled using a video scaling model controlled by SIMD instructions to obtain the target video. This reduces the number of times the initial video is scaled using the video scaling model controlled by SIMD instructions, thus improving the scaling efficiency of the video. Attached Figure Description

[0087] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0088] Figure 1 This is a schematic diagram illustrating an application scenario of the video processing method provided in the embodiments of this application;

[0089] Figure 2 A flowchart illustrating the video processing method provided in this application embodiment. Figure 1 ;

[0090] Figure 3 A flowchart illustrating the video processing method provided in this application embodiment. Figure 2 ;

[0091] Figure 4 A flowchart illustrating the video processing method provided in this application embodiment. Figure 3 ;

[0092] Figure 5 Schematic diagram of the structure of the video processing apparatus provided in the embodiments of this application Figure 1 ;

[0093] Figure 6 Schematic diagram of the structure of the video processing apparatus provided in the embodiments of this application Figure 2 ;

[0094] Figure 7 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application.

[0095] The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to specific embodiments. Detailed Implementation

[0096] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0097] The key names used in this application will be explained below:

[0098] Video scaling refers to scaling the width and height (usually the resolution) of each frame in a video.

[0099] The resolution of the playback window refers to the width and height of the playback window.

[0100] Video resolution refers to the width and height of each frame in a video.

[0101] Filter size: This is a key factor in the video scaling process, and it is related to the resolution of the video before scaling and the resolution of the video after scaling.

[0102] In existing technology, the target video is obtained as follows: The filter size is calculated using the initial resolution of the video and the adjusted resolution of the playback window; based on the filter size, the video scaling model is controlled via SMID instructions to scale the video according to the initial resolution and the adjusted resolution of the playback window, thus obtaining the target video whose resolution matches the adjusted resolution of the playback window. Specifically, the SMID instruction corresponds to the constant S, which represents the number of pixels that the SIMD instruction can process at one time.

[0103] In practical applications, the larger the filter size, the more times the video scaling model performs scaling operations on the video during the acquisition of the target video. Since users can randomly adjust the playback window resolution during the acquisition of the target video using the aforementioned existing technology, it may be impossible to calculate a suitable filter size (typically Sn) based on the initial resolution and the adjusted playback window resolution. This results in a higher number of times the video scaling model, controlled by the SMID instruction, performs scaling operations, leading to lower scaling efficiency. In Sn, S is the constant S mentioned above, and n is equal to 1 / 2 or a positive integer (e.g., 1, 2, 3, etc.).

[0104] In this application, in order to improve the scaling efficiency of video, the inventors conceived of the following: after the user randomly adjusts the resolution of the playback window, a third resolution and a suitable filter size are determined based on the randomly adjusted resolution of the playback window. Then, based on the third resolution and the suitable filter size, the video scaling model is controlled by SMID instructions to process the initial video to obtain the target video. This reduces the number of times the video scaling model is controlled by SMID instructions to perform scaling processing on the video, thereby improving the scaling efficiency of the video.

[0105] Figure 1 This is a schematic diagram illustrating an application scenario of the video processing method provided in the embodiments of this application. For example... Figure 1 As shown, it includes: interface 101 and interface 102.

[0106] Please refer to interface 101, which displays the player's playback window 1011, where the initial video is played. In interface 101, the resolution of the playback window 1011 and the resolution of the initial video are both equal to the first resolution.

[0107] For example, during the playback of the initial video in playback window 1011, if it is detected that the user randomly adjusts the first resolution of playback window 1011 to the first resolution, the electronic device obtains the third resolution of the playback window and the target filter size based on the second resolution of playback window 1011 and the first resolution of the initial video. Based on the third resolution and the target filter size, it controls the video scaling model to scale the initial video to obtain the target video, and displays the playback window with the third resolution in interface 102, playing the target video within the playback window with the third resolution. Please refer to interface 102.

[0108] Please refer to interface 102, which displays a playback window 1012 with a third resolution, and plays the target image within the playback window 1012.

[0109] In the above display process, the target filter size is a relatively suitable filter size. Therefore, in the process of controlling the video scaling model to scale the initial video according to the third resolution and the target filter size, the number of times the video scaling model performs scaling on the initial video can be reduced, thereby improving the scaling efficiency of the video.

[0110] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0111] Figure 2 A flowchart illustrating the video processing method provided in this application embodiment. Figure 1 .like Figure 2 As shown, the method includes:

[0112] S201, Obtain the initial resolution of the video.

[0113] The execution subject of this application embodiment can be an electronic device or a video processing device installed on the electronic device. The video processing device can be implemented by a combination of software and / or hardware. The software may include, but is not limited to, a player, and the hardware may include, but is not limited to, a processor.

[0114] An electronic device is a device that includes a display screen and has the function of displaying and playing audio or video. For example, an electronic device can be a mobile phone, a tablet computer, a laptop computer, a desktop computer, etc.

[0115] A media player can be installed in an electronic device, and the device can display and play the initial video on the screen through the media player.

[0116] For example, the player can be Deepin Movie Player, mplayer Player, mpv Player, vlc Player, etc., which are set in electronic devices, or it can be a video playback control or plugin integrated into other applications or web pages.

[0117] The initial video contains multiple frames. All frames have the same resolution, which is the first resolution.

[0118] S202, Receive a first instruction input by the user, wherein the first instruction includes a second resolution.

[0119] The first instruction is generated by the electronic device adjusting the resolution of the player's playback window based on the user's settings.

[0120] The second resolution is the resolution that the user desires for the playback window.

[0121] When the aforementioned display screen is a touch screen, the user can touch and drag the zoom control on the player to zoom, thereby inputting a first operation into the electronic device, which in turn causes the electronic device to generate a first instruction based on the first operation.

[0122] When the display screen of an electronic device is not a touch screen, the user can drag the zoom control on the player using an external device (such as a mouse) to input the first operation into the electronic device, thereby causing the electronic device to generate the first instruction based on the first operation.

[0123] S203. Determine the third resolution and the target filter size based on the first resolution, the second resolution, and the constant S.

[0124] The third resolution is the resolution of the playback window used to play the initial video.

[0125] The constant S is the number of pixels that a SIMD instruction can process at one time, and the target filter size is n times S, where n is 1 / 2 or a positive integer.

[0126] Specifically, based on the first resolution, multiple window resolutions corresponding to the first resolution are determined from a preset list; the preset list includes multiple video resolutions, multiple optional filter sizes corresponding to each video resolution, and a window resolution corresponding to each optional filter size, wherein the optional filter size is the product of the values ​​of constants S and n;

[0127] Based on the second resolution, determine the third resolution among multiple window resolutions;

[0128] The target filter size is determined based on the third resolution.

[0129] For example, when the constant S equals 8, the preset list has the format shown in Table 1 below.

[0130]

[0131] Table 1

[0132] Video resolution indicates the resolution of the video, while window resolution indicates the resolution of the playback window.

[0133] Based on the initial video's first resolution, the corresponding video resolution is found in Table 1. Then, based on the video resolution corresponding to the first resolution, multiple window resolutions corresponding to the first resolution are determined in Table 1. The first resolution is the same as the corresponding video resolution.

[0134] For example, the first resolution is At that time, the video resolution corresponding to the first resolution is Therefore, the resolutions of multiple windows corresponding to the first resolution can be determined in Table 1. , , .

[0135] Alternatively, the third resolution can be determined from multiple window resolutions based on the second resolution in the following three ways.

[0136] Method 1: For each window resolution among multiple window resolutions, obtain the difference between the second resolution and the window resolution;

[0137] The window resolution corresponding to the smallest difference between the second resolution and each of the multiple window resolutions is determined as the third resolution.

[0138] For each window resolution, the difference between the second resolution and the window resolution can be the difference between the width of the second resolution and the width of the window resolution, the difference between the height of the second resolution and the height of the window resolution, or the sum of the difference between the width of the second resolution and the width of the window resolution, and the difference between the height of the second resolution and the height of the window resolution.

[0139] For example, when the difference between the second resolution and the window resolution is the sum of the difference between the width of the second resolution and the width of the window resolution, and the difference between the height of the second resolution and the height of the window resolution, the second resolution is used as... Window resolution is Taking this as an example, we will explain the difference between the second resolution and the window resolution.

[0140] Determine the second resolution Width A0 and window resolution The difference in width A11 is |A0-A11|;

[0141] Determine the height B0 and window resolution The difference in height B11 is |B0-B11|;

[0142] The sum of the differences |A0-A11| and |B0-B11| is determined as the second resolution. With window resolution The difference; where || is the absolute value operation.

[0143] Method 2: Obtain the first preset weight value corresponding to the width and the second preset weight value corresponding to the height;

[0144] For each window resolution rate among multiple window resolutions, determine the first product of the difference between the width of the second resolution and the width of the window resolution and the first preset weight value, and the second product of the difference between the height of the second resolution and the height of the window resolution and the second preset weight value; the sum of the first product and the second product is determined as the difference between the second resolution and the window resolution.

[0145] The window resolution corresponding to the minimum difference between the second resolution and multiple window resolutions is determined as the third resolution.

[0146] With the second resolution as Window resolution is Taking this as an example, we will explain the difference between the second resolution and the window resolution.

[0147] Determine the second resolution Width A0 and window resolution The first product of the difference in width A11, |A0-A11|, and the first preset weight value a. ;

[0148] Determine the height B0 of the second resolution A0*B0 and the window resolution. The second product of the height difference B11, |B0-B11|, and the second preset weight value b. ;

[0149] The first product With the second product The sum of these is determined to be the second resolution. With window resolution The difference.

[0150] Where a is greater than b. For example, a = 0.9 and b = 0.1. a and b can also be other values, which are not limited here.

[0151] Furthermore, after obtaining the third resolution, the selectable filter size corresponding to the third resolution can be determined as the target filter size. For example, the third resolution is... At that time, the selectable filter size is 8.

[0152] It should be noted that the above preset list can be obtained in real time or it can be obtained in advance and stored in the electronic device.

[0153] The following explains how to obtain preset columns in real time.

[0154] Get i video resolutions and j optional filter sizes, where i and j are integers greater than or equal to 1;

[0155] For each video resolution, determine the window resolution corresponding to each optional filter size based on the video resolution and each of the j optional filter sizes;

[0156] Establish a mapping relationship between i video resolutions, j optional filter sizes, and the window resolution corresponding to each optional filter size to obtain a preset list.

[0157] Among them, the i video resolutions are all different, and the j optional filter sizes are all different.

[0158] The i video resolutions can be obtained by statistically analyzing the video resolutions currently available in the market.

[0159] The j selectable filter sizes can be filter sizes commonly used in practical applications.

[0160] Optionally, the i video resolutions can be preset and sent by the server, and the j optional filter sizes can be pre-stored in the electronic device.

[0161] It should be noted that the method for determining the window resolution corresponding to each optional filter size based on the video resolution and each of the j optional filter sizes can be found in [reference needed]. Figure 3 S305 in the embodiment will not be described again here.

[0162] S204. Based on the third resolution and the target filter size, the initial video is scaled using a video scaling model controlled by SIMD instructions to obtain the target video.

[0163] Furthermore, the target video can be played through a playback window with a third resolution.

[0164] Specifically, the target video can be obtained in the following two ways.

[0165] Method 1: Based on the third resolution and the target filter size, the video scaling model is controlled by SIMD instructions to scale the unplayed images in the initial video to obtain the target video.

[0166] Method 2: Based on the third resolution and the target filter size, the video scaling model is controlled by SIMD instructions to scale all images in the initial video to obtain the target video.

[0167] Furthermore, based on method 2 above, the first index of the initial video is obtained, where the first index is the currently playing image;

[0168] Among the multiple images included in the target video, a first image with a first index is determined; the first image is an image after scaling the currently playing image.

[0169] The first image in the target video is played sequentially through a playback window with a third resolution, followed by other images.

[0170] exist Figure 2 In the video processing provided in this embodiment, a third resolution and a target filter size are determined based on the first resolution, the second resolution, and a constant S, ensuring that the target filter size is a suitable filter size. This avoids the problem in the prior art where a suitable filter size cannot be calculated based on the resolution of the randomly adjusted playback window. Furthermore, based on the third resolution and the target filter size, the initial video is scaled using a video scaling model controlled by SIMD instructions to obtain the target video. This reduces the number of times the initial video is scaled using the video scaling model controlled by SIMD instructions, thereby improving the scaling efficiency of the video.

[0171] Furthermore, in existing technologies, the low efficiency of video scaling reduces the smoothness of playing the target video, resulting in a poor user experience. In this application, however, the improved video scaling efficiency enhances the smoothness of playing the target video, thereby improving the user's viewing experience.

[0172] Unlike existing technologies, where users can randomly adjust the playback window resolution, making it difficult to calculate a suitable filter size (i.e., the size is not a multiple of S), this application uses SIMD instructions to control the video scaling model, resulting in numerous scaling operations and high CPU resource consumption (including in electronic devices). This can prevent the CPU from properly processing data from other processes. In this application, since the target filter size is a multiple of S, scaling the initial video using SIMD instructions based on the third resolution and the target filter size reduces the number of scaling operations, lowers CPU resource consumption, and ensures the CPU can properly process data from other processes.

[0173] Based on the above embodiments, the following is combined with Figure 3 The video processing method provided in the embodiments of this application will be further described below. For details, please refer to [link to relevant documentation]. Figure 3 Example.

[0174] Figure 3 A flowchart illustrating the video processing method provided in this application embodiment. Figure 2 .like Figure 3 As shown, the method includes:

[0175] S301, Obtain the initial resolution of the video.

[0176] S302, Receive a first instruction input by the user, wherein the first instruction includes a second resolution.

[0177] Specifically, the execution methods of S301~S302 are the same as those of S201~S202, and the execution process of S301~S302 will not be described again here.

[0178] S303. Generate the initial filter size based on the first resolution and the second resolution.

[0179] Optionally, the initial filter size can be generated based on the width of the first resolution and the second resolution; alternatively, the initial filter size can be generated based on the height of the first resolution and the second resolution.

[0180] For example, the method of generating the initial filter size is described below using the width direction as an example, taking the width direction as an example to generate the initial filter size.

[0181] When the width of the first resolution is M, the width of the second resolution is X, and the scaling factor corresponding to the video scaling model is C (C is usually different for different video scaling models), if M > X, then the filter size F = 1 + ((C × M) + X - 1) / X; if M < X (the video resolution is enlarged along the horizontal direction), then the filter size F = 1 + C.

[0182] It should be noted that M > X means that the first resolution is reduced along the horizontal direction, and M < X means that the first resolution is enlarged along the horizontal direction. Moreover, in actual engineering applications, the coefficients of the filter often need to be considered, and these coefficients are determined by parameters such as Gaussian blur variance, image sharpening, image redundancy, etc. The acquisition of the filter size in this embodiment is a simplified process in an ideal state and is only provided as an example for reference by those skilled in the art.

[0183] S304. Determine the target filter size according to the initial filter size and the constant S.

[0184] In a possible design, perform a remainder operation on the initial filter size according to the constant S to obtain the remainder;

[0185] If the remainder is greater than or equal to the preset threshold, perform a ceiling operation on the ratio of the initial filter size to the constant S to obtain the first positive integer, and determine the product of the constant S and the first positive integer as the target filter size;

[0186] If the remainder is less than the preset threshold, perform a floor operation on the ratio of the initial filter size to the constant S to obtain the second positive integer, and determine the product of the constant S and the second positive integer as the target filter size.

[0187] Exemplarily, when the constant S is equal to 8 and the initial filter size is equal to 15, perform a remainder operation on 15 according to 8 to obtain the remainder 7.

[0188] Optionally, the preset threshold is a positive integer greater than or equal to 2 and less than the constant S. Exemplarily, when the constant S is equal to 8, the preset threshold can be 4.

[0189] Exemplarily, when the preset threshold is 4, the constant S is equal to 8, and the initial filter size is equal to 15, the remainder 7 is greater than the preset threshold 4. Therefore, a ceiling operation will be performed on the ratio of 15 to 8, which is 15 / 8 , to obtain the first positive integer equal to 2, where is the ceiling operation. Further, determine the product of 8 and 2 as the target filter size (16).

[0190] For example, when the preset threshold is 4, the constant S equals 8, and the initial filter size equals 9, the remainder 1 is less than the preset threshold 4. Therefore, the ratio of 9 to 8, 9 / 8, will be rounded up to the nearest integer. The second positive integer is 1, where, This is a round-down operation. Further, the product of 8 and 1 is used to determine the target filter size (9).

[0191] S305. Generate a third resolution based on the target filter size and the first resolution.

[0192] Specifically, by reversing the filter size F = 1 + ((C × M) + X - 1) / X, we obtain the following formula 1:

[0193] X = (C × M - 1) / (F - 2) Formula 1.

[0194] Substituting F = target filter size, M = width of the first resolution, and C = scaling factor of the video scaling model into Formula 1 above, we obtain the width of the third resolution (i.e., the value of X).

[0195] Furthermore, the height of the third resolution is determined according to the following formula 2:

[0196] Formula 2: M / N = X / Y

[0197] Substituting M = width of the first resolution, N = height of the first resolution, and X = width of the third resolution into Formula 2 above, we obtain the width of the third resolution (i.e., the value of Y).

[0198] S306. Based on the third resolution and the target filter size, the initial video is scaled using a video scaling model controlled by SIMD instructions to obtain the target video.

[0199] S307. Play the target video through a playback window with a third resolution.

[0200] Specifically, the execution methods for S306~S307 are the same as those for S203~S204, and the execution process of S306~S307 will not be described again here.

[0201] In the above Figure 3In this embodiment, an initial filter size is first generated by combining the second resolution. Then, based on the initial filter size and the constant S, the target filter size is determined, such that the target filter size is n times the constant S. Therefore, in the process of scaling the initial video to obtain the target video by controlling the video scaling model through SIMD instructions, the number of times the initial video is scaled by controlling the video scaling model through SIMD instructions can be reduced, thereby improving the scaling efficiency of the video, reducing the CPU resource usage, and ensuring that the CPU can normally process data of other processes.

[0202] In practical applications, electronic devices can detect in real time whether a resolution input by the user is received. If the user-input resolution is detected, the video processing method shown in the embodiments of this application can be executed. Alternatively, if different resolutions input by the user are detected multiple times, after executing the video processing method shown in the embodiments of this application for each detected different resolution, the target video can be saved. When a resolution input by the user is detected again that is the same as one of the multiple different resolutions, the target video corresponding to the user-input resolution is directly obtained from the multiple target videos, thereby avoiding scaling the initial video again to obtain the target video.

[0203] Based on the above embodiments, the following is combined with Figure 4 The video processing method provided in the embodiments of this application will be further described in detail. For specific details, please refer to [link to relevant documentation]. Figure 4 Example.

[0204] Figure 4 A flowchart illustrating the video processing method provided in this application embodiment. Figure 3 .like Figure 4 As shown, the method includes:

[0205] S401, Obtain the initial resolution of the video.

[0206] S402, Receive a first instruction input by the user, wherein the first instruction includes a second resolution.

[0207] Specifically, the execution methods of S401~S402 are the same as those of S201~S202, and the execution process of S401~S402 will not be described again here.

[0208] S403. Determine multiple window resolutions based on the first resolution and the constant S.

[0209] In one possible design, the product corresponding to multiple values ​​of constant S and n is determined separately;

[0210] For each product, the first preset model is solved based on the product, the scaling factor of the video scaling model, and the first width of the first resolution to obtain the window width of the window resolution corresponding to the product.

[0211] The product of the first height of the first resolution and the window width, and the ratio of the product to the first width, are determined as the window height of the window resolution corresponding to the product.

[0212] For example, when n equals 1 / 2, 1, 2, if S=8, then the products of 8 with 1 / 2, 1, 2 are respectively determined to be 4 (1 / 2), 8 (8*1), 16 (8*2).

[0213] Optionally, the first preset model can be Equation 1 above.

[0214] For example, to obtain the window resolution corresponding to product = 8, we can substitute F = 8, M = width of the first resolution, and C = scaling factor of the video scaling model into Formula 1 above to obtain the window width (i.e., the value of X) of the window resolution corresponding to product 8.

[0215] Furthermore, by substituting M = width of the first resolution, N = height of the first resolution, and X = window width of the window resolution corresponding to the product of 8 into Formula 2 above, we can obtain the window height of the window resolution corresponding to the product of 8 (i.e., the value of Y).

[0216] It should be noted that by substituting M = width of the first resolution, N = height of the first resolution, and X = window width of the window resolution corresponding to the product 8 into Formula 2 above, and then transforming Formula 2, we can obtain: Y = X * N / M, that is, the window height of the window resolution corresponding to the product is equal to the ratio of the product of the height of the first resolution and the window width to the first width.

[0217] S404. Determine a third resolution among multiple window resolutions based on the second resolution.

[0218] Alternatively, the third resolution can be determined from multiple window resolutions based on the second resolution in the following two ways.

[0219] Method 1: Determine the third resolution as the window resolution with the smallest difference from the second resolution among multiple window resolutions.

[0220] For method 1, it can be based on Figure 2 The third resolution is determined by methods 1 and 2 shown in S203 of the embodiment.

[0221] Method 2: Obtain the matching degree between the second resolution and each of the multiple window resolutions; determine the window resolution with the highest matching degree among the multiple window resolutions as the third resolution.

[0222] For method 2, for each window resolution, the window width and window height of the stated window resolution are combined to obtain the first vector;

[0223] The second width and the second height of the second resolution are combined to obtain the second vector;

[0224] The cosine similarity between the first vector and the second vector is determined as the matching degree between the second resolution and the window resolution.

[0225] Alternatively, the Pearson correlation coefficient (or Jaccard similarity coefficient, etc.) of the first and second vectors can be used as the matching degree between the second resolution and the window resolution.

[0226] S405. Determine the target filter size based on the third resolution.

[0227] The product corresponding to the third resolution is used to determine the target filter size.

[0228] According to S404 above, the third resolution is included among the multiple window resolutions. According to S404 above, each window resolution among the multiple window resolutions has a corresponding product. Therefore, the product corresponding to the third resolution is determined as the target filter size.

[0229] Optionally, after executing S403, multiple products can be mapped to multiple window resolutions. Further, when executing S405, the product corresponding to the third resolution among the multiple window resolutions can be determined as the target filter size based on the mapping relationship.

[0230] S406. Based on the third resolution and the target filter size, the initial video is scaled using a video scaling model controlled by SIMD instructions to obtain the target video.

[0231] S407. Play the target video through a playback window with a third resolution.

[0232] Specifically, the execution methods for S406~S407 are the same as those for S203~S204, and the execution process of S406~S407 will not be described again here.

[0233] exist Figure 4In this embodiment, multiple window resolutions can be determined based on a first resolution and a constant S. A third resolution is determined from among the multiple window resolutions based on a second resolution. The target filter size is then determined based on the third resolution. The target filter size can be n times the constant S, which improves the flexibility in determining the target filter size. Furthermore, in the process of scaling the initial video to obtain the target video by controlling the video scaling model through SIMD instructions, the number of times the initial video is scaled by controlling the video scaling model through SIMD instructions can be reduced, improving the scaling efficiency of the video, reducing the CPU resource usage, and ensuring that the CPU can normally process data from other processes.

[0234] In the above embodiments, the initial video can be any player, any application, or a video playback control or plugin in a webpage, thus allowing processing of any video. Furthermore, due to its high video scaling efficiency and low CPU resource consumption, it could potentially be applied to low-end chips.

[0235] Figure 5 This is a schematic diagram of the structure of the video processing apparatus provided in the embodiments of this application. Figure 1 .like Figure 4 As shown, the video processing device 10 includes: an acquisition module 11, a receiving module 12, a determining module 13, and a processing module 14; wherein,

[0236] Module 11 is used to obtain the first resolution of the initial video;

[0237] The receiving module 12 is used to receive a first instruction input by the user, wherein the first instruction includes a second resolution;

[0238] The determining module 13 is used to determine a third resolution and a target filter size based on the first resolution, the second resolution, and the constant S; the third resolution is the resolution of the playback window used to play the initial video, the constant S is the number of pixels that a SIMD instruction can process at one time, and the target filter size is n times S, where n is 1 / 2 or a positive integer.

[0239] Processing module 14 is used to scale the initial video using a video scaling model via SIMD instructions based on the third resolution and the target filter size, to obtain the target video.

[0240] The video processing apparatus provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.

[0241] Figure 6 Schematic diagram of the structure of the video processing apparatus provided in the embodiments of this application Figure 2.like Figure 6 As shown, the video processing device 10 further includes: a playback module 15; wherein,

[0242] Playback module 15 is used to play the target video through a playback window with a third resolution.

[0243] In one possible design, module 13 is specifically used for:

[0244] Generate an initial filter size based on the first resolution and the second resolution;

[0245] The target filter size is determined based on the initial filter size and the constant S;

[0246] The third resolution is generated based on the target filter size and the first resolution.

[0247] In one possible design, module 13 is specifically used for:

[0248] Based on the constant S, perform a remainder operation on the initial filter size to obtain the remainder;

[0249] If the remainder is greater than or equal to a preset threshold, the ratio of the initial filter size to the constant S is rounded up to the nearest integer to obtain a first positive integer, and the product of the constant S and the first positive integer is determined as the target filter size.

[0250] If the remainder is less than a preset threshold, the ratio of the initial filter size to the constant S is rounded down to the nearest integer to obtain a second positive integer, and the product of the constant S and the second positive integer is determined as the target filter size.

[0251] In one possible design, module 13 is specifically used for:

[0252] Based on the first resolution and the constant S, multiple window resolutions are determined;

[0253] Based on the second resolution, the third resolution is determined among the plurality of window resolutions;

[0254] The target filter size is determined based on the third resolution.

[0255] In one possible design, module 13 is specifically used for:

[0256] Determine the product of the constant S with each of the multiple values ​​of n;

[0257] For each product, the first preset model is solved based on the product, the scaling factor of the video scaling model, and the first width of the first resolution to obtain the window width of the window resolution corresponding to the product.

[0258] The product of the first height of the first resolution and the window width, and the ratio of the product to the first width, are determined as the window height of the window resolution corresponding to the product.

[0259] In one possible design, module 13 is specifically used for:

[0260] The window resolution with the smallest difference from the second resolution among the plurality of window resolutions is determined as the third resolution.

[0261] In one possible design, module 13 is specifically used for:

[0262] Obtain the matching degree between the second resolution and each of the plurality of window resolutions;

[0263] The window resolution with the highest matching degree among the multiple window resolutions is determined as the third resolution.

[0264] In one possible design, module 13 is specifically used for:

[0265] For each window resolution, the window width and window height of that window resolution are combined to obtain a first vector;

[0266] The second width and the second height of the second resolution are combined to obtain the second vector;

[0267] The cosine similarity between the first vector and the second vector is determined as the matching degree between the second resolution and the window resolution.

[0268] In one possible design, module 13 is specifically used for:

[0269] The product corresponding to the third resolution is used to determine the target filter size.

[0270] In one possible design, module 13 is specifically used for:

[0271] Based on the first resolution, multiple window resolutions corresponding to the first resolution are determined from a preset list; the preset list includes multiple video resolutions, multiple optional filter sizes corresponding to each video resolution, and a window resolution corresponding to each optional filter size, wherein the optional filter size is the product of the constant S and the value of n;

[0272] Based on the second resolution, the third resolution is determined among the plurality of window resolutions;

[0273] The target filter size is determined based on the third resolution.

[0274] The video processing apparatus provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.

[0275] Figure 7 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of this application. Figure 7 As shown, the electronic device 20 includes a transceiver 21, a memory 22, and a processor 23. The transceiver 21 may include a transmitter and / or a receiver. The transmitter may also be referred to as a transmitter, transmitter port, or transmitter interface, etc., and the receiver may also be referred to as a receiver, receiver port, or receiver interface, etc. The transceiver 21 is used to receive data sent by other devices or to send data to other devices. Exemplarily, the transceiver 21, memory 22, and processor 23 are interconnected via a bus 24.

[0276] The memory 22 is used to store computer execution instructions. The processor 23 is used to execute the computer execution instructions stored in the memory 22, causing the processor 23 to perform the video processing method shown in any of the above method embodiments. The specific implementation process of the processor 23 can be found in the above method embodiments, and its implementation principle and technical effect are similar, so it will not be repeated here.

[0277] In the above Figure 7 In the illustrated embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0278] The memory may include high-speed RAM, or it may also include non-volatile memory (NVM), such as disk storage.

[0279] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0280] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the video processing method described above.

[0281] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the video processing method described above.

[0282] All or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, it performs the steps of the above method embodiments; and the aforementioned memory (storage medium) includes: read-only memory (ROM), RAM, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof.

[0283] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0284] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0285] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0286] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the spirit and scope of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of the claims of this application and their equivalents, this application also intends to include these modifications and variations.

[0287] In this application, the term "comprising" and its variations can refer to non-limiting inclusion; the term "or" and its variations can refer to "and / or". The terms "first", "second", etc., in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. In this application, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

Claims

1. A video processing method, characterized in that, include: Obtain the initial resolution of the video; Receive a first instruction input by the user, wherein the first instruction includes a second resolution; Based on the first resolution, the second resolution, and the constant S, a third resolution and a target filter size are determined; wherein, the third resolution is the resolution of the playback window used to play the initial video, the constant S is the number of pixels that a SIMD instruction can process at one time, and the target filter size is n times S, where n is 1 / 2 or a positive integer; the third resolution is determined based on the target filter size, or the target filter size is determined based on the third resolution; Based on the third resolution and the target filter size, the initial video is scaled using a video scaling model controlled by SIMD instructions to obtain the target video.

2. The method according to claim 1, characterized in that, The step of determining the third resolution and the target filter size based on the first resolution, the second resolution, and the constant S includes: Generate an initial filter size based on the first resolution and the second resolution; The target filter size is determined based on the initial filter size and the constant S; The third resolution is generated based on the target filter size and the first resolution.

3. The method according to claim 2, characterized in that, The step of determining the target filter size based on the initial filter size and the constant S includes: Based on the constant S, perform a remainder operation on the initial filter size to obtain the remainder; If the remainder is greater than or equal to a preset threshold, the ratio of the initial filter size to the constant S is rounded up to the nearest integer to obtain a first positive integer, and the product of the constant S and the first positive integer is determined as the target filter size. If the remainder is less than a preset threshold, the ratio of the initial filter size to the constant S is rounded down to the nearest integer to obtain a second positive integer, and the product of the constant S and the second positive integer is determined as the target filter size.

4. The method according to claim 1, characterized in that, The step of determining the third resolution and the target filter size based on the first resolution, the second resolution, and the constant S includes: Based on the first resolution and the constant S, multiple window resolutions are determined; Based on the second resolution, the third resolution is determined among the plurality of window resolutions; The target filter size is determined based on the third resolution.

5. The method according to claim 4, characterized in that, The step of determining multiple window resolutions based on the first resolution and the constant S includes: Determine the product of the constant S with each of the multiple values ​​of n; For each product, the first preset model is solved based on the product, the scaling factor of the video scaling model, and the first width of the first resolution to obtain the window width of the window resolution corresponding to the product. The product of the first height of the first resolution and the window width, and the ratio of the product to the first width, are determined as the window height of the window resolution corresponding to the product.

6. The method according to claim 5, characterized in that, Determining the third resolution from among the plurality of window resolutions based on the second resolution includes: The window resolution with the smallest difference from the second resolution among the plurality of window resolutions is determined as the third resolution.

7. The method according to claim 5, characterized in that, The step of determining the third resolution among the plurality of window resolutions based on the second resolution includes: Obtain the matching degree between the second resolution and each of the plurality of window resolutions; The window resolution with the highest matching degree among the multiple window resolutions is determined as the third resolution.

8. The method according to claim 7, characterized in that, The step of obtaining the matching degree between the second resolution and each of the plurality of window resolutions includes: For each window resolution, the window width and window height of that window resolution are combined to obtain a first vector; The second width and the second height of the second resolution are combined to obtain the second vector; The cosine similarity between the first vector and the second vector is determined as the matching degree between the second resolution and the window resolution.

9. The method according to any one of claims 5-8, characterized in that, Determining the target filter size based on the third resolution includes: The product corresponding to the third resolution is used to determine the target filter size.

10. The method according to claim 1, characterized in that, The step of determining the third resolution and the target filter size based on the first resolution, the second resolution, and the constant S includes: Based on the first resolution, multiple window resolutions corresponding to the first resolution are determined from a preset list; the preset list includes multiple video resolutions, multiple optional filter sizes corresponding to each video resolution, and a window resolution corresponding to each optional filter size, wherein the optional filter size is the product of the constant S and the value of n; Based on the second resolution, the third resolution is determined among the plurality of window resolutions; The target filter size is determined based on the third resolution.

11. The method according to any one of claims 1-8 and 10, characterized in that, The method further includes: The target video is played through a playback window with the third resolution.

12. A video processing apparatus, characterized in that, include: The module comprises an acquisition module, a receiving module, a determination module, and a processing module; among which, The acquisition module is used to acquire the first resolution of the initial video; The receiving module is used to receive a first instruction input by the user, wherein the first instruction includes a second resolution; The determining module is configured to determine a third resolution and a target filter size based on the first resolution, the second resolution, and a constant S; wherein the third resolution is the resolution of the playback window used to play the initial video, the constant S is the number of pixels that a SIMD instruction can process at one time, and the target filter size is n times S, where n is 1 / 2 or a positive integer; the third resolution is determined based on the target filter size, or the target filter size is determined based on the third resolution; The processing module is used to scale the initial video using a video scaling model via SIMD instructions based on the third resolution and the target filter size, to obtain the target video.

13. An electronic device, characterized in that, include: Processor and memory; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the video processing method as described in any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the video processing method as described in any one of claims 1 to 11.

15. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the video processing method as described in any one of claims 1 to 11.

Citation Information

Patent Citations

  • Image scaling processing method and device

    CN111210389A

  • Resolution determination method and device, storage medium, client and server

    CN111385607A