Dynamic adjustment method and device of video resolution, equipment and storage medium
By downsampling and padding the original video and writing effective display area information during the encoding process, the problems of stuttering and high complexity caused by video resolution adjustment in the existing technology are solved, realizing dynamic adjustment of video resolution and improving the smoothness and picture quality of streaming media.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-24
- Publication Date
- 2026-04-07
AI Technical Summary
Existing technologies for adjusting video resolution without modifying sequence header parameters suffer from issues such as video stuttering, high system complexity, and difficult deployment, especially in ultra-low bitrate scenarios where it is difficult to maintain image quality and smoothness.
By downsampling the original video and filling it into the target screen, and writing effective display area information, including cropping indicators and cropping parameters, during the encoding process, dynamic adjustment of video resolution is achieved.
Without modifying the sequence header parameters, dynamic adjustment of video resolution was achieved, solving the video stuttering problem, improving the smoothness and image quality of streaming media in ultra-low bitrate scenarios, and reducing the complexity of system implementation.
Smart Images

Figure CN121814957A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of video encoding and transmission, and in particular to a method, apparatus, device and storage medium for dynamically adjusting video resolution. Background Technology
[0002] In real-time streaming media transmission systems, network congestion directly leads to packet loss, spiked latency, and increased jitter, severely damaging the user experience (such as stuttering, screen tearing, and audio-visual asynchrony). In this situation, dynamically reducing the bitrate, frame rate, or resolution by the encoder is not only an optimization strategy but also a core mechanism for maintaining system availability and quality of service.
[0003] In ultra-low bitrate scenarios (such as below 1Mbps), if high resolution is forcibly maintained, the number of bits per pixel will be reduced to an insufficient level to meet the basic image quality requirements at the current resolution. At this point, the encoder, due to extreme bit resource scarcity, will significantly discard high-frequency information and texture details, resulting in large areas of blurring. Therefore, actively reducing resolution is a common method for reconstructing the balance between bitrate and image quality. Existing streaming media transmission systems, such as WebRTC and Alibaba Cloud Narrowband HD, employ strategies for actively reducing resolution. Currently, the main methods for changing video resolution include: modifying sequence header parameters, but this method triggers codec reset, causing video stuttering; scalable video coding, which achieves resolution switching through layered coding, but requires special codec support, making implementation complex and deployment costly; reference image resampling (RPR / ARC), such as VVC, which supports switching resolution without sending IDR / IRAP frames, but requires complex resampling operations within the codec loop and support for scaling parameters such as motion vectors, resulting in high system implementation complexity; and entry point resolution signaling, which requires modification of the standard syntax structure and is difficult to deploy.
[0004] Therefore, how to adjust the video resolution without modifying the sequence header parameters is a problem that urgently needs to be solved. Summary of the Invention
[0005] The main objective of this application is to provide a method, apparatus, device, and storage medium for dynamically adjusting video resolution, aiming to solve the technical problem of adjusting video resolution without modifying sequence header parameters.
[0006] To achieve the above objectives, this application proposes a method for dynamically adjusting video resolution, the method comprising: The original video is acquired, and the original video is downsampled to obtain a downsampled video; The downsampled video is filled into a target frame with the same resolution as the original video to obtain the filled target video; According to a preset modification strategy, effective display area information is written into the target video, and the effective display area information includes cropping indicator and cropping parameters. The decoded target video is cropped and displayed based on the effective display area information.
[0007] In one embodiment, the step of writing valid display area information into the target video according to a preset modification strategy includes: Match the corresponding preset modification strategy according to the encoding standard of the target video; When the preset modification strategy is the first modification strategy, the cropping indicator and the cropping parameters are written into the frame header information of the intra-coded frame of the target video; When the preset modification strategy is the second modification strategy, the cropping indicator and the cropping parameters are written into the sequence display extension after the sequence header and the image display extension after the image header of the target video; When the preset modification strategy is the third modification strategy, the cropping indicator and the cropping parameters are written into the frame cropping display extension after the image header of the target video.
[0008] In one embodiment, the step of downsampling the original video to obtain a downsampled video includes: The target bitrate, frame rate, and display resolution in pixels are determined based on the original video. The number of bits occupied by each pixel in the original video is calculated based on the target bitrate, the frame rate, and the number of pixels at the display resolution. The minimum number of bits occupied by each pixel is determined based on the spatiotemporal complexity of the original video, where the spatiotemporal complexity includes time complexity and space complexity. The target downsampling ratio is determined based on the number of bits occupied by each pixel and the minimum number of bits occupied by each pixel threshold. The original video is downsampled according to the target downsampling ratio to obtain a downsampled video.
[0009] In one embodiment, the step of determining the minimum number of bits per pixel threshold based on the spatiotemporal complexity of the original video includes: The edge energy is calculated based on the luminance channel of the original video to obtain the space complexity; The time complexity is obtained by performing differential energy calculation on adjacent frames of the original video. The space complexity is compared with a preset space complexity threshold, and the time complexity is compared with a preset time complexity threshold to obtain the comparison result; The complexity level of the original video is determined based on the comparison results; The minimum number of bits occupied by each pixel is obtained by matching the preset minimum bit count threshold table for each pixel according to the complexity level.
[0010] In one embodiment, the step of downsampling the original video according to the target downsampling ratio to obtain a downsampled video includes: The original video is divided into blocks to obtain basic blocks; Text region detection and detail region detection are performed on the basic block to obtain text attribute information and detail attribute information; The region type of the basic block is determined based on the text attribute information and the detail attribute information. The region type includes text region, detail region, and background region. The corresponding downsampling filtering strategy is matched according to the region type of the basic block, and the original video is downsampled according to the downsampling filtering strategy and the target downsampling ratio to obtain the downsampled video.
[0011] In one embodiment, the step of determining the region type of the basic block based on the text attribute information and the detail attribute information includes: The text score of the basic block is calculated based on the preset text attribute weights and the stroke width consistency, edge density, contrast, aspect ratio and arrangement consistency in the text attribute information. The detail score of the basic block is calculated based on the preset detail attribute weights and the Laplacian operator variance, local entropy, and gradient energy in the detail attribute information. When the text score is greater than or equal to a preset text score threshold, the region type of the basic block is marked as a text region; When the detail score is greater than or equal to a preset detail score threshold, the region type of the basic block is marked as a detail region; When the text score is less than a preset text score threshold and the detail score is less than a preset detail score threshold, the region type of the basic block is marked as a background region.
[0012] In one embodiment, after the step of writing the effective display area information into the target video according to a preset modification strategy, the method further includes: Based on the effective display area information, determine the invalid display area in the target video; A decoding marker is added to the invalid display area so that the decoding end skips the decoding process for that area when it parses the decoding marker.
[0013] Furthermore, to achieve the above objectives, this application also proposes a dynamic adjustment device for video resolution, the device comprising: The video sampling module is used to acquire the original video and perform downsampling processing on the original video to obtain the downsampled video; The screen filling module is used to fill the downsampled video into a target screen with the same resolution as the original video, so as to obtain the filled target video; The display configuration module is used to write effective display area information into the target video according to a preset modification strategy. The effective display area information includes cropping indicator and cropping parameters. The cropping and display module is used to crop and display the decoded target video according to the effective display area information.
[0014] Furthermore, to achieve the above objectives, this application also proposes a dynamic adjustment device for video resolution, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the dynamic adjustment method for video resolution as described above.
[0015] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the dynamic adjustment method for video resolution as described above.
[0016] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the dynamic adjustment method for video resolution as described above.
[0017] This application provides a method for dynamically adjusting video resolution. The method includes: acquiring an original video and downsampling the original video to obtain a downsampled video; filling the downsampled video into a target frame with the same resolution as the original video to obtain a filled target video; writing effective display area information into the target video according to a preset modification strategy, the effective display area information including a cropping indicator and cropping parameters; and cropping and displaying the decoded target video according to the effective display area information. In summary, this application, by keeping the sequence header resolution parameters unchanged, only performing downsampling and filling on the original video, while simultaneously transmitting effective display area information in the bitstream, achieves an equivalent change in display resolution during the encoding process, realizing dynamic and smooth adjustment of the video stream. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A flowchart illustrating the first embodiment of the video resolution dynamic adjustment method of this application; Figure 2 This is a schematic diagram of a scene with downsampling filling in one embodiment of the dynamic adjustment method for video resolution of this application; Figure 3 This is a schematic diagram illustrating the addition of syntax elements to the image header in one embodiment of the video resolution dynamic adjustment method of this application; Figure 4 This is a schematic diagram illustrating the relationship between offset and the original AVS resolution in one embodiment of the video resolution dynamic adjustment method of this application. Figure 5 This is a schematic diagram of the overall process of the dynamic adjustment method for video resolution in this application; Figure 6 A flowchart illustrating the second embodiment of the video resolution dynamic adjustment method of this application; Figure 7 A flowchart illustrating the third embodiment of the video resolution dynamic adjustment method of this application; Figure 8 This is a schematic diagram of the module structure of the dynamic adjustment device for video resolution according to an embodiment of this application; Figure 9 This is a schematic diagram of the device structure of the hardware operating environment involved in the dynamic adjustment method of video resolution in the embodiments of this application.
[0021] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0022] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0023] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0024] The main solution of this application embodiment is as follows: acquire the original video and downsample the original video to obtain a downsampled video; fill the downsampled video into a target screen with the same resolution as the original video to obtain a filled target video; write effective display area information into the target video according to a preset modification strategy, the effective display area information including a cropping indicator and cropping parameters; and crop and display the decoded target video according to the effective display area information.
[0025] In real-time streaming media transmission systems, network congestion directly leads to packet loss, spiked latency, and increased jitter, severely damaging the user experience (such as stuttering, screen tearing, and audio-visual asynchrony). In this situation, dynamically reducing the bitrate, frame rate, or resolution by the encoder is not only an optimization strategy but also a core mechanism for maintaining system availability and quality of service.
[0026] In ultra-low bitrate scenarios, if high resolution is forcibly maintained, the number of bits per pixel will be reduced to an insufficient level to meet the basic image quality requirements at the current resolution. At this point, the encoder, due to extreme bit resource scarcity, will significantly discard high-frequency information and texture details, resulting in large areas of blurring. Therefore, actively reducing resolution is a common method for reconstructing the balance between bitrate and image quality. Existing streaming media transmission systems, such as WebRTC and Alibaba Cloud Narrowband HD, employ strategies for actively reducing resolution. Currently, the main methods for changing video resolution include: modifying sequence header parameters, but this method triggers codec reset, causing video stuttering; scalable video coding, which achieves resolution switching through layered coding, but requires special codec support, making implementation complex and deployment costly; reference image resampling, such as VVC which supports switching resolution without sending IDR / IRAP frames, but requires complex resampling operations within the codec loop and support for scaling parameters such as motion vectors, resulting in high system implementation complexity; and entry point resolution signaling, which requires modification of the standard syntax structure and is difficult to deploy. Therefore, how to adjust video resolution without modifying sequence header parameters is a problem that urgently needs to be solved.
[0027] It should be noted that the executing entity in this embodiment can be a dynamic video resolution adjustment system, a computing service device with data processing, network communication, and program execution functions, or an electronic device capable of realizing the aforementioned dynamic video resolution adjustment function, etc. This embodiment does not specifically limit it in this way. The following uses a dynamic video resolution adjustment system as an example to describe this embodiment and the following embodiments.
[0028] Based on this, embodiments of this application provide a method for dynamically adjusting video resolution, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the video resolution dynamic adjustment method of this application.
[0029] In this embodiment, the dynamic adjustment method for video resolution includes steps S10 to S40: Step S10: Obtain the original video and perform downsampling processing on the original video to obtain a downsampled video.
[0030] It should be noted that when the system detects the need to reduce resolution (e.g., due to decreased network bandwidth or entering an ultra-low bitrate scenario), the system's encoding end acquires the original high-resolution video stream. Subsequently, the original video is downsampled using image processing algorithms. For example, the downsampling process can employ methods such as bilinear interpolation, bicubic interpolation, or Lanczos resampling to convert the original high-resolution video (e.g., 1920x1080) into a lower-resolution video (e.g., 960x540) by a preset ratio (e.g., reducing the width and height to half).
[0031] Step S20: Fill the downsampled video into a target frame with the same resolution as the original video to obtain the filled target video.
[0032] It should be noted that in this step, the system places the downsampled video frames in a blank frame of the exact same size and resolution as the original video, according to preset positions (e.g., top left corner, center, etc.). The remaining portion of the video frame, excluding the downsampled video area, is then filled with solid color data (e.g., pure black or pure white). Specifically... Figure 2 As shown, where Figure 2 (a) is the image sequence of the original video. Figure 2 (b) is the image sequence after downsampling.
[0033] Additionally, it should be noted that the target image is a virtual canvas with the same size as the original video frame (e.g., 1920x1080). After placing the 960x540 downsampled video in the upper left corner of this canvas, the remaining areas of the canvas (e.g., the right and bottom) are filled with pure black, thus generating a target video that is nominally still 1920x1080, but whose actual effective image is only the 960x540 area in the upper left corner.
[0034] Step S30: Write effective display area information into the target video according to a preset modification strategy. The effective display area information includes cropping indicator and cropping parameters.
[0035] It's important to note that, in order to inform the system's decoding end how to extract the actual effective display area from the decoded complete image, information describing the location and size of this effective area—i.e., effective display area information—needs to be embedded in the encoded bitstream. This information includes at least a flag indicating the presence of cropping information (such as `frame_cropping_flag`) and specific cropping parameters (such as offset, width, and height). Understandably, the system will choose different strategies (or syntax positions) to write this information based on the video encoding standard used and the implementation complexity. For example, for standards that support syntax extensions, size information can be written in the sequence display extension, and position information in the image display extension, thus eliminating the need for additional dedicated syntax elements.
[0036] In one feasible implementation, step S30 specifically includes: Step S301: Match the corresponding preset modification strategy according to the encoding standard of the target video.
[0037] It should be noted that in this step, the system first identifies the video encoding standard followed by the target video (such as AVS3, H.265 / HEVC, etc.), and selects the most suitable strategy from a variety of predefined strategies to write the valid display area information based on the syntax structure and extension mechanisms supported by the standard. Understandably, different video encoding standards have different syntax structures (such as sequence headers, frame headers, and extended data areas), thus requiring adaptation to different information writing strategies.
[0038] Step S302: When the preset modification strategy is the first modification strategy, the cropping indicator flag and the cropping parameters are written into the frame header information of the intra-coded frame of the target video.
[0039] It should be noted that when using the first modification strategy, the system will directly add new syntax elements to the Picture Header of the I-frame (intra-coded frame). For example, adding `frame_cropping_flag`, if true, will continue parsing parameters such as `frame_crop_left_offset` (left crop offset), `frame_crop_right_offset` (right crop offset), `frame_crop_top_offset` (top crop offset), and `frame_crop_bottom_offset` (bottom crop offset). Alternatively, the top and left offsets, along with the `frame_crop_width` (crop area width) and `frame_crop_height` (crop area height) parameters, can be used to define the padding area.
[0040] Additionally, it should be noted that this effective display area information is only added to the I-frame header. The constraint downsampling and padding operation can only begin with an I-frame, not a P / B frame. The effective display area information of subsequent P / B frames reuses the corresponding values from the I-frame; that is, the effective display area information of a P / B frame is the same as its nearest preceding I-frame. The I-frame header adds syntax elements such as... Figure 3 As shown, the relationship between each parameter and the original standard parameters is as follows: Figure 4 .
[0041] Additionally, it should be noted that, in order to further reduce the number of parameter bits, the cropping region can also be defined based on the size of the MiniBu: for example, frame_cropping_flag (cropping information flag), frame_crop_left_offset_in_MiniBu, frame_crop_top_offset_in_MiniBu, frame_crop_width_in_MiniBu (frame_crop_height_in_MiniBu (i.e., the left / top cropping offset of the minimum Bu, the width / height of the cropping region of the minimum Bu).
[0042] Step S303: When the preset modification strategy is the second modification strategy, the cropping indicator and the cropping parameters are written into the sequence display extension after the sequence header and the image display extension after the image header of the target video.
[0043] It should be noted that when employing the second modification strategy, the system utilizes existing extended data regions in the encoding standard to transmit information. For example, in the AVS3 standard, the size of the effective display area can be defined in `display_horizontal_size` and `display_vertical_size` after the sequence header of the target video; in `picture_display_extension` following the image header, `picture_centre_horizontal_offset` and `picture_centre_vertical_offset` are used to define the center offset of this effective area in the complete decoded image. Understandably, the advantage of this strategy is that it fully reuses existing syntax without modifying the standard definitions.
[0044] Step S304: When the preset modification strategy is the third modification strategy, the cropping indicator flag and the cropping parameters are written into the frame cropping display extension after the image header of the target video.
[0045] It should be noted that in this step, when the third modification strategy is adopted, the system will add a custom extended data unit after the image header, such as frame_crop_display_extension. In this extension, cropping indicator flags and cropping parameter sets similar to those in the first modification strategy are defined (such as top, bottom, left, and right cropping offsets, left and right cropping offsets and width and height, or cropping offsets and width and height based on the smallest coding unit, etc.).
[0046] In one feasible implementation, after step S30, the method further includes: Step B10: Determine the invalid display area in the target video based on the valid display area information.
[0047] It should be noted that in this step, the system will use the generated valid display area information (such as the upper left corner offset, width, and height) to clearly define all parts of the filled screen other than the valid area, that is, the "invalid display area" filled with a solid color (such as black).
[0048] Step B20: Add a decoding mark to the invalid display area so that the decoding end skips the decoding process for that area when it parses the decoding mark.
[0049] It's important to note that to further reduce bitrate overhead, the encoder in the system performs special processing on invalid display areas. For example, the screen is divided into multiple patches / tiles, with valid and invalid areas assigned to different patches. Then, a "no-decoding-needs-patch" flag (i.e., a decoding flag) is added to the syntax structure of the patch representing the invalid area. After outputting the patch's header information, the encoder can skip the encoding process for the patch's internal data, directly filling the YUV data at that patch's location in the DPB / RPB with "0". This effectively reduces bitrate overhead in black border areas and avoids the decoder wasting time in those areas.
[0050] Step S40: Crop and display the decoded target video according to the effective display area information.
[0051] It should be noted that, as Figure 5As shown, in this step, the decoding end in the system decodes the received bitstream according to the conventional process, outputting a complete reconstructed image with the same resolution as the original. Subsequently, the decoder or rendering end parses the effective display area information (cropping indicator and cropping parameters) from the bitstream. Based on this information, the corresponding rectangular area (i.e., the downsampled video portion placed in step S20) is cropped from the complete reconstructed image. Finally, the cropped effective image is sent to the display system for presentation. When the effective image resolution does not match the physical resolution of the display device, the display system or playback software will perform scaling and adaptation.
[0052] This embodiment provides a method for dynamically adjusting video resolution. The method includes: acquiring an original video and downsampling the original video to obtain a downsampled video; filling the downsampled video into a target frame with the same resolution as the original video to obtain a filled target video; writing effective display area information into the target video according to a preset modification strategy, the effective display area information including a cropping indicator and cropping parameters; and cropping and displaying the decoded target video according to the effective display area information. In summary, this embodiment, by keeping the sequence header resolution parameters unchanged, only downsampling the original video and filling it into the original frame, while simultaneously transmitting effective display area information in the bitstream, achieves an equivalent change in display resolution during encoding, realizing dynamic and smooth adjustment of the video stream. It solves the problem of video stuttering and difficulty in rapid deployment caused by decoder reset due to sequence header modification, improves the transmission smoothness and overall image quality of streaming media in ultra-low bitrate scenarios, and reduces the complexity of system implementation.
[0053] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 6 , Figure 6 This is a flowchart illustrating the second embodiment of the video resolution dynamic adjustment method of this application. The step of downsampling the original video to obtain a downsampled video specifically includes: Step A10: Determine the target bitrate, frame rate, and display resolution in pixels based on the original video.
[0054] It's important to note that in this step, the system determines the target bitrate (B, bit / s) for this encoding or transmission based on current network conditions, quality of service requirements, or user configuration. Simultaneously, it retrieves the corresponding frame rate (F, fps) and the original video's display resolution from the original video stream, i.e., the pixel product of the screen's width (W) and height (H) (W×H). This step provides the foundational parameters for subsequent calculations of the number of bits available per pixel; these parameters collectively determine the total amount of bit resources available for encoding.
[0055] Step A20: Calculate the number of bits occupied by each pixel in the original video based on the target bitrate, the frame rate, and the number of pixels at the display resolution.
[0056] It should be noted that in this step, the system calculates the theoretical bpp (bits per pixel) at the original resolution based on the parameters determined in step A10. The specific calculation formula is: bpp0 = B / (F × W × H). This calculated value bpp0 reflects the average number of encoding bits that can be allocated to each pixel while maintaining the original resolution. Furthermore, it should be noted that the number of bits per pixel (bpp) is an average statistical value used to measure the sufficiency of encoding bit resources. A lower bpp value indicates a shortage of bit resources, which can easily lead to increased encoding distortion and a blurry image.
[0057] Step A30: Determine the minimum number of bits occupied by each pixel based on the spatiotemporal complexity of the original video, where the spatiotemporal complexity includes time complexity and space complexity.
[0058] It's important to note that to determine if the current bpp0 is sufficient, a minimum acceptable bpp threshold (bpp_min, i.e., the minimum number of bits required per pixel) needs to be determined for the current video content. This threshold is not a fixed value but depends on the complexity of the video content. The more complex the video content (richer spatial details, more intense motion), the more bits are required for encoding, and the higher the corresponding bpp_min value. Therefore, the system analyzes the original video, calculates its spatial and temporal complexity, and then maps it to obtain a matching bpp_min value.
[0059] Additionally, it's important to note that spatiotemporal complexity is a measure of the difficulty of encoding video content. Spatial complexity primarily reflects the richness of details such as textures and edges within a single frame; temporal complexity primarily reflects the intensity of scene changes or object motion between frames. The minimum number of bits per pixel threshold (bpp_min) refers to the minimum number of bits required to ensure that video content of the current complexity achieves basically acceptable image quality at a specific resolution.
[0060] In one feasible implementation, step S30 specifically includes: Step A301: Calculate the edge energy based on the luminance channel of the original video to obtain the spatial complexity.
[0061] It should be noted that in this step, to calculate the Spatial Complexity (SI), the system extracts the luminance (Y) component of the video frame. Edge detection operators (such as the Sobel or Laplacian operators) are applied to the luminance component image to calculate the gradient magnitude or Laplacian energy of the entire frame or a block region, and then statistical values (such as mean and variance) are obtained. A higher statistical value indicates richer image edges and textures, and a higher spatial complexity. Additionally, it should be noted that a common method for calculating SI is the ITU-R BT.2247 method, which involves applying Sobel filtering to the luminance component and calculating the pixel standard deviation.
[0062] Step A302: Perform differential energy calculation based on adjacent frames of the original video to obtain the time complexity.
[0063] It should be noted that in this step, to calculate the temporal complexity (TI), the system selects consecutive video frames (such as the current frame and the previous frame). It calculates the absolute or squared difference between corresponding pixels in the luminance components of these two frames, and then obtains a statistical value (such as the mean) of the entire frame's difference. The larger this value, the more drastic the inter-frame changes, the richer the motion, and the higher the time complexity. Additionally, it should be noted that information such as the amplitude of motion vectors generated during the encoding process can also be used to assist in evaluating the time complexity.
[0064] Step A303: Compare the space complexity with a preset space complexity threshold, and compare the time complexity with a preset time complexity threshold to obtain the comparison result.
[0065] It should be noted that in this step, the system compares the calculated SI (space complexity) and TI (time complexity) values with pre-calibrated thresholds. The purpose of this comparison is to discretize the continuous complexity values and ultimately classify them into a finite number of complexity levels, such as low, medium, and high.
[0066] Step A304: Determine the complexity level of the original video based on the comparison results.
[0067] It should be noted that in this step, the system will determine the complexity level according to the comparison result of step A303 according to preset rules. For example, the rules can be: when SI < 25 and TI < 15, it is determined that the complexity level of the original video is low complexity; when 25 ≤ SI < 45 or 15 ≤ TI < 35, it is determined that the complexity level of the original video is medium complexity; when SI ≥ 45 or TI ≥ 35, it is determined that the complexity level of the original video is high complexity.
[0068] Step A305: Match the preset minimum number of bits per pixel threshold table according to the complexity level to obtain the minimum number of bits per pixel threshold.
[0069] It should be noted that in this step, the system will query a preset mapping table according to the complexity level determined in step A304 to directly obtain the recommended value of the corresponding bpp_min (the minimum number of bits per pixel threshold). For example, the mapping table can be set as: bpp_min for low complexity = 0.08; bpp_min for medium complexity = 0.12; bpp_min for high complexity = 0.18.
[0070] Step A40: Determine the target downsampling ratio according to the number of bits per pixel and the minimum number of bits per pixel threshold.
[0071] It should be noted that in this step, the system will select a target downsampling ratio (r, 0 < r ≤ 1) such that the equivalent bpp1 after downsampling (i.e., bpp1 = bpp0 / r²) is greater than or equal to bpp_min. First, the system will calculate the theoretically maximum acceptable downsampling ratio: r_max = min(1.0, sqrt(bpp0 / bpp_min)). Here, sqrt(bpp0 / bpp_min) is to ensure that bpp1 ≥ bpp_min. Then, from a predefined discrete ratio set R (such as {1.0, 0.875, 0.75, 0.625, 0.5, 0.375, 0.25, 0.125}), select the largest ratio value not exceeding r_max as the final target downsampling ratio (r). It can be understood that the role of this step is to intelligently select the most aggressive (i.e., the most reduction in resolution) downsampling strategy to save bitrate while ensuring the basic requirements of the image quality.
[0072] In addition, it should be noted that using a discrete ratio set instead of continuous values is to reduce the complexity of system implementation and align with common resolution scaling factors (such as 1 / 2, 1 / 4). r = 1.0 means no downsampling, and r = 0.5 means both the width and height are downsampled to half of the original value.
[0073] Step A50: Perform downsampling processing on the original video according to the target downsampling ratio to obtain a downsampled video.
[0074] It should be noted that after obtaining the target downsampling ratio r, the system uses an image resampling algorithm (such as bilinear interpolation, bicubic interpolation, or Lanczos resampling) to process each frame of the original video. The width and height of the original frame are multiplied by the ratio r (usually rounded down to the nearest even number) to generate a sequence of video frames with reduced resolution, i.e., the downsampled video.
[0075] In this embodiment, by analyzing the spatiotemporal complexity of the video content and the available bitrate, the optimal downsampling ratio is adaptively determined and applied, achieving an intelligent balance between image quality and bitrate consumption under ultra-low bitrate conditions. This solves the problem that image quality loss or bitrate waste may occur due to fixed-ratio downsampling, and improves the accuracy of dynamic resolution adjustment and the quality of the final video.
[0076] Based on the first and second embodiments of this application, in the third embodiment of this application, the content that is the same as or similar to that in embodiments one and two above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 7 , Figure 7 This is a flowchart illustrating the third embodiment of the dynamic video resolution adjustment method of this application. Step A50 specifically includes: Step A510: Divide the original video into blocks to obtain basic blocks.
[0077] It's important to note that in this step, the system spatially divides each frame of the original video into several fixed-size rectangular regions, called basic blocks. For example, each frame might be divided into blocks of 64x64 pixels or 32x32 pixels. This step provides the basic spatial analysis units for subsequent region detection and classification, allowing the algorithm to perceive and process video content at a granular level smaller than the entire frame.
[0078] Step A520: Perform text region detection and detail region detection on the basic block to obtain text attribute information and detail attribute information.
[0079] It should be noted that in this step, the system analyzes each basic block to determine whether it belongs to a region type requiring special processing. Specifically, text region detection aims to identify blocks containing text (such as subtitles and titles). By analyzing features such as stroke width consistency, edge density, contrast, aspect ratio of connected components, and arrangement regularity within the block, a set of quantified text attribute information is obtained. Detail region detection aims to identify blocks containing rich textures or high-frequency details (such as hair, fabric texture, and complex patterns). By calculating metrics such as the Laplacian operator response variance, local entropy, and gradient energy of the image within the block, a set of quantified detail attribute information is obtained.
[0080] Step A530: Determine the region type of the basic block based on the text attribute information and the detail attribute information. The region type includes text region, detail region, and background region.
[0081] It should be noted that in this step, the system, based on the text attribute information and detail attribute information extracted in step A520, assigns a clear region type label to each basic block using preset scoring rules and thresholds. These are mainly divided into three categories: text regions, detail regions, and background regions. Understandably, classifying a basic block as a text region means that its contained text information needs to be carefully protected during downsampling; classifying it as a detail region means that its rich texture information needs to be preserved as much as possible; while background regions typically correspond to flat or simple textured areas and can tolerate a greater degree of information compression.
[0082] Additionally, it should be noted that, besides text and detail detection, the system also assesses the temporal stability of the image. For example, the system stabilizes the Region of Interest (ROI) within a GOP (Group of Pictures) using simple tracking (such as optical flow / block matching and Kalman filtering), requiring a sustained hit rate of at least 0.6 for the detected text and detail attributes to be valid.
[0083] In one feasible implementation, step A530 specifically includes: Step A531: Calculate the text score of the basic block based on the preset text attribute weights and the stroke width consistency, edge density, contrast, aspect ratio, and arrangement consistency in the text attribute information.
[0084] It should be noted that in this step, the system uses a weighted summation method to combine the attributes of multiple texts into a single text score (S_text). The formula is: S_text = w1 * stroke width consistency + w2 * edge density + w3 * contrast + w4 * aspect ratio and arrangement consistency. Here, w1~w4 are preset text attribute weight coefficients, reflecting the importance of different attributes in determining the text type.
[0085] Step A532: Calculate the detail score of the basic block based on the preset detail attribute weights and the Laplacian operator variance, local entropy, and gradient energy in the detail attribute information.
[0086] It should be noted that in this step, the system uses a weighted summation method to combine multiple detail attributes into a single detail score (S_detail). The formula is: S_detail = v1 * Laplacian operator variance + v2 * local entropy + v3 * gradient energy. Where v1~v3 are preset detail attribute weight coefficients.
[0087] Additionally, it should be noted that the preset text attribute weights and detail attribute weights can be obtained through machine learning training on datasets containing different types of data, so that the scoring can most accurately distinguish between text blocks and details in the image.
[0088] Step A533: When the text score is greater than or equal to a preset text score threshold, mark the region type of the basic block as a text region.
[0089] It should be noted that in this step, the system compares the text score (S_text) of a basic block with a preset text score threshold (τ_text). If the text score S_text of a basic block is greater than or equal to the text score threshold τ_text, the system will mark the basic block as a text region.
[0090] Step A534: When the detail score is greater than or equal to the preset detail score threshold, mark the region type of the basic block as a detail region.
[0091] It should be noted that in this step, the system compares the detail score (S_detail) of a basic block with a preset detail score threshold (τ_detail). If the detail score S_detail of a basic block is greater than or equal to the detail score threshold τ_detail, the system marks the basic block as a detail region.
[0092] Step A535: When the text score is less than a preset text score threshold and the detail score is less than a preset detail score threshold, mark the region type of the basic block as a background region.
[0093] It should be noted that in this step, the system compares the text score (S_text) of the basic block with a preset text score threshold (τ_text), and simultaneously compares the detail score (S_detail) of the basic block with a preset detail score threshold (τ_detail). If the text score S_text of a basic block is less than the text score threshold τ_text and the detail score S_detail is less than the detail score threshold τ_detail, then the system will mark that basic block as a scene area.
[0094] Step A540: Match the corresponding downsampling filtering strategy according to the region type of the basic block, and perform downsampling processing on the original video according to the downsampling filtering strategy and the target downsampling ratio to obtain the downsampled video.
[0095] It should be noted that in this step, the system employs different downsampling filtering strategies for different types of regions when scaling according to the determined target downsampling ratio (r), in order to achieve differentiated processing. Specifically, for text regions: before downsampling, a lightweight sharpening preprocessing (such as a non-linear desharpening mask) is performed on the image within the block to enhance edges and resist stroke blurring that may be caused by downsampling; for detail regions: a high-quality resampling filter (such as bicubic interpolation or Lanczos downsampling kernel) is used for downsampling to preserve texture details to the greatest extent and reduce detail loss; for background regions: at lower ratios, a stronger low-pass pre-filter can be used to suppress noise, or a simpler filtering method (such as bilinear interpolation) can be used directly. Finally, the corresponding strategy is applied according to the type of each block to complete the downsampling of the entire video frame, resulting in the downsampled video.
[0096] Understandably, the purpose of this step is to implement different levels of image quality protection based on the importance of the content, while uniformly reducing the resolution, thereby optimizing the quality of the video image under the constraint of overall bitrate.
[0097] In this embodiment, semantic regions such as text and details in the video are detected in blocks, and differentiated downsampling strategies (such as preprocessing and sharpening text regions) are applied accordingly. This achieves the goal of reducing the overall resolution while selectively protecting the visual details of key areas. This solves the problem of excessive loss of text and high-detail content caused by traditional sampling, thereby significantly improving the image quality and readability of video at low bitrates.
[0098] This application also provides a dynamic adjustment device for video resolution, please refer to... Figure 8 The dynamic adjustment device for video resolution includes: The video sampling module 10 is used to acquire the original video and perform downsampling processing on the original video to obtain a downsampled video; The screen filling module 20 is used to fill the downsampled video into a target screen with the same resolution as the original video to obtain the filled target video; Display configuration module 30 is used to write effective display area information into the target video according to a preset modification strategy. The effective display area information includes cropping indicator and cropping parameters. The cropping display module 40 is used to crop and display the decoded target video according to the effective display area information.
[0099] The video resolution dynamic adjustment device provided in this application, employing the video resolution dynamic adjustment method described in the above embodiments, can solve the technical problem of adjusting video resolution without modifying sequence header parameters. Compared with the prior art, the beneficial effects of the video resolution dynamic adjustment device provided in this application are the same as those of the video resolution dynamic adjustment method described in the above embodiments, and other technical features in the video resolution dynamic adjustment device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0100] In one embodiment, the video sampling module 10 is further configured to: determine a target bitrate, frame rate, and display resolution pixel count based on the original video; calculate the number of bits occupied by each pixel in the original video based on the target bitrate, the frame rate, and the display resolution pixel count; determine a minimum bit count threshold for each pixel based on the spatiotemporal complexity of the original video, wherein the spatiotemporal complexity includes time complexity and space complexity; determine a target downsampling ratio based on the number of bits occupied by each pixel and the minimum bit count threshold for each pixel; and perform downsampling processing on the original video according to the target downsampling ratio to obtain a downsampled video.
[0101] In one embodiment, the video sampling module 10 is further configured to perform edge energy calculation based on the luminance channel of the original video to obtain spatial complexity; perform differential energy calculation based on adjacent frames of the original video to obtain time complexity; compare the spatial complexity with a preset spatial complexity threshold and compare the time complexity with a preset time complexity threshold to obtain a comparison result; determine the complexity level of the original video based on the comparison result; and match the complexity level with a preset minimum bit count threshold table for each pixel to obtain a minimum bit count threshold for each pixel.
[0102] In one embodiment, the video sampling module 10 is further configured to divide the original video into blocks to obtain basic blocks; perform text region detection and detail region detection on the basic blocks to obtain text attribute information and detail attribute information; determine the region type of the basic block based on the text attribute information and the detail attribute information, wherein the region type includes text region, detail region and background region; match the corresponding downsampling filtering strategy according to the region type of the basic block, and perform downsampling processing on the original video according to the downsampling filtering strategy and the target downsampling ratio to obtain a downsampled video.
[0103] In one embodiment, the video sampling module 10 is further configured to calculate the text score of the basic block based on preset text attribute weights and the stroke width consistency, edge density, contrast, aspect ratio, and arrangement consistency in the text attribute information; calculate the detail score of the basic block based on preset detail attribute weights and the Laplacian operator variance, local entropy, and gradient energy in the detail attribute information; when the text score is greater than or equal to a preset text score threshold, mark the region type of the basic block as a text region; when the detail score is greater than or equal to a preset detail score threshold, mark the region type of the basic block as a detail region; and when the text score is less than a preset text score threshold and the detail score is less than a preset detail score threshold, mark the region type of the basic block as a background region.
[0104] In one embodiment, the display configuration module 30 is further configured to match a corresponding preset modification strategy according to the encoding standard of the target video; when the preset modification strategy is a first modification strategy, write the cropping indicator and the cropping parameters into the frame header information of the intra-coded frame of the target video; when the preset modification strategy is a second modification strategy, write the cropping indicator and the cropping parameters into the sequence display extension after the sequence header and the image display extension after the image header of the target video; when the preset modification strategy is a third modification strategy, write the cropping indicator and the cropping parameters into the frame cropping display extension after the image header of the target video.
[0105] In one embodiment, the dynamic adjustment device for video resolution further includes a decoding marker module 50, used to determine invalid display areas in the target video based on the effective display area information; and to add decoding markers to the invalid display areas so that the decoding end skips the decoding processing of the area when it parses the decoding markers.
[0106] This application provides a dynamic adjustment device for video resolution, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the dynamic adjustment method for video resolution described in Embodiment 1 above.
[0107] The following is for reference. Figure 9 This document illustrates a structural schematic diagram of a device suitable for dynamically adjusting video resolution in implementing embodiments of this application. The device for dynamically adjusting video resolution in embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 9 The video resolution dynamic adjustment device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0108] like Figure 9As shown, the video resolution dynamic adjustment device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in ROM (Read Only Memory) 1002 or a program loaded from storage device 1003 into RAM (Random Access Memory) 1004. RAM 1004 also stores various programs and data required for the operation of the video resolution dynamic adjustment device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touch screens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, LCDs (Liquid Crystal Displays), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the video resolution dynamic adjustment device to communicate wirelessly or wiredly with other devices to exchange data. Although the figures show video resolution dynamic adjustment devices with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.
[0109] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0110] The video resolution dynamic adjustment device provided in this application, employing the video resolution dynamic adjustment method described in the above embodiments, can solve the technical problem of adjusting video resolution without modifying sequence header parameters. Compared with the prior art, the beneficial effects of the video resolution dynamic adjustment device provided in this application are the same as those of the video resolution dynamic adjustment method described in the above embodiments, and other technical features of this video resolution dynamic adjustment device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0111] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0112] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0113] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the dynamic adjustment method for video resolution described in the above embodiments.
[0114] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, RAM (Random Access Memory), ROM (Read Only Memory), EPROM (Erasable Programmable Read Only Memory or Flash Memory), optical fibers, CD-ROM (CD-Read Only Memory), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0115] The aforementioned computer-readable storage medium may be included in a dynamic adjustment device for video resolution; or it may exist independently and not be assembled into a dynamic adjustment device for video resolution.
[0116] The aforementioned computer-readable storage medium carries one or more programs that, when executed by a video resolution dynamic adjustment device, cause the video resolution dynamic adjustment device to: acquire an original video and downsample the original video to obtain a downsampled video; fill the downsampled video into a target screen with the same resolution as the original video to obtain a filled target video; write effective display area information into the target video according to a preset modification strategy, the effective display area information including a cropping indicator and cropping parameters; and crop and display the decoded target video according to the effective display area information.
[0117] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including LAN (Local Area Network) or WAN (Wide Area Network)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0118] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0119] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0120] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for performing the above-described dynamic adjustment method for video resolution, thereby solving the technical problem of adjusting video resolution without modifying sequence header parameters. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the dynamic adjustment method for video resolution provided in the above embodiments, and will not be repeated here.
[0121] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the dynamic adjustment method for video resolution as described above.
[0122] The computer program product provided in this application solves the technical problem of adjusting video resolution without modifying sequence header parameters. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the dynamic video resolution adjustment method provided in the above embodiments, and will not be repeated here.
[0123] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A method for dynamically adjusting video resolution, characterized in that, The method includes: The original video is acquired, and the original video is downsampled to obtain a downsampled video; The downsampled video is filled into a target frame with the same resolution as the original video to obtain the filled target video; According to a preset modification strategy, effective display area information is written into the target video, and the effective display area information includes cropping indicator and cropping parameters. The decoded target video is cropped and displayed based on the effective display area information.
2. The method as described in claim 1, characterized in that, The step of writing valid display area information into the target video according to a preset modification strategy includes: Match the corresponding preset modification strategy according to the encoding standard of the target video; When the preset modification strategy is the first modification strategy, the cropping indicator and the cropping parameters are written into the frame header information of the intra-coded frame of the target video; When the preset modification strategy is the second modification strategy, the cropping indicator and the cropping parameters are written into the sequence display extension after the sequence header and the image display extension after the image header of the target video; When the preset modification strategy is the third modification strategy, the cropping indicator and the cropping parameters are written into the frame cropping display extension after the image header of the target video.
3. The method as described in claim 1, characterized in that, The steps of downsampling the original video to obtain a downsampled video include: The target bitrate, frame rate, and display resolution in pixels are determined based on the original video. The number of bits occupied by each pixel in the original video is calculated based on the target bitrate, the frame rate, and the number of pixels at the display resolution. The minimum number of bits occupied by each pixel is determined based on the spatiotemporal complexity of the original video, where the spatiotemporal complexity includes time complexity and space complexity. The target downsampling ratio is determined based on the number of bits occupied by each pixel and the minimum number of bits occupied by each pixel threshold. The original video is downsampled according to the target downsampling ratio to obtain a downsampled video.
4. The method as described in claim 3, characterized in that, The step of determining the minimum number of bits occupied by each pixel based on the spatiotemporal complexity of the original video includes: The edge energy is calculated based on the luminance channel of the original video to obtain the space complexity; The time complexity is obtained by performing differential energy calculation on adjacent frames of the original video. The space complexity is compared with a preset space complexity threshold, and the time complexity is compared with a preset time complexity threshold to obtain the comparison result; The complexity level of the original video is determined based on the comparison results; The minimum number of bits occupied by each pixel is obtained by matching the preset minimum bit count threshold table for each pixel according to the complexity level.
5. The method as described in claim 3, characterized in that, The step of downsampling the original video according to the target downsampling ratio to obtain the downsampled video includes: The original video is divided into blocks to obtain basic blocks; Text region detection and detail region detection are performed on the basic block to obtain text attribute information and detail attribute information; The region type of the basic block is determined based on the text attribute information and the detail attribute information. The region type includes text region, detail region, and background region. The corresponding downsampling filtering strategy is matched according to the region type of the basic block, and the original video is downsampled according to the downsampling filtering strategy and the target downsampling ratio to obtain the downsampled video.
6. The method as described in claim 5, characterized in that, The step of determining the region type of the basic block based on the text attribute information and the detailed attribute information includes: The text score of the basic block is calculated based on the preset text attribute weights and the stroke width consistency, edge density, contrast, aspect ratio and arrangement consistency in the text attribute information. The detail score of the basic block is calculated based on the preset detail attribute weights and the Laplacian operator variance, local entropy, and gradient energy in the detail attribute information. When the text score is greater than or equal to a preset text score threshold, the region type of the basic block is marked as a text region; When the detail score is greater than or equal to a preset detail score threshold, the region type of the basic block is marked as a detail region; When the text score is less than a preset text score threshold and the detail score is less than a preset detail score threshold, the region type of the basic block is marked as a background region.
7. The method as described in claim 1, characterized in that, After the step of writing the effective display area information into the target video according to the preset modification strategy, the method further includes: Based on the effective display area information, determine the invalid display area in the target video; A decoding marker is added to the invalid display area so that the decoding end skips the decoding process for that area when it parses the decoding marker.
8. A dynamic adjustment device for video resolution, characterized in that, The device includes: The video sampling module is used to acquire the original video and perform downsampling processing on the original video to obtain the downsampled video; The screen filling module is used to fill the downsampled video into a target screen with the same resolution as the original video, so as to obtain the filled target video; The display configuration module is used to write effective display area information into the target video according to a preset modification strategy. The effective display area information includes cropping indicator and cropping parameters. The cropping and display module is used to crop and display the decoded target video according to the effective display area information.
9. A device for dynamically adjusting video resolution, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the method for dynamically adjusting video resolution as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the video resolution dynamic adjustment method as described in any one of claims 1 to 7.
Citation Information
Cited By
Image dynamic clipping and frame buffer method and device
CN122265464A
Image dynamic clipping and frame buffer method and device
CN122265464B