A video recorder, a video data processing method, and a device

By introducing a decoding module and a zoom module into the video recorder, the video data storage location and reading location are dynamically selected, which solves the problems of lag and frame drops during preview display and improves the preview display effect.

CN115442554BActive Publication Date: 2025-07-01HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211038980.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-29
Publication Date
2025-07-01
Estimated Expiration
2042-08-29

AI Technical Summary

Technical Problem

Existing video recorders are prone to problems such as lag and frame drops during preview display, resulting in poor preview display effect.

Method used

By introducing a decoding module and a scaling module in the video recorder, the decoding module generates video data with specified and target image sizes and writes them to different storage locations. The scaling module dynamically selects from which storage location to read video data for scaling processing based on the difference between the display window size and the original image size.

Benefits of technology

It reduces bandwidth consumption and performance resource consumption when the zoom module processes video data, reduces lag and frame drops during preview display, and improves the effect of preview display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115442554B_ABST
    Figure CN115442554B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a video recorder, a video data processing method, and a device, which are applied to the field of decoding and display technology. The video recorder includes a decoding module and a scaling module. The decoding module is configured to, after receiving a video stream signal, use the video stream signal to decode and generate first video data and second video data, write the first video data into a preset first storage location, and write the second video data into a preset second storage location. The scaling module is configured to select to read video data from the first storage location or the second storage location based on the difference relationship between the window size of a specified display window and the size of the original image; determine third video data whose image size matches the window size of the specified display window based on the read video data; and write the third video data into a third storage location. Through this solution, the preview display effect can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of decoding and display technologies, and in particular to a video recorder, a video data processing method, and an apparatus. Background Art

[0002] The preview display service is a functional service provided by video recorders such as DVR (Digital Video Recorder) and NVR (Network Video Recorder), and is used to display in real time the video data corresponding to the video stream signal collected by a camera in a display window.

[0003] In the related art, a decoding module in a video recorder decodes a video stream signal collected by a camera to obtain full-size video data, and then a scaling module in the video recorder, such as a VPE (Video Processing Engine), scales the full-size video data to video data of a window size, and then plays the scaled video data in a display window. Among them, the above window size is the size of the display window.

[0004] Since the scaling module needs to scale the full-size video data, and the performance and bandwidth of the scaling module are limited, it is easy to cause situations such as stuttering and frame dropping in the preview display, and the preview display effect is not good. Summary of the Invention

[0005] The purpose of the embodiments of this application is to provide a video recorder, a video data processing method, and an apparatus to improve the preview display effect. The specific technical solutions are as follows:

[0006] In a first aspect, the embodiments of this application provide a video recorder, and the video recorder includes a decoding module and a scaling module;

[0007] The decoding module is configured to, after receiving a video stream signal, use the video stream signal to decode and generate first video data and second video data, and write the first video data into a preset first storage location, and write the second video data into a preset second storage location; wherein, the first video data is video data with a specified image size, the second video data is video data with a target image size, the specified image size is smaller than the target image size, and the target image size is the original image size corresponding to the video stream signal;

[0008] The scaling module is used to select to read video data from the first storage location or the second storage location based on the difference relationship between the window size of the specified display window and the size of the original image, where the specified display window is a display window configured for the video stream signal for preview display; determine third video data whose image size matches the window size of the specified display window based on the read video data; and write the third video data into a third storage location, where the third storage location is a storage location for storing the video data to be displayed in the specified display window.

[0009] Optionally, the scaling module selects to read video data from the first storage location or the second storage location based on the difference relationship between the window size of the specified display window and the size of the original image, including:

[0010] Determine a first ratio between the window size of the specified display window and the size of the original image;

[0011] If the first ratio is less than a first ratio threshold, read the first video data from the first storage location; otherwise, read the second video data from the second storage location.

[0012] Optionally, the decoding module is further used to obtain a target compression ratio for the video stream signal;

[0013] The decoding module is specifically used to decode the video stream signal into first video data based on the target compression ratio.

[0014] Optionally, the target compression ratio is determined based on a second ratio, where the second ratio is the ratio between the window size and the size of the original image.

[0015] Optionally, the target compression ratio is the compression ratio corresponding to a target ratio threshold interval determined based on the corresponding relationship between a pre-established ratio threshold interval and the compression ratio; the target ratio threshold interval is the ratio threshold interval in which the second ratio is located among multiple pre-divided ratio threshold intervals.

[0016] Optionally, in the corresponding relationship between the ratio threshold interval and the compression ratio, the compression ratio corresponding to each ratio threshold interval is: a ratio threshold greater than the minimum ratio threshold of the ratio threshold interval and less than or equal to the maximum ratio threshold of the ratio threshold interval.

[0017] Optionally, the multiple ratio threshold intervals include:

[0018] A ratio threshold interval less than or equal to a second ratio threshold;

[0019] A ratio threshold range greater than the second ratio threshold and less than or equal to the third ratio threshold, where the second ratio threshold is less than the third ratio threshold;

[0020] A ratio threshold range greater than the third ratio threshold.

[0021] Optionally, the target compression multiple is obtained when the specified display window meets the specified conditions;

[0022] Wherein, the specified conditions include:

[0023] The specified display window is a small-size display window, where the small-size display window is a display window whose third ratio to the window size of the full-screen window is less than the fourth ratio threshold; and / or,

[0024] The specified display window is a display window with a specified size.

[0025] Optionally, the scaling module determines third video data with an image size matching the window size of the specified display window based on the read video data, including:

[0026] If the image size of the read video data matches the window size of the specified display window, the read video data is used as the third video data;

[0027] If the image size of the read video data does not match the window size of the specified display window, the read video data is scaled to obtain third video data with an image size matching the window size of the specified display window.

[0028] Optionally, the step of, if the image size of the read video data does not match the window size of the specified display window, scaling the read video data to obtain third video data with an image size matching the window size of the specified display window includes:

[0029] If the image size of the read video data is greater than the window size of the specified display window, the read video data is compressed to obtain third video data with an image size matching the window size of the specified display window;

[0030] If the image size of the read video data is less than the window size of the specified display window, the read video data is enlarged to obtain third video data with an image size matching the window size of the specified display window. In a second aspect, an embodiment of the present application provides a video data processing method, and the method includes:

[0031] After receiving the video stream signal, use the video stream signal to decode and generate first video data and second video data, where the first video data is video data with a specified image size, the second video data is video data with a target image size, the specified image size is smaller than the target image size, and the target image size is the original image size corresponding to the video stream signal;

[0032] Based on the difference relationship between the window size of the specified display window and the original image size, determine target video data from the first video data and the second video data;

[0033] Based on the target video data, determine third video data whose image size matches the window size of the specified display window, where the specified display window is a display window configured for the video stream signal and used for preview display;

[0034] Write the third video data to a third storage location, where the third storage location is a storage location for storing the video data to be displayed in the specified display window.

[0035] Optionally, the determining target video data from the first video data and the second video data based on the difference relationship between the window size of the specified display window and the original image size includes:

[0036] Determine a first ratio of the window size of the specified display window to the original image size;

[0037] If the first ratio is less than a first proportionality threshold, determine the first video data as the target video data; otherwise, determine the second video data as the target video data.

[0038] Optionally, before using the video stream signal to decode and generate first video data, the method further includes:

[0039] Obtain a target compression ratio for the video stream signal;

[0040] The using the video stream signal to decode and generate first video data includes:

[0041] Based on the target compression ratio, decode the video stream signal into first video data.

[0042] Optionally, the target compression ratio is determined based on a second ratio, and the second ratio is the ratio of the window size to the original image size.

[0043] Optionally, the target compression multiple is the compression multiple corresponding to the target ratio threshold interval determined based on the correspondence between the pre-established ratio threshold intervals and the compression multiples; the target ratio threshold interval is the ratio threshold interval in which the second ratio is located among the multiple pre-divided ratio threshold intervals.

[0044] Optionally, in the correspondence between the ratio threshold intervals and the compression multiples, the compression multiple corresponding to each ratio threshold interval is: a ratio threshold greater than the minimum ratio threshold of the ratio threshold interval and less than or equal to the maximum ratio threshold of the ratio threshold interval.

[0045] Optionally, the multiple ratio threshold intervals include:

[0046] A ratio threshold interval less than or equal to the second ratio threshold;

[0047] A ratio threshold interval greater than the second ratio threshold and less than or equal to the third ratio threshold, where the second ratio threshold is less than the third ratio threshold;

[0048] A ratio threshold interval greater than the third ratio threshold.

[0049] Optionally, the target compression multiple is obtained when the specified display window meets the specified conditions;

[0050] wherein, the specified conditions include:

[0051] The specified display window is a small-size display window, where the small-size display window is a display window whose third ratio to the window size of the full-screen window is less than the fourth ratio threshold; and / or,

[0052] The specified display window is a display window with a specified size.

[0053] Optionally, determining the third video data whose image size matches the window size of the specified display window based on the target video data includes:

[0054] If the image size of the target video data matches the window size of the specified display window, then use the target video data as the third video data;

[0055] If the image size of the target video data does not match the window size of the specified display window, perform scaling processing on the target video data to obtain the third video data whose image size matches the window size of the specified display window.

[0056] Optionally, if the image size of the target video data does not match the window size of the specified display window, performing a scaling process on the target video data to obtain third video data whose image size matches the window size of the specified display window, including:

[0057] If the image size of the target video data is greater than the window size of the specified display window, performing a compression process on the target video data to obtain third video data whose image size matches the window size of the specified display window;

[0058] If the image size of the target video data is less than the window size of the specified display window, performing an enlargement process on the target video data to obtain third video data whose image size matches the window size of the specified display window.

[0059] In a third aspect, an embodiment of the present application provides a video data processing device, where the device includes:

[0060] A data decoding module, configured to, after receiving a video stream signal, use the video stream signal to decode and generate first video data and second video data, where the first video data is video data with a specified image size, the second video data is video data with a target image size, the specified image size is smaller than the target image size, and the target image size is the original image size corresponding to the video stream signal;

[0061] A data determination module, configured to determine target video data from the first video data and the second video data based on the difference relationship between the window size of the specified display window and the original image size;

[0062] A data scaling module, configured to determine third video data whose image size matches the window size of the specified display window based on the target video data, where the specified display window is a display window configured for the video stream signal and used for preview display;

[0063] A data writing module, configured to write the third video data into a third storage location, where the third storage location is a storage location for storing the video data to be displayed in the specified display window.

[0064] In a fourth aspect, an embodiment of the present application provides a video recorder, including a processor and a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to implement the method steps of any one of the second aspect.

[0065] Fifth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the method steps described in any one of the second aspect are implemented.

[0066] Beneficial effects of the embodiments of the present application:

[0067] For a video recorder provided by an embodiment of the present application, during the preview display process, the decoding module can use the video stream signal to simultaneously decode and generate first video data and second video data. At the same time, the scaling module can select to read video data from the first storage location or the second storage location based on the difference relationship between the window size of the specified display window and the size of the original image. That is, the scaling module can dynamically select one of the first video data and the second video data as the video data for subsequent scaling based on the difference relationship between the window size of the specified display window and the size of the original image. In this way, when the scaling module selects the first video data, since the image size of the first video data is smaller than the image size of the second video data, that is, the data volume of the first video data is smaller than the full-size video data, the bandwidth required for the scaling module to read video data from the first storage location is reduced. And because the data volume of the first video data is smaller, the performance resources required for the scaling module to process the first video data are less, so that situations such as stuttering and frame dropping during preview display can be reduced, and the preview display effect is improved.

[0068] Of course, implementing any product or method of the present application does not necessarily require achieving all the above-mentioned advantages at the same time. Description of the Drawings

[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application, and those of ordinary skill in the art can also obtain other embodiments according to these drawings.

[0070] Figure 1 Schematic diagram of the traditional decoding preview strategy;

[0071] Figure 2 Schematic diagram of the structure of a video recorder provided by an embodiment of the present application;

[0072] Figure 3 Schematic diagram of a decoding module outputting video data provided by an embodiment of the present application;

[0073] Figure 4 Schematic diagram of a scaling module reading video data provided by an embodiment of the present application;

[0074] Figure 5a A schematic diagram of a 6-screen split screen provided by an embodiment of the present application;

[0075] Figure 5b A schematic diagram of an 8-screen split screen provided by an embodiment of the present application;

[0076] Figure 6 A flowchart of a video data processing method provided by an embodiment of the present application;

[0077] Figure 7 A schematic structural diagram of a video data processing device provided by an embodiment of the present application;

[0078] Figure 8 A schematic structural diagram of another video recorder provided by an embodiment of the present application. Detailed implementation manners

[0079] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art based on the present application belong to the scope of protection of the present application.

[0080] In industries such as security, it is often necessary to deploy multiple cameras inside the target venue and connect each camera to a video recorder, so as to use the video recorder to process the video data signals collected by each camera to obtain video data for storage, transmission, or preview display. Among them, preview display means that the video data corresponding to the video stream signal (also called the bitstream signal or bitstream data) collected by the camera can be displayed in real time in the display window of the display.

[0081] Specifically, for any one camera, when preview display is configured for the video stream signal collected by the camera, the decoding module in the video recorder can decode the video stream signal collected by the camera into video data, and then use the scaling module in the video recorder to perform scaling processing on the video data to obtain video data with an image size (also called image resolution) consistent with the window size (also called window resolution) of the display window, so that the scaled video data can be played in the display window.

[0082] In the technology of related preview display, the image sizes used for scaled display are all the original image sizes corresponding to the video stream signals. That is to say, the image size of the video data obtained by the decoding module decoding the video stream signal is the original image size (also known as the full size). Furthermore, the scaling module needs to scale the video data with the original image size to the video data with the window size of the display window. For a video recorder, the performance and bandwidth of the included scaling module are limited. Therefore, when the scaling module processes the video data with the original image size, it requires a relatively large amount of bandwidth and the performance of the scaling module, which may lead to situations such as stuttering and frame loss in the preview display, resulting in a poor preview display effect.

[0083] The bandwidth occupied by the above-mentioned scaling module can be represented by the sum of the image sizes of the input and output video data of the scaling module. For example, if the image size of the input video data of the scaling module is 1920×1080 and the image size of the output video data is 640×360, then the bandwidth occupied by the scaling module is: 1920×1080 + 640×360. The performance consumed by the scaling module can be measured by the image size of the video data with the largest image size among the input and output video data of the scaling module. Still taking the above example, the performance consumed by the scaling module is the performance required to process the video data with the image size of 1920×1080.

[0084] Exemplarily, as Figure 1 shown, it is a schematic diagram of the traditional decoding preview strategy, including a single-screen split display window scenario and a multi-screen split display window scenario. Among them, the multi-screen split display window is a 9-screen split display window.

[0085] The above-mentioned single-screen split display window means that only one video data is previewed and displayed on the monitor. In the single-screen split display window scenario, there is only one display window on the monitor, and its window size is 1920×1080. The original image size corresponding to the video stream signal input by the decoding module is 2560×1440. After the decoding module decodes and processes the video stream signal, the obtained video data still has an image size of 2560×1440. Then the scaling module obtains the video data with the image size of 2560×1440 and scales this video data to obtain video data with an image size of 1920×1080 for playback by the display window. At this time, the bandwidth occupied by the scaling module is 2560×1440 + 1920×1080, and the performance consumed is the performance required to process the video data with the image size of 2560×1440.

[0086] The above-mentioned 9-screen split display window means that 9 video data streams are previewed and displayed simultaneously on the monitor. In the scenario of the 9-screen split display window, there are 9 display windows on the monitor, and each display window is used to display one video data stream. Among them, the window size of each of the 9 display windows is 640×360. For any display window, the original image size corresponding to the video stream signal input by the decoding module for this display window is 2560×1440. After the decoding module decodes the video stream signal, video data with an image size of 2560×1440 is obtained. Then, the scaling module acquires the video data with an image size of 2560×1440 and performs scaling processing on this video data to obtain video data with an image size of 640×360 for playback by this display window. At this time, for each video data stream, the bandwidth occupied by the scaling module is 2560×1440 + 640×360, and the performance consumed is the performance required to process video data with an image size of 2560×1440. Since for each display window among the 9 display windows, the bandwidth occupied by the scaling module for the video data to be displayed in each display window is 2560×1440 + 640×360, and the performance consumed is the performance required to process video data with an image size of 2560×1440, for the video data corresponding to the 9 display windows, the scaling module performance consumed and the bandwidth of the scaling module occupied are often greater than the maximum tolerance of the scaling module, resulting in the inability to effectively process each video data stream, leading to situations such as frame loss, display jitter, and anomalies in the preview display, and the preview display effect is poor.

[0087] In order to improve the preview display effect, the embodiments of the present application provide a video recorder, a video data processing method, and a device.

[0088] Among them, the video recorder provided by the embodiments of the present application can be any electronic device capable of realizing preview display, such as a DVR (Digital Video Recorder) or an NVR (Network Video Recorder). Among them, a DVR is a computer system for image storage and processing, and has functions such as long-term video recording, audio recording, remote monitoring, and control of images / voices. An NVR is mostly used in the backend products of the security industry, and it can access multiple network cameras (IP Camera, abbreviated as IPC), and decode and display, record and store, and network transmit the video stream signals transmitted by each network camera.

[0089] The video recorder provided by the embodiments of the present application may include a decoding module and a scaling module;

[0090] A decoding module, configured to, after receiving a video stream signal, use the video stream signal to decode and generate first video data and second video data, and write the first video data to a preset first storage location and write the second video data to a preset second storage location; wherein, the first video data is video data with a specified image size, the second video data is video data with a target image size, the specified image size is smaller than the target image size, and the target image size is the original image size corresponding to the video stream signal;

[0091] A scaling module, configured to select to read video data from the first storage location or the second storage location based on the difference relationship between the window size of a specified display window and the original image size, wherein the specified display window is a display window configured for the video stream signal and used for preview display; determine third video data with an image size matching the window size of the specified display window based on the read video data; and write the third video data to a third storage location, where the third storage location is a storage location for storing the video data to be displayed in the specified display window.

[0092] In the above solution of the present application, during the preview display process, the decoding module can simultaneously decode and generate the first video data and the second video data based on the video stream signal, and at the same time, the scaling module can select to read video data from the first storage location or the second storage location based on the difference relationship between the window size of the specified display window and the original image size, that is, the scaling module can dynamically select one of the first video data and the second video data as the subsequent video data for scaling based on the difference relationship between the window size of the specified display window and the original image size. In this way, when the scaling module selects the first video data, since the image size of the first video data is smaller than that of the second video data, that is, the data volume of the first video data is smaller than that of the full-size video data, the bandwidth required for the scaling module to read the video data from the first storage location is reduced, and since the data volume of the first video data is smaller, the performance resources required for the scaling module to process the first video data are less, thereby reducing situations such as stuttering and frame dropping during preview display and improving the preview display effect.

[0093] Next, the video recorder provided by the embodiments of the present application will be elaborated in detail with reference to the accompanying drawings of the specification.

[0094] As Figure 2 shown, an embodiment of the present application provides a video recorder, which includes a decoding module 201 and a scaling module 202;

[0095] The decoding module 201 is configured to, after receiving a video stream signal, use the video stream signal to decode and generate first video data and second video data, and write the first video data to a preset first storage location and the second video data to a preset second storage location. The first video data is video data with a specified image size, and the second video data is video data with a target image size. The specified image size is smaller than the target image size, and the target image size is the original image size corresponding to the video stream signal.

[0096] The scaling module 202 is configured to select to read video data from the first storage location or the second storage location based on the difference relationship between the window size of a specified display window and the original image size. The specified display window is a display window configured for the video stream signal and used for preview display. Based on the read video data, determine third video data whose image size matches the window size of the specified display window, and write the third video data to a third storage location, where the third storage location is a storage location for storing the video data to be displayed in the specified display window.

[0097] Among them, the decoding module 201 can be software, hardware, or a combination of software and hardware for implementing the decoding function. In one implementation, the above decoding module 201 can be a VDEC (Video Decoder) unit. The scaling module 202 can be software, hardware, or a combination of software and hardware for implementing the scaling function. In one implementation, the above scaling module 202 can be a VPE (Video Processing Engine), and the VPE can have video or image scaling functions.

[0098] Different from the related art where the decoding module only decodes the video stream signal into full-size video data, in the embodiment of the present application, after receiving the video stream signal, the decoding module 201 can use the video stream signal to decode and generate first video data and second video data. For example, after receiving the video stream signal, the decoding module 201 can perform decoding processing on the video stream signal to obtain the first video data and the second video data. It can be seen that in the embodiment of the present application, the decoding module 201 can decode to obtain two paths of video data, namely the first video data with a specified image size and the second video data with a target image size.

[0099] Among them, the target image size is the original image size corresponding to the video stream signal, and the specified image size is smaller than the target image size. That is to say, in the embodiments of the present application, the specified image size can be any image size smaller than the target image size. In the embodiments of the present application, the second video data decoded by the decoding module 201 is full-size video data, and the first video data decoded by the decoding module 201 is video data with an image size smaller than the full-size video data, which means that during the transmission and processing of the first video data, the occupied bandwidth and the consumed performance are smaller.

[0100] Optionally, in order to ensure the video display effect in the specified display window, in one implementation, the above-mentioned specified image size can also be greater than or equal to the window size of the specified display window.

[0101] Exemplarily, as Figure 3 shown, the embodiments of the present application provide a schematic diagram of the decoding module outputting video data. The image size corresponding to the video stream signal received by the decoding module 201 is 2560×1440. After the decoding module 201 performs decoding processing on it, the first video data with an image size of 1280×720 and the second video data with an image size of 2560×1440 are respectively obtained. In this example, the specified image size is 1280×720, the target image size is 2560×1440, and the window size of the specified display window is less than or equal to 1280×720.

[0102] It should be noted that the above-mentioned video stream signal can be a type of digital signal. The video stream signal can be a digital video stream obtained after analog-to-digital conversion of an analog signal, such as a BT656 video stream or a BT1120 video stream. Among them, BT656 defines a parallel hardware interface, which is used to transmit a 4:2:2 YCbCr digital video stream. YCbCr is a type of color space, which is usually used for continuous processing of images in films or in digital photography systems. Y is luminance, and Cb and Cr are the concentration offset components of blue and red. And BT1120 is a digital interface for HDTV (High Definition Television) studio signals, which can encode 4:4:4 and 4:4:2 video data into a video data stream embedded with a synchronous timing reference code. The above-mentioned first video data or second video data can be video data of the YUV (luminance, chrominance, and concentration) type, such as data in the YUV420 format, data in the YUV422 format, etc. Alternatively, the first video data or second video data can also be video data in the RGB (red, green, blue) format. Of course, the first video data or second video data is not limited to the YUV type or the RGB format.

[0103] After the decoding module 201 decodes to obtain the first video data and the second video data, the decoding module 201 can write the first video data into a preset first storage location, and write the second video data into a preset second storage location. Among them, the first storage location can be a first memory area specified in advance. Similarly, the second storage location can be a second memory area specified in advance. The memory area can be a storage area of a memory such as a DDR (Double Data Rate) memory.

[0104] Since the decoding module 201 decodes to obtain two video data streams, and only one video data stream is required for preview display, in the embodiments of the present application, the scaling module 202 needs to select one video data stream from the above first video data and second video data for scaling processing. Specifically, the scaling module 202 can select to read video data from the first storage location or the second storage location based on the difference relationship between the window size of the specified display window and the original image size.

[0105] Among them, the specified display window is a display window configured for the video stream signal and used for preview display. Briefly speaking, this display window is the display window for playing the video data obtained after decoding and scaling the video stream signal. This display window can be a single display window in the single-screen split-screen display window scenario, or one of the multiple display windows in the multi-screen display window scenario. For example, one of the 9 display windows in the 9-screen display window scenario.

[0106] Since the specified display window is the display window finally used to play the video data, the window size of the specified display window is the image size of the video data obtained after the scaling module 202 scales the input video data. For example, if the window size of the specified display window is 1280×720, the image size of the video data obtained after the scaling module 202 scales the input video data should also be 1280×720.

[0107] The original image size is the target image size of the second video data. Therefore, when the difference between the window size of the specified display window and the original image size is small, the scaling module 202 can select the second video data for subsequent processing, that is, the scaling module 202 can read the second video data from the second storage location and perform scaling processing on the second video data to obtain the third video data with an image size matching the window size of the specified display window. When the difference between the window size of the specified display window and the original image size is large, the scaling module 202 can select the first video data for subsequent processing, that is, the scaling module 202 can read the first video data from the first storage location and perform scaling processing on the first video data to obtain the third video data with an image size matching the window size of the specified display window.

[0108] Optionally, the difference relationship between the window size of the specified display window and the original image size can be the difference or ratio between the window size of the specified display window and the original image size.

[0109] If the difference relationship between the window size of the specified display window and the original image size is the difference between the window size of the specified display window and the original image size, since the image size or window size includes two parameters, length and width, the difference between the window size of the specified display window and the original image size can be the first difference between the length of the specified display window and the length of the original image size, or the second difference between the width of the specified display window and the width of the original image size, or the mean, sum, etc. of the first difference and the second difference. Among them, the sum of the first difference and the second difference is the sum of the first difference and the second difference.

[0110] At this time, when the difference between the window size of the specified display window and the original image size is less than the preset difference threshold, the scaling module 202 can read the second video data from the second storage location and perform scaling processing on the second video data to obtain the third video data with an image size matching the window size of the specified display window. Conversely, when the difference between the window size of the specified display window and the original image size is greater than or equal to the preset difference threshold, the scaling module 202 can read the first video data from the first storage location and perform scaling processing on the first video data to obtain the third video data with an image size matching the window size of the specified display window. Among them, the preset difference threshold can be determined based on actual needs and experience.

[0111] If the difference relationship between the window size of the specified display window and the size of the original image is the ratio between the window size of the specified display window and the size of the original image, then the scaling module 202 can determine the first ratio between the window size of the specified display window and the size of the original image. If the first ratio is less than the first proportional threshold, the first video data is read from the first storage location; otherwise, the second video data is read from the second storage location. The first proportional threshold can be determined based on actual requirements and experience, such as 1 / 2, 1 / 4, or 1 / 6, etc.

[0112] The first ratio can be the length ratio between the length of the specified display window and the length of the original image size, or the width ratio between the width of the specified display window and the width of the original image size, or the mean, sum, etc. of the length ratio and the width ratio. The sum of the length ratio and the width ratio is the sum of the length ratio and the width ratio. The preset difference threshold can be determined based on actual requirements and experience.

[0113] After the scaling module 202 reads the video data, it is necessary to convert the read video data into third video data with the same size as the playback window size. In one implementation, if the image size of the read video data matches the window size of the specified display window, the scaling module 202 can use the read video data as the third video data. In this case, it means that the image size of the first video data or the second video data decoded and generated by the decoding module 202 is the same as the window size of the specified display window. At this time, the scaling module 202 can directly use the read video data as the third video data without further scaling processing of the read video data, which can reduce the required performance resources.

[0114] In another implementation, if the image size of the read video data does not match the window size of the specified display window, the scaling module 202 can perform scaling processing on the read video data to obtain third video data with an image size that matches the window size of the specified display window. Since the image size of the read video data does not match the window size of the specified display window, in order to ensure normal display, the scaling module needs to perform further scaling processing on the read video data. In this case, if the image size of the read video data is larger than the window size of the specified display window, compression processing is performed on the read video data to obtain third video data with an image size that matches the window size of the specified display window. Exemplarily, if the image size of the read video data is 1280×720 and the window size of the display window is 720×360, then the scaling module 202 needs to perform compression processing on the read video data to obtain third video data with an image size of 720×360. If the image size of the read video data is smaller than the window size of the specified display window, magnification processing is performed on the read video data to obtain third video data with an image size that matches the window size of the specified display window. Exemplarily, if the image size of the read video data is 1280×720 and the window size of the display window is 2560×1440, then the scaling module 202 needs to perform magnification processing on the read video data to obtain third video data with an image size of 2560×1440.

[0115] Such as Figure 4As shown in the figure, an embodiment of the present application provides a schematic diagram of a scaling module for reading video data. The decoding module 201 decodes to obtain two paths of image data, namely, the first video data with an image size of 1280×720 (specified image size), and the second video data with an image size of 2560×1440 (i.e., the target image size, the original image size). When the specified display window is a single-screen split-screen display window, the window size of the specified display window is 1920×1080, which has a small difference from the original image size (2560×1440). Then, the scaling module 202 can read the second video data from the second storage location, and further scale the second video data into video data with a window size of 1920×1080 for video playback in the single-screen split-screen display window. When the specified display window is a 9-screen split-screen display window, the specified display window is any one of the 9 display windows, and its window size is 640×360, which has a large difference from the original image size (2560×1440). Then, the scaling module 202 can read the first video data with an image size of 1280×720 from the first storage location, and further scale the first video data into video data with a window size of 640×360 for video playback in the 9-screen split-screen display window. Thus, in the scenario of the 9-screen split-screen display window, for the video data required to be played in each display window, the bandwidth occupied by the scaling module is 1280×720 + 640×360, and the consumed performance is the performance required to process the video data with an image size of 1280×720. Compared with the bandwidth of 2560×1440 + 640×360 occupied by the scaling module in the related art and the performance required to process the video data with an image size of 2560×1440, without changing the display effect of the preview display, both the consumed performance and the occupied bandwidth of the scaling module 202 are greatly reduced, thereby reducing the occurrence of stuttering, frame dropping, etc. during preview display and improving the preview display effect.

[0116] In the above solution of the present application, during the preview display process, since the image size of the first video data is smaller than that of the second video data, that is, the data volume of the first video data is smaller than that of the full-size video data, the bandwidth required for the scaling module to read the video data from the first storage location is reduced. Moreover, because the data volume of the first video data is smaller, the performance resources required for the scaling module to process the first video data are less, thereby reducing the occurrence of stuttering, frame dropping, etc. during preview display and improving the preview display effect.

[0117] Optionally, in another embodiment of the present application, the above decoding module 201 is further configured to obtain decoding configuration information for the video stream signal. The decoding configuration information may be an enabling instruction to enable the thumbnail mode of the decoding module 201, and the enabling instruction may be sent by the upper-layer application to the decoding module 201 after determining the split-screen mode for preview display. The decoding configuration information is used to instruct the decoding module 201 to decode to obtain first video data with a specified image size. The decoding configuration information may include size information indicating the specified image size, and the size information may be the specified image size itself, such as 1280×720. In one implementation manner, in order to enable the decoding module to more accurately decode the video stream signal, the above decoding configuration information may include the target compression ratio configured for the video stream signal. In this case, the decoding module 201 may further obtain the target compression ratio for the video stream signal, and then based on the target compression ratio, decode the video stream signal into first video data. This means that after obtaining the target compression ratio, the decoding module 201 may decode the video stream signal according to the target compression ratio, and the image size of the decoded video data is determined by the decoding module 201 based on the obtained target compression ratio and the original image size corresponding to the video stream signal. Specifically, the specified image size is the size obtained by scaling the original image size according to the target compression ratio.

[0118] In one implementation manner, the above target compression ratio may be determined based on a second ratio, and the second ratio may be the ratio between the window size and the original image size. Optionally, the above target compression ratio may be greater than or equal to the second ratio between the window size and the original image size. At this time, under this condition, the target compression ratio can be determined in a variety of implementation manners. Optionally, it includes at least one of the following three manners:

[0119] For the first method of determining the target compression ratio, after determining the second ratio, a ratio greater than or equal to the second ratio may be randomly determined as the target compression ratio. It should be noted that the scaling ratio should always be less than 1, such as 1 / 2, 1 / 3, etc.

[0120] For the second method of determining the target compression ratio, the corresponding relationship between the pre-established proportional threshold interval and the compression ratio may be used to determine the target compression ratio.

[0121] Optionally, the target compression ratio may be the compression ratio corresponding to the target proportional threshold interval determined based on the pre-established corresponding relationship between the proportional threshold interval and the compression ratio, where the target proportional threshold interval is the proportional threshold interval in which the second ratio is located among the multiple pre-divided proportional threshold intervals.

[0122] In this case, multiple ratio threshold intervals can be pre-divided, and then the corresponding relationship between the ratio threshold intervals and the compression ratio can be constructed. After determining the second ratio, the ratio threshold interval where the second ratio is located can be first determined from multiple ratio threshold intervals as the target ratio threshold interval, and then, according to the corresponding relationship between the ratio threshold interval and the compression ratio, the compression ratio corresponding to the target ratio threshold interval can be determined as the target compression ratio.

[0123] The above multiple ratio threshold intervals can be divided according to the number of ratio threshold intervals to be divided. For example, if three ratio threshold intervals need to be divided, the specified threshold range can be divided into three ratio threshold intervals, where the maximum of the specified threshold range is 0 to 1. In another implementation, at least one ratio threshold can be preset, and then multiple ratio threshold intervals can be divided according to at least one ratio threshold. For example, a ratio threshold can be preset in advance, and then, according to this ratio threshold, a ratio threshold interval greater than this ratio threshold and a ratio threshold interval less than or equal to this ratio threshold can be divided. If the second ratio is less than or equal to this ratio threshold, the target compression ratio is determined to be the preset first compression ratio; otherwise, the target compression ratio is determined to be the preset second compression ratio, where the first compression ratio can be less than the second compression ratio. The above multiple ratio thresholds can include: a second ratio threshold and a third ratio threshold, where the second ratio threshold is less than the third ratio threshold. At this time, the multiple ratio threshold intervals include: a ratio threshold interval less than or equal to the second ratio threshold, a ratio threshold interval greater than the second ratio threshold and less than or equal to the third ratio threshold, and a ratio threshold interval greater than the third ratio threshold.

[0124] After obtaining multiple ratio threshold intervals, it is necessary to construct the corresponding relationship between the ratio threshold intervals and the compression ratio. In one implementation, in the corresponding relationship between the ratio threshold interval and the compression ratio, the compression ratio corresponding to each ratio threshold interval is: the ratio threshold greater than the minimum ratio threshold of this ratio threshold interval and less than or equal to the maximum ratio threshold of this ratio threshold interval. Taking the multiple ratio threshold intervals divided based on the second ratio threshold and the third ratio threshold as an example above, the compression ratio corresponding to the ratio threshold interval less than or equal to the second ratio threshold can be the second ratio threshold, such as 1 / 4; the compression ratio corresponding to the ratio threshold interval greater than the second ratio threshold and less than or equal to the third ratio threshold can be the third ratio threshold, such as 1 / 3; the compression ratio corresponding to the ratio threshold interval greater than the third ratio threshold can be the ratio threshold greater than the third ratio threshold, such as 1 / 2.

[0125] Since the division of the proportional threshold interval is determined by the proportional thresholds at its endpoints, in this case, for the convenience of calculation, the target compression ratio can also be determined by comparing the second ratio with the proportional thresholds at the endpoints of the proportional threshold interval. For example, for the multiple proportional threshold intervals divided based on the second proportional threshold and the third proportional threshold, for the convenience of calculation, only the magnitude relationship between the second ratio and the second proportional threshold and the third proportional threshold needs to be determined, and then the corresponding compression ratio can be determined. At this time, after the second ratio is determined, if the second ratio is less than the second proportional threshold, the target compression ratio is the second proportional threshold; if the second ratio is greater than or equal to the second proportional threshold and less than the third proportional threshold, the target compression ratio is the third proportional threshold; if the second ratio is greater than or equal to the third proportional threshold, the target compression ratio is the proportional threshold greater than the third proportional threshold. In this case, to further reduce the calculation amount, after the second ratio is determined, the magnitude relationship between the second ratio and the second proportional threshold can be judged first. If the second ratio is less than the second proportional threshold, the target compression ratio is determined to be the second proportional threshold; if the second ratio is greater than or equal to the second proportional threshold, the magnitude relationship between the second ratio and the third proportional threshold can be judged. If the second ratio is less than the third proportional threshold, the target compression ratio is determined to be the third proportional threshold; if the second ratio is greater than or equal to the third proportional threshold, the target compression ratio is determined to be the proportional threshold greater than the third proportional threshold. The proportional threshold greater than the third proportional threshold can be a preset proportional threshold greater than the third proportional threshold. For example, if the third proportional threshold is 1 / 3, the proportional threshold greater than the third proportional threshold can be 1 / 2.

[0126] In one implementation, to save the performance and bandwidth resources of the decoding module 201, the above-mentioned target compression ratio can be obtained when the specified display window meets the specified conditions, and the specified conditions can include at least one of the following two conditions:

[0127] The first condition is that the specified display window is a small-size display window, where the small-size display window is a display window whose third ratio to the window size of the full-screen window is less than the fourth proportional threshold;

[0128] Briefly, in order to ensure the picture quality of the video data played in the display window during the final preview display and avoid deviations in certain specific scenarios when the scaling module 202 selects the first video data and the second video data, the upper-layer application can configure the decoding configuration information only when the third ratio of the window size of the specified display window to the window size of the full-screen window is less than the fourth ratio threshold. This means that the decoding module 201 can obtain the target compression ratio only when the specified display window is a small-size display window. When the third ratio of the window size of the specified display window to the window size of the full-screen window is not less than the fourth ratio threshold, the decoding configuration information may not be configured, which means that the decoding module 201 will not enable the small-picture mode when the specified display window is not a small-size display window. Furthermore, the decoding module 201 only needs to decode and generate the second video data, without generating the first video data. Among them, the above-mentioned fourth ratio threshold can be determined based on the actual scenario and requirements, for example, it can be 1 / 4, 1 / 6, etc.

[0129] The above-mentioned specific scenarios can be single-screen, 2-screen, 4-screen, 6-screen large-window, and 8-screen large-window scenarios. Among them, single-screen, 2-screen, 4-screen, 6-screen, and 8-screen refer to the split-screen modes of the display, which indicate the number of display windows included in the display. Single-screen means only one display window is included, 2-screen means 2 display windows are included, 4-screen means 4 display windows are included, 6-screen means 6 display windows are included, and 8-screen means 8 display windows are included. As Figure 5a shown, the embodiment of the present application provides a schematic diagram of a 6-screen split screen. Among the 6 display windows, there is a display window with a relatively large window size, which is the 6-screen large window. As Figure 5b shown, the embodiment of the present application provides a schematic diagram of an 8-screen split screen. Among the 8 display windows, there is a display window with a relatively large window size, which is the 8-screen large window.

[0130] In the above-mentioned specific scenario, a deviation occurs. The original image size is 2560×1440, the window size of the specified display window is 1552×934, and the specified image size is 1280×720. At this time, the picture quality of the video data obtained by scaling the first video data is not as good as that of the video data obtained by scaling the second video data. Therefore, in the above-mentioned specific scenario, in order to ensure the picture quality, the decoding module 201 can refrain from decoding and generating the first video data and only decode and generate the second video data.

[0131] The second condition is that the specified display window is a display window of a specified size;

[0132] Among them, the specified size can be determined according to its own needs and scenarios. For example, it can be 2560×1440, 1552×934, etc. This means that when the specified display window is a display window of 2560×1440 or 1552×934, there is no need to obtain the target compression ratio. When the specified display window is not a display window of 2560×1440 or 1552×934, the target compression ratio can be obtained. By specifying the size in this way, it is possible to more quickly determine whether to enable the small picture mode of the decoding module 201, that is, to decode and generate the first video data.

[0133] It should be emphasized that in the embodiments of the present application, the decoding module 201 can obtain the target compression ratio when at least one of the above two conditions is satisfied.

[0134] As Figure 6 shown, the embodiments of the present application provide a video data processing method, including steps S601 - S604, where:

[0135] S601, after receiving the video stream signal, use the video stream signal to decode and generate the first video data and the second video data.

[0136] Among them, the first video data is video data with a specified image size, and the second video data is video data with a target image size. The specified image size is smaller than the target image size, and the target image size is the original image size corresponding to the video stream signal. The above - mentioned specified image size can be larger than the window size of the specified display window.

[0137] S602, based on the difference relationship between the window size of the specified display window and the original image size, determine the target video data from the first video data and the second video data;

[0138] In one implementation, the first ratio of the window size of the specified display window to the original image size can be determined; if the first ratio is less than the first proportional threshold, determine the first video data as the target video data, and vice versa, determine the second video data as the target video data.

[0139] S603, based on the target video data, determine the third video data whose image size matches the window size of the specified display window, where the specified display window is a display window configured for the video stream signal and used for preview display;

[0140] In one implementation, if the image size of the target video data matches the window size of the specified display window, the target video data is used as the third video data; if the image size of the target video data does not match the window size of the specified display window, the target video data is scaled to obtain the third video data whose image size matches the window size of the specified display window.

[0141] In one implementation, the situation where the image size of the target video data does not match the window size of the specified display window includes two cases: the image size of the target video data is larger than the window size of the specified display window, or the image size of the target video data is smaller than the window size of the specified display window. If the image size of the target video data is larger than the window size of the specified display window, the target video data is compressed to obtain the third video data whose image size matches the window size of the specified display window; if the image size of the target video data is smaller than the window size of the specified display window, the target video data is enlarged to obtain the third video data whose image size matches the window size of the specified display window.

[0142] S604, Write the third video data to the third storage location, where the third storage location is the storage location for storing the video data to be displayed in the specified display window.

[0143] In the above solution of the present application, during the preview display process, the first video data and the second video data can be decoded from the video stream signal at the same time, and at the same time, based on the difference relationship between the window size of the specified display window and the original image size, one of the first video data and the second video data can be dynamically selected as the video data for subsequent scaling. In this way, when the first video data is selected, since the image size of the first video data is smaller than the image size of the second video data, that is, the data volume of the first video data is smaller than that of the full-size video data, the performance resources required for processing the first video data are reduced, so that situations such as stuttering and frame dropping during preview display can be reduced, and the preview display effect is improved.

[0144] In one embodiment, the embodiment of the present application provides another video data processing method. Before decoding the video stream signal to generate the first video data, the target compression ratio for the video stream signal can also be obtained. At this time, the above-mentioned decoding of the video stream signal to generate the first video data may include:

[0145] Decode the video stream signal into the first video data based on the target compression ratio.

[0146] The above target compression ratio is determined based on the second ratio, where the second ratio is the ratio between the window size and the size of the original image. In one implementation, the target compression ratio is the compression ratio corresponding to the target ratio threshold range determined based on the pre-established correspondence between the ratio threshold ranges and the compression ratios, and the target ratio threshold range is the ratio threshold range in which the second ratio is located among multiple pre-divided ratio threshold ranges. In the correspondence between the ratio threshold ranges and the compression ratios, the compression ratio corresponding to each ratio threshold range is: a ratio threshold greater than the minimum ratio threshold of the ratio threshold range and less than or equal to the maximum ratio threshold of the ratio threshold range.

[0147] In one implementation, the above multiple ratio threshold ranges may include: a ratio threshold range less than or equal to the second ratio threshold; a ratio threshold range greater than the second ratio threshold and less than or equal to the third ratio threshold, where the second ratio threshold is less than the third ratio threshold; and a ratio threshold range greater than the third ratio threshold.

[0148] In one implementation, the above target compression ratio is obtained when a specified display window meets specified conditions; where the specified conditions include: the specified display window is a small-size display window, where the small-size display window is a display window whose third ratio to the window size of the full-screen window is less than the fourth ratio threshold; and / or, the specified display window is a display window of a specified size.

[0149] In the above solution of the present application, the preview display effect can be improved. At the same time, by obtaining the target compression ratio, the video stream signal can be decoded into the first video data based on the target compression ratio, thereby providing an implementation basis for improving the preview display effect in the embodiments of the present application.

[0150] For the specific implementation manners and related introductions of the above steps, reference may be made to the above system embodiments, which will not be elaborated here.

[0151] Corresponding to the video data processing method provided in the above embodiments of the present application, as Figure 7 shown, an embodiment of the present application further provides a video data processing device, and the device includes:

[0152] A data decoding module 701, configured to, after receiving a video stream signal, use the video stream signal to decode and generate first video data and second video data, where the first video data is video data with a specified image size, the second video data is video data with a target image size, the specified image size is smaller than the target image size, and the target image size is the size of the original image corresponding to the video stream signal;

[0153] A data determination module 702, configured to determine target video data from the first video data and the second video data based on a difference relationship between a window size of a specified display window and the size of the original image;

[0154] A data scaling module 703, configured to determine third video data whose image size matches the window size of the specified display window based on the target video data, where the specified display window is a display window configured for preview display for the video stream signal;

[0155] A data writing module 704, configured to write the third video data to a third storage location, where the third storage location is a storage location for storing video data to be displayed in the specified display window.

[0156] Optionally, the data scaling module is specifically configured to determine a first ratio between the window size of the specified display window and the size of the original image; if the first ratio is less than a first ratio threshold, determine the first video data as the target video data, and vice versa, determine the second video data as the target video data.

[0157] Optionally, the data decoding module is further configured to obtain a target compression multiple for the video stream signal before decoding the video stream signal to generate the first video data;

[0158] The data decoding module is specifically configured to decode the video stream signal into the first video data based on the target compression multiple.

[0159] Optionally, the target compression multiple is determined based on a second ratio, and the second ratio is the ratio between the window size and the size of the original image.

[0160] Optionally, the target compression multiple is a compression multiple corresponding to a target ratio threshold interval determined based on a corresponding relationship between a pre-established ratio threshold interval and a compression multiple; the target ratio threshold interval is the ratio threshold interval in which the second ratio is located among multiple pre-divided ratio threshold intervals.

[0161] Optionally, in the corresponding relationship between the ratio threshold interval and the compression multiple, the compression multiple corresponding to each ratio threshold interval is: a ratio threshold greater than the minimum ratio threshold of the ratio threshold interval and less than or equal to the maximum ratio threshold of the ratio threshold interval.

[0162] Optionally, the multiple ratio threshold intervals include: a ratio threshold interval less than or equal to a second ratio threshold; a ratio threshold interval greater than the second ratio threshold and less than or equal to a third ratio threshold, where the second ratio threshold is less than the third ratio threshold; and a ratio threshold interval greater than the third ratio threshold.

[0163] Optionally, the target compression ratio is obtained when the specified display window meets specified conditions; where the specified conditions include: the specified display window is a small-size display window, where the small-size display window is a display window whose third ratio to the window size of the full-screen window is less than a fourth ratio threshold; and / or, the specified display window is a display window of a specified size.

[0164] Optionally, the data scaling module includes:

[0165] A first processing sub-module, configured to use the target video data as third video data if the image size of the target video data matches the window size of the specified display window;

[0166] A second processing sub-module, configured to perform scaling processing on the target video data to obtain third video data whose image size matches the window size of the specified display window if the image size of the target video data does not match the window size of the specified display window.

[0167] Optionally, the second processing sub-module is specifically configured to perform compression processing on the target video data to obtain third video data whose image size matches the window size of the specified display window if the image size of the target video data is greater than the window size of the specified display window; and perform enlargement processing on the target video data to obtain third video data whose image size matches the window size of the specified display window if the image size of the target video data is less than the window size of the specified display window.

[0168] In the above solution of this application, during the preview display process, the image size of the first video data is smaller than the image size of the second video data, that is, the data volume of the first video data is smaller than that of the full-size video data, thereby reducing the performance resources required for processing the first video data, and thus reducing situations such as stuttering and frame dropping during preview display, and improving the preview display effect.

[0169] An embodiment of this application further provides a video recorder, as Figure 8 shown, including a processor 801 and a machine-readable storage medium 802, where the machine-readable storage medium 802 stores machine-executable instructions that can be executed by the processor 801, and the processor 801 is prompted by the machine-executable instructions to implement the following steps:

[0170] After receiving the video stream signal, use the video stream signal to decode and generate first video data and second video data, where the first video data is video data with a specified image size, the second video data is video data with a target image size, the specified image size is smaller than the target image size, and the target image size is the original image size corresponding to the video stream signal;

[0171] Based on the difference relationship between the window size of the specified display window and the original image size, determine target video data from the first video data and the second video data;

[0172] Based on the target video data, determine third video data whose image size matches the window size of the specified display window, where the specified display window is a display window configured for the video stream signal and used for preview display;

[0173] Write the third video data to a third storage location, where the third storage location is a storage location for storing the video data to be displayed in the specified display window.

[0174] The memory may include a Random Access Memory (RAM), or may also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the aforementioned processor.

[0175] The above-mentioned processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0176] In another embodiment provided by the present application, a computer-readable storage medium is further provided, and a computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the steps of any of the above video data processing methods are implemented.

[0177] In another embodiment provided by the present application, a computer program product including instructions is further provided. When it runs on a computer, it causes the computer to execute any one of the video data processing methods in the above embodiments.

[0178] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)).

[0179] It should be noted that in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including", or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, article, or device including a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article, or device including the element.

[0180] Each embodiment in this specification is described in a related manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the method, device, computer-readable storage medium, and computer program product, since they are basically similar to the video recorder embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0181] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are all included in the protection scope of the present application.

Claims

1. A video recorder, characterized in that, The video recorder includes a decoding module and a scaling module; The decoding module is configured to, after receiving a video stream signal, use the video stream signal to decode and generate first video data and second video data, write the first video data into a preset first storage location, and write the second video data into a preset second storage location; wherein, the first video data is video data with a specified image size, the second video data is video data with a target image size, the specified image size is smaller than the target image size, and the target image size is the original image size corresponding to the video stream signal; The scaling module is configured to select to read video data from the first storage location or the second storage location based on the difference relationship between the window size of a specified display window and the original image size, wherein the specified display window is a display window configured for the video stream signal and used for preview display; if the image size of the read video data matches the window size of the specified display window, then use the read video data as third video data; if the image size of the read video data does not match the window size of the specified display window, perform scaling processing on the read video data to obtain third video data with an image size that matches the window size of the specified display window; write the third video data into a third storage location, wherein the third storage location is a storage location for storing the video data to be displayed in the specified display window; the difference relationship between the window size of the specified display window and the original image size is the difference or ratio between the window size of the specified display window and the original image size.

2. The video recorder according to claim 1, characterized in that, The scaling module selects to read video data from the first storage location or the second storage location based on the difference relationship between the window size of a specified display window and the original image size, including: Determine a first ratio of the window size of the specified display window to the original image size; If the first ratio is less than a first ratio threshold, then read the first video data from the first storage location, otherwise, read the second video data from the second storage location.

3. The video recorder according to claim 1 or 2, characterized in that, The decoding module is further configured to obtain a target compression ratio for the video stream signal; The decoding module is specifically configured to decode the video stream signal into first video data based on the target compression ratio.

4. The video recorder according to claim 3, characterized in that, The target compression ratio is determined based on a second ratio, and the second ratio is the ratio between the window size and the original image size.

5. The video recorder according to claim 4, characterized in that, The target compression ratio is the compression ratio corresponding to a target ratio threshold interval determined based on the corresponding relationship between a pre-established ratio threshold interval and the compression ratio; the target ratio threshold interval is the ratio threshold interval in which the second ratio is located among multiple pre-divided ratio threshold intervals.

6. The video recorder according to claim 5, characterized in that, In the correspondence between the proportional threshold intervals and the compression multiples, the compression multiple corresponding to each proportional threshold interval is: a proportional threshold that is greater than the minimum proportional threshold of the proportional threshold interval and less than or equal to the maximum proportional threshold of the proportional threshold interval.

7. The video recorder according to claim 5 or 6, characterized in that, The multiple proportional threshold intervals include: A proportional threshold interval that is less than or equal to the second proportional threshold; A proportional threshold interval that is greater than the second proportional threshold and less than or equal to the third proportional threshold, where the second proportional threshold is less than the third proportional threshold; A proportional threshold interval that is greater than the third proportional threshold.

8. The video recorder according to claim 3, characterized in that, The target compression multiple is obtained when the specified display window meets the specified conditions; Among them, the specified conditions include: The specified display window is a small-size display window, where the small-size display window is a display window whose third ratio of the window size to the full-screen window size is less than the fourth proportional threshold; and / or, The specified display window is a display window with a specified size.

9. The video recorder according to claim 1, characterized in that, If the image size of the read video data does not match the window size of the specified display window, performing a scaling process on the read video data to obtain third video data with an image size that matches the window size of the specified display window includes: If the image size of the read video data is greater than the window size of the specified display window, performing a compression process on the read video data to obtain third video data with an image size that matches the window size of the specified display window; If the image size of the read video data is less than the window size of the specified display window, performing an enlargement process on the read video data to obtain third video data with an image size that matches the window size of the specified display window.

10. A video data processing method, characterized in that, The method includes: After receiving a video stream signal, using the video stream signal to decode and generate first video data and second video data, where the first video data is video data with a specified image size, the second video data is video data with a target image size, the specified image size is less than the target image size, and the target image size is the original image size corresponding to the video stream signal; Based on the difference relationship between the window size of the specified display window and the original image size, determining target video data from the first video data and the second video data; where the difference relationship between the window size of the specified display window and the original image size is the difference or ratio between the window size of the specified display window and the original image size; If the image size of the target video data matches the window size of the specified display window, then using the target video data as the third video data; if the image size of the target video data does not match the window size of the specified display window, performing a scaling process on the target video data to obtain third video data with an image size that matches the window size of the specified display window, where the specified display window is a display window configured for the video stream signal and used for preview display; Write the third video data to a third storage location, where the third storage location is a storage location for storing video data to be displayed in the specified display window.

11. The method according to claim 10, wherein The determining of the target video data from the first video data and the second video data based on the difference relationship between the window size of the specified display window and the size of the original image includes: Determine a first ratio of the window size of the specified display window to the size of the original image; If the first ratio is less than a first ratio threshold, determine the first video data as the target video data; otherwise, determine the second video data as the target video data; And / or, before decoding the video stream signal to generate the first video data, the method further includes: Obtain a target compression ratio for the video stream signal; The decoding of the video stream signal to generate the first video data includes: Decoding the video stream signal into the first video data based on the target compression ratio; And / or, the target compression ratio is determined based on a second ratio, where the second ratio is the ratio between the window size and the size of the original image; And / or, the target compression ratio is a compression ratio corresponding to a target ratio threshold range determined based on a pre-established correspondence between ratio threshold ranges and compression ratios; the target ratio threshold range is the ratio threshold range in which the second ratio is located among multiple pre-divided ratio threshold ranges; And / or, in the correspondence between the ratio threshold ranges and the compression ratios, the compression ratio corresponding to each ratio threshold range is: a ratio threshold greater than the minimum ratio threshold of the ratio threshold range and less than or equal to the maximum ratio threshold of the ratio threshold range; And / or, the multiple ratio threshold ranges include: A ratio threshold range less than or equal to a second ratio threshold; A ratio threshold range greater than the second ratio threshold and less than or equal to a third ratio threshold, where the second ratio threshold is less than the third ratio threshold; A ratio threshold range greater than the third ratio threshold; And / or, the target compression ratio is obtained when the specified display window meets a specified condition; Wherein, the specified condition includes: The specified display window is a small-size display window, where the small-size display window is a display window whose third ratio to the window size of the full-screen window is less than a fourth ratio threshold; and / or, The specified display window is a display window of a specified size; And / or, the determining of the third video data whose image size matches the window size of the specified display window based on the target video data includes: If the image size of the target video data matches the window size of the specified display window, use the target video data as the third video data; If the image size of the target video data does not match the window size of the specified display window, perform a scaling process on the target video data to obtain the third video data whose image size matches the window size of the specified display window; And / or, if the image size of the target video data does not match the window size of the specified display window, performing a scaling process on the target video data to obtain third video data whose image size matches the window size of the specified display window, including: If the image size of the target video data is larger than the window size of the specified display window, performing a compression process on the target video data to obtain third video data whose image size matches the window size of the specified display window; If the image size of the target video data is smaller than the window size of the specified display window, performing an enlargement process on the target video data to obtain third video data whose image size matches the window size of the specified display window.

12. A video data processing device, characterized in that, The device includes: A data decoding module, configured to, after receiving a video stream signal, use the video stream signal to decode and generate first video data and second video data, where the first video data is video data with a specified image size, the second video data is video data with a target image size, the specified image size is smaller than the target image size, and the target image size is the original image size corresponding to the video stream signal; A data determination module, configured to determine target video data from the first video data and the second video data based on the difference relationship between the window size of the specified display window and the original image size; where the difference relationship between the window size of the specified display window and the original image size is the difference or ratio between the window size of the specified display window and the original image size; A data scaling module, configured to, if the image size of the target video data matches the window size of the specified display window, use the target video data as the third video data; if the image size of the target video data does not match the window size of the specified display window, perform a scaling process on the target video data to obtain third video data whose image size matches the window size of the specified display window, where the specified display window is a display window configured for the video stream signal and used for preview display; A data writing module, configured to write the third video data into a third storage location, where the third storage location is a storage location for storing the video data to be displayed in the specified display window.

13. A video recorder, characterized in that, Comprising a processor and a machine-readable storage medium, the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor is urged by the machine-executable instructions to: implement the method steps of any one of claims 10-11.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the method steps of any one of claims 10-11.

Citation Information

Patent Citations

  • Network video recorder data processing method and system

    CN106231225A

  • Image display method and device, storage medium and electronic device

    CN108737882A

  • Method for adjusting image transmission resolution, image shooting device, machine-readable storage medium

    CN110832539A