CN110286868A - Video display adjustment method and device, electronic equipment and storage medium - Google Patents

Video display adjustment method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110286868A
CN110286868A CN201910574577.6A CN201910574577A CN110286868A CN 110286868 A CN110286868 A CN 110286868A CN 201910574577 A CN201910574577 A CN 201910574577A CN 110286868 A CN110286868 A CN 110286868A
Authority
CN
China
Prior art keywords
video
screen
threshold
width
aspect ratio
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910574577.6A
Other languages
Chinese (zh)
Inventor
杨青
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Internet Security Software Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Internet Security Software Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201910574577.6A priority Critical patent/CN110286868A/en
Publication of CN110286868A publication Critical patent/CN110286868A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units

Abstract

The application provides a video display adjustment method, a video display adjustment device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring a video width height ratio and a screen width height ratio, and comparing the video width height ratio with a preset first threshold and a preset second threshold, wherein the second threshold is larger than the first threshold; if the video width height ratio is larger than or equal to the first threshold and smaller than the second threshold, comparing the video width height ratio with the screen width height ratio; and if the video width-height ratio is larger than or equal to the screen width-height ratio, taking the screen height as the video display height, and calculating the video display width according to the video display height. According to the video width-height ratio and the screen width-height ratio, the display size of the video is adjusted, so that when the video is displayed on the screen, no black edge exists on the upper side, the lower side, the left side and the right side of the screen, the video is displayed on the screen in a full screen mode, the display effect is improved, and the user experience is improved.

Description

Video display regulation method, device, electronic equipment and storage medium
Technical field
This application involves computer application field more particularly to a kind of video display regulation method, device, electronic equipment and Storage medium.
Background technique
As science and technology is constantly progressive, function achieved by mobile terminal is more and more.For example, user can be in mobile phone Video software is installed, various videos are watched by the software.
In the related technology, video is usually shown with full frame, i.e. screen of the video full of entire mobile terminal, passes through use Family slides up and down at video playing interface carrys out Switch Video.And the full frame of video is differentiated generally by video resolution and screen Rate is adapted to according to minimum edge.But this mode will lead to video and full frame can not show on certain mobile terminals shielded comprehensively Show, black surround can be left in up and down or left and right, therefore, the mode display effect of this video full screen display is bad, user experience Difference.
Summary of the invention
The embodiment of the present application proposes a kind of video display regulation method, device, electronic equipment and storage medium, for solving Video in the related technology is displayed in full screen mode, and will lead to video can not be displayed in full screen on certain mobile terminals shielded comprehensively, It can be the technical issues of up and down or left and right leaves black surround, and display effect is bad, poor user experience.
For this purpose, the application one side embodiment proposes a kind of video display regulation method, this method comprises: it is wide to obtain video Height ratio and screen width high ratio, and the video aspect ratio is compared with preset first threshold and preset second threshold, Wherein, the second threshold is greater than the first threshold;If know the video aspect ratio be more than or equal to the first threshold and Less than the second threshold, then the video aspect ratio and the screen width high ratio are compared;If knowing, the video is wide It is high that height is then shown using screen height as video than being more than or equal to the screen width high ratio, height is shown according to the video Calculate video display width.
In one possible implementation, if knowing that the video aspect ratio is more than or equal to the first threshold described And be less than the second threshold, then after the video aspect ratio and the screen width high ratio being compared, further includes:
If knowing, the video aspect ratio is less than the screen width high ratio, using screen width as video display width, Video display height is calculated according to the video display width.
In alternatively possible implementation, described by the video aspect ratio and preset first threshold and default Second threshold be compared after, further includes:
If knowing, the video aspect ratio is less than the first threshold, alternatively, being more than or equal to the second threshold, then basis The size of the video and the size of the screen judge whether the video meets preset original display condition, if so, The video is shown with the original size of the video.
In alternatively possible implementation, if the video is unsatisfactory for the preset original display condition, institute State method, further includes:
The video aspect ratio and the screen width high ratio are compared;
If knowing, the video aspect ratio is more than or equal to the screen width high ratio, is shown using screen width as video wide Degree calculates video display height according to the video display width.
In alternatively possible implementation, the method also includes:
If knowing, the video aspect ratio is less than the screen width high ratio, and height is shown using screen height as video, Show that height calculates video display width according to the video.
The application another aspect embodiment proposes a kind of video display adjusting device, which includes: acquisition module, uses In acquisition video aspect ratio and screen width high ratio;First comparison module is used for the video aspect ratio and preset first threshold Value and preset second threshold are compared, wherein the second threshold is greater than the first threshold;Second comparison module is used In know the video aspect ratio be more than or equal to the first threshold and be less than the second threshold when, by the wide height of the video Than being compared with the screen width high ratio;First processing module, for knowing that it is described that the video aspect ratio is more than or equal to When screen width high ratio, height is shown using screen height as video, shows that height calculates video display width according to the video.
In one possible implementation, the first processing module, is also used to:
When knowing that the video aspect ratio is less than the screen width high ratio, using screen width as video display width, Video display height is calculated according to the video display width.
In alternatively possible implementation, described device, further includes:
Judgment module, for knowing that the video aspect ratio is less than the first threshold, alternatively, being more than or equal to described the When two threshold values, judge whether the video meets preset original display according to the size of the size of the video and the screen Condition;
Display module, for showing the video with the original size of the video.
In alternatively possible implementation, described device, further includes:
Third comparison module, for when the video is unsatisfactory for the preset original display condition, by the video The ratio of width to height and the screen width high ratio are compared;
Second processing module, for know the video aspect ratio be more than or equal to the screen width high ratio when, with screen Width calculates video display height as video display width, according to the video display width.
In alternatively possible implementation, the Second processing module is also used to:
When knowing that the video aspect ratio is less than the screen width high ratio, height is shown using screen height as video, Show that height calculates video display width according to the video.
The another aspect embodiment of the application proposes a kind of electronic equipment, including memory, processor and is stored in storage On device and the computer program that can run on a processor, when the processor executes described program, to realize first aspect reality Apply video display regulation method described in example.
The another aspect embodiment of the application proposes a kind of computer readable storage medium, is stored thereon with computer journey Sequence, when which is executed by processor, to realize video display regulation method described in first aspect embodiment.
Technical solution disclosed in the present application, has the following beneficial effects:
By being adjusted to the display size of video according to video aspect ratio and screen width high ratio, realizes video and exist When showing on screen, screen is up and down and left and right is without black surround, and video is displayed in full screen on the screen, improves display effect, is changed It has been apt to user experience.
The additional aspect of the application and advantage will be set forth in part in the description, and will partially become from the following description It obtains obviously, or recognized by the practice of the application.
Detailed description of the invention
The application is above-mentioned and/or additional aspect and advantage will become from the following description of the accompanying drawings of embodiments Obviously and it is readily appreciated that, in which:
Fig. 1 is the flow diagram of the video display regulation method of the application one embodiment;
Fig. 2 is the flow diagram of the video display regulation method of another embodiment of the application;
Fig. 3 is the exemplary diagram of the video display regulation method of the application one embodiment;
Fig. 4 is the exemplary diagram of the video display regulation method of another embodiment of the application;
Fig. 5 is the flow diagram of the video display regulation method of another embodiment of the application;
Fig. 6 is the structural schematic diagram of the video display adjusting device of the application one embodiment;
Fig. 7 is the structural schematic diagram of the video display adjusting device of another embodiment of the application;
Fig. 8 is the structural schematic diagram of the electronic equipment of the application one embodiment.
Specific embodiment
Embodiments herein is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached The embodiment of figure description is exemplary, it is intended to for explaining the application, and should not be understood as the limitation to the application.
Each embodiment is displayed in full screen mode mainly for video in the related technology in the application, will lead to video certain It can not be displayed in full screen the mobile terminal shielded comprehensively on, black surround can be left in up and down or left and right, display effect is bad, user experience The problem of difference, proposes a kind of video display regulation method.
Video display regulation method provided by the embodiments of the present application, first acquisition video aspect ratio and screen width high ratio, and Video aspect ratio is compared with preset first threshold and preset second threshold, wherein second threshold is greater than the first threshold Value, then when video aspect ratio is more than or equal to first threshold and is less than second threshold, by video aspect ratio and screen width high ratio It is compared, if knowing, video aspect ratio is more than or equal to screen width high ratio, height is shown using screen height as video, according to Video display height calculates video display width.Pass through the display according to video aspect ratio and screen width high ratio, to video as a result, Size is adjusted, and when realizing video and showing on the screen, screen is up and down and left and right is without black surround, and video is complete on the screen Screen display, improves display effect, improves user experience.
Below with reference to the accompanying drawings the video display regulation method, device, electronic equipment and computer of the embodiment of the present application are described Readable storage medium storing program for executing.
First in conjunction with attached drawing 1, video display regulation method provided by the embodiments of the present application is specifically described.
Fig. 1 is the flow diagram of the video display regulation method of the application one embodiment.
As shown in Figure 1, the video display regulation method of the application may comprise steps of:
Step 101, video aspect ratio and screen width high ratio are obtained, and by video aspect ratio and preset first threshold and in advance If second threshold be compared, wherein second threshold be greater than first threshold.
Specifically, video display regulation method provided by the embodiments of the present application, it can be by view provided by the embodiments of the present application Frequency display adjustment device executes.Wherein, video display adjusting device, which can be configured in, arbitrarily has screen, can show video Electronic equipment in, be adjusted with treating display video in the electronic device.Specifically, electronic equipment can be mobile phone, Computer, tablet computer, personal digital assistant etc..
Wherein, the video in the embodiment of the present application is video on the screen to be shown.
When specific implementation, video aspect ratio and screen width high ratio can be calculated according to various ways.
For example, in the embodiment of the present application, video aspect ratio can be calculated according to video resolution.Wherein, video is differentiated Rate can refer to valid pixel of the video on transverse and longitudinal direction.The valid pixel of video horizontally and valid pixel in the longitudinal direction Ratio be video aspect ratio.For example, the resolution ratio of video is 720*1280, then video aspect ratio is 720/1280=9/ 16。
Furthermore it is possible to calculate screen width high ratio according to screen resolution.Wherein, screen resolution can refer in transverse and longitudinal direction On pixel number.The pixel number of screen horizontally and the ratio of pixel number in the longitudinal direction are screen width high ratio.
It should be noted that using video resolution and screen resolution as horizontal pixel number * in the embodiment of the present application Longitudinal number of pixels, and it is horizontal and vertical on unit be that px is illustrated.
Wherein, first threshold and second threshold can according to need setting.In the embodiment of the present application, first threshold can be with It is set as 9/16, second threshold can be set to 3/4.
Step 102, if knowing, video aspect ratio is more than or equal to first threshold and is less than second threshold, by video aspect ratio It is compared with screen width high ratio.
Step 103, if knowing, video aspect ratio is more than or equal to screen width high ratio, is shown using screen height as video high Degree shows that height calculates video display width according to video.
Specifically, if knowing, video aspect ratio is more than or equal to first threshold and is less than second threshold, and knows the wide height of video Than being more than or equal to screen width high ratio, then height can be shown using screen height as video, height and video are shown according to video The ratio of width to height calculates video display width.Wherein, video display width shows that the ratio of height is equal with video aspect ratio with video.
As an example it is assumed that first threshold is 9/16, second threshold 3/4.Video resolution is 480*720, screen point Resolution is 540/960, i.e., video aspect ratio is 2/3, screen width high ratio 9/16.Since video aspect ratio is greater than first threshold 9/ 16, and it is less than second threshold 3/4, and video aspect ratio 2/3 is greater than screen width high ratio 9/16, then can be made with screen height 960 Height is shown for video, and according to video display width=video display height (screen height) * video aspect ratio, it is aobvious to obtain video Show that width is 960*2/3=640.
Or, it is assumed that video resolution 480*854, screen resolution 540/960, i.e. video aspect ratio are 9/16, Screen width high ratio is 9/16.Since video aspect ratio is equal to first threshold 9/16, and it is less than second threshold 3/4, and the wide height of video Than being equal to screen width high ratio 9/16, then height can be shown using screen height 960 as video, according to video display width=view Frequency display height (screen height) * video aspect ratio, obtaining video display width is 960*9/16=540.
It is more than or equal to first threshold it is understood that can be seen that according to above-mentioned example in video aspect ratio and is less than Second threshold, and video aspect ratio be equal to screen width high ratio when, video display width adjusted be equal to screen display width, depending on Frequency display height is equal to screen display height, is equivalent to when carrying out video display, and video is equal according to screen width and height Entire screen is fully supported, so that all without black surround, video full frame can be shown for the upper and lower and left and right of screen when video is shown on the screen Show.Video aspect ratio be more than or equal to first threshold and be less than second threshold, and video aspect ratio be greater than screen width high ratio when, adjust Video display width after whole is greater than screen width, and video display height is equal to screen height, is equivalent to and shows in progress video When, video is fully supported into entire screen according to screen height, thus screen up and down without black surround, and on the width, due to video Display width is greater than screen width, therefore the left and right of screen is also without black surround, thus when video is shown on the screen, screen it is upper All without black surround, video can be displayed in full screen for lower and left and right.Therefore in above-mentioned two situations, according to provided by the embodiments of the present application Scheme is adjusted video display size, and when can video be made to show on the screen, the upper and lower and left and right of screen all have Black surround, video are displayed in full screen on the screen.
It is understood that in the embodiment of the present application, if being shown on the screen according to video display size adjusted When video, video width is greater than screen width, then video can be made in screen by adjusting position of the video in screen transverse direction In be shown centered on, to improve display effect, improve user experience.
It in the exemplary embodiment, can be using screen width as video if video aspect ratio is less than screen width high ratio Display width calculates video display width according to video display width.I.e. after step 102, can also include:
Step 104, if knowing, video aspect ratio is less than screen width high ratio, using screen width as video display width, Video display height is calculated according to video display width.
Specifically, video display height can be calculated according to video display width and video aspect ratio.Wherein, video is shown Width shows that the ratio of height is equal with video aspect ratio with video.
As an example it is assumed that first threshold is 9/16, second threshold 3/4.Video resolution is 540/960, screen point Resolution is 480*720, i.e., video aspect ratio is 9/16, screen width high ratio 2/3.Since video aspect ratio is equal to first threshold 9/ 16, and it is less than second threshold 3/4, and video aspect ratio is less than screen width high ratio, then can be shown using screen width 480 as video Show width, height * video aspect ratio is shown according to video display width (screen width)=video, obtaining video display height is 480/ (9/16)=854.
It is more than or equal to first threshold it is understood that can be seen that according to above-mentioned example in video aspect ratio and is less than Second threshold, and video aspect ratio be less than screen width high ratio when, video display width adjusted be equal to screen display width, depending on Frequency display height is greater than screen display height, is equivalent to when carrying out video display, video is fully supported entirely according to screen width Screen, thus the no black surround in the left and right of screen, and in height, since video display height is greater than screen height, screen Up and down all without black surround, thus when video is shown on the screen, all without black surround, video can be complete for the upper and lower and left and right of screen Screen display.Therefore under above situation, video display size is adjusted according to scheme provided by the embodiments of the present application, can be made When video is shown on the screen, all without black surround, video is displayed in full screen on the screen for the upper and lower and left and right of screen.
Video display regulation method provided by the embodiments of the present application, first acquisition video aspect ratio and screen width high ratio, and Video aspect ratio is compared with preset first threshold and preset second threshold, wherein second threshold is greater than the first threshold Value, then when video aspect ratio is more than or equal to first threshold and is less than second threshold, by video aspect ratio and screen width high ratio It is compared, if knowing, video aspect ratio is more than or equal to screen width high ratio, height is shown using screen height as video, according to Video display height calculates video display width.Pass through the display according to video aspect ratio and screen width high ratio, to video as a result, Size is adjusted, and when realizing video and showing on the screen, screen is up and down and left and right is without black surround, and video is complete on the screen Screen display, improves display effect, improves user experience.
Below with reference to Fig. 2, the video display regulation method of the application is further detailed.
Fig. 2 is the flow diagram of the video display regulation method of another embodiment of the application.
As shown in Fig. 2, the video display regulation method of the embodiment of the present application may comprise steps of:
Step 201, video aspect ratio and screen width high ratio are obtained, and by video aspect ratio and preset first threshold and in advance If second threshold be compared, wherein second threshold be greater than first threshold.
Wherein, the specific implementation process and principle of step 201, the description being referred in above-described embodiment, herein no longer It repeats.
It is understood that being more than or equal to first threshold in video aspect ratio and being less than second threshold, and video aspect ratio When greater than screen width high ratio, through the foregoing embodiment in mode, after being adjusted to video, video display height be equal to screen Highly, video display width is greater than screen width, therefore when showing video on the screen, partial video picture can overflow screen, It is not explicitly shown on screen, as shown in Figure 3.Wherein, solid box indicates screen in Fig. 3, and dotted line frame indicates that video adjusted is drawn Face.
Similar, it is more than or equal to first threshold in video aspect ratio and is less than second threshold, and video aspect ratio is less than screen Curtain the ratio of width to height when, through the foregoing embodiment in mode, after being adjusted to video, video display width be equal to screen width, Video display height is greater than screen height, therefore when showing video on the screen, partial video picture can also overflow screen, not have It is displayed on the screen, as shown in Figure 4.Wherein, solid box indicates screen in Fig. 4, and dotted line frame indicates video pictures adjusted.
Correspondingly, in the embodiment of the present application, preset first threshold and second threshold can carry out Fig. 1 according to video Shown in adjust so that video full screen display on the screen when, it is big that video pictures overflow influence of the screen to whole viewing effect Small determination.Since the ratio of width to height of usual video is more than or equal to 9/16, and when less than 3/4, according to mode shown in FIG. 1, adjustment view After the display size of frequency, video pictures overflow screen to influential effect very little is integrally watched, then in the embodiment of the present application, can incite somebody to action First threshold is determined as 9/16, and second threshold is determined as 3/4.
It is understood that if video aspect ratio be less than first threshold, or be greater than second threshold, still according to above-mentioned implementation Mode in example, is adjusted video, and the part that video pictures may be made to overflow screen is more, can not so as to cause user Normal viewing video, influences the viewing effect of video.So, in order to avoid such case generation, in video aspect ratio less than the One threshold value, or be greater than second threshold when, video can be handled in the following way.
Step 202, if knowing, video aspect ratio is less than first threshold, alternatively, being more than or equal to second threshold, then according to video Size and the size of screen judge whether video meets preset original display condition, if so, then follow the steps 203, otherwise, Execute step 204.
Step 203, video is shown with the original size of video.
Wherein, preset original display condition refers to the condition that pre-set video can be shown with original size. When it can be clearly showed that on the screen according to the size and video of screen, between the size of video and the size of screen Proportionate relationship determines.
Such as, it is assumed that the resolution ratio of screen is greater than C*D and less than the value of A*B, and video can clearly show that on the screen When, the ratio of the width of the width and screen of video is at least 1/3, and the ratio of the height of the height and screen of video is at least 1/ 4;If the resolution ratio of screen is the value greater than A*B, when video can clearly show that on the screen, the width of video and the width of screen The ratio of degree is at least 1/2, and the ratio of the height of the height and screen of video is at least 1/3.Then in the embodiment of the present application, in advance If original display condition may is that screen resolution ratio be greater than C*D and be less than A*B, the width of the width and screen of video Ratio is greater than 1/3, and the ratio of the height of the height and screen of video is greater than 1/4;The resolution ratio of screen is greater than A*B, the width of video The ratio of degree and the width of screen is greater than 1/2, and the ratio of the height of the height and screen of video is greater than 1/3.
Specifically, if video aspect ratio is less than first threshold, alternatively, being more than or equal to second threshold, and according to the ruler of video Very little and screen size, is determined that video meets preset initial condition, then can be shown video with original size.
Step 204, video aspect ratio and screen width high ratio are compared, judge whether video aspect ratio is more than or equal to screen Otherwise curtain the ratio of width to height, executes step 206 if so, thening follow the steps 205.
Specifically, if determining that video is unsatisfactory for preset original display condition according to the size of the size of video and screen, The display size of video can be then adjusted according to video aspect ratio and screen width high ratio.
Step 205, using screen width as video display width, video display height is calculated according to video display width.
Step 206, height is shown using screen height as video, shows that height calculates video display width according to video.
Specifically, can be shown using screen width as video if video aspect ratio is greater than or equal to screen width high ratio Width calculates video display height according to video display width and video aspect ratio.Wherein, video display width and video are shown The ratio of height is equal with video aspect ratio.It, can be using screen height as view if video aspect ratio is less than screen width high ratio Frequency display height calculates video display width according to video display height and video aspect ratio.Wherein, video display width and view The ratio of frequency display height is equal with video aspect ratio.
It is understood that being less than first threshold in video aspect ratio, or it is more than or equal to second threshold, and the wide height of video When than being equal to screen width high ratio, video display width adjusted is equal to screen display width, and video display height is equal to screen Display height, is equivalent to when carrying out video display, video is fully supported entire screen according to screen width and height, to regard When frequency is shown on the screen, all without black surround, video can be displayed in full screen for the upper and lower and left and right of screen.
It is less than first threshold in video aspect ratio, or is more than or equal to second threshold, and video aspect ratio is wide greater than screen Height than when, video display width adjusted be equal to screen width, video display height be less than screen height, be equivalent to and carrying out When video is shown, video is fully supported into entire screen according to screen width, thus the no black surround in the left and right of screen, and since video is aobvious Show that height is less than screen height, then video pictures will not overflow screen.It is less than first threshold in video aspect ratio, or is greater than Equal to second threshold, and when video aspect ratio is less than screen width high ratio, video display height adjusted is equal to screen height, depending on Frequency display width is less than screen width, is equivalent to when carrying out video display, video is fully supported entire screen according to screen height, To which screen is up and down without black surround, and since video display width is less than screen width, then video pictures will not overflow screen Curtain, to improve the display effect of video, improves user experience.
As a result, by the above-mentioned means, first threshold can be less than in video aspect ratio, or it is more than or equal to second threshold When, by video with original size or display size adjusted, it is displayed on the screen.
Below with reference to Fig. 5, video display regulation method provided by the embodiments of the present application is further described.Fig. 5 is The flow diagram of the video display regulation method of another embodiment of the application.
As shown in figure 5, video display regulation method, comprising:
Step 301, video aspect ratio and screen width high ratio are obtained, and it is default to judge whether video aspect ratio is greater than or equal to First threshold, and be less than preset second threshold, if so, then follow the steps 302, otherwise, execute step 305.
Wherein, second threshold is greater than first threshold.
Step 302, video aspect ratio and screen width high ratio are compared, to judge whether video aspect ratio is greater than or waits In screen width high ratio, if so, thening follow the steps 303, otherwise, step 304 is executed.
Step 303, height is shown using screen height as video, shows that height calculates video display width according to video.
Step 304, using screen width as video display width, video display height is calculated according to video display width.
Step 305, judge whether video meets preset original display condition according to the size of the size of video and screen, If so, thening follow the steps 306, otherwise, step 307 is executed.
Step 306, video is shown with the original size of video.
Step 307, video aspect ratio and screen width high ratio are compared, to judge whether video aspect ratio is greater than or waits In screen width high ratio, if so, thening follow the steps 308, otherwise, step 309 is executed.
Step 308, using screen width as video display width, video display height is calculated according to video display width.
Step 309, height is shown using screen height as video, shows that height calculates video display width according to video.
Specifically, the specific implementation process and principle of above-mentioned steps 301-309, are referred to the description of above-described embodiment, Details are not described herein again.
As a result, through the foregoing embodiment, can be judged to carry out video shown in Fig. 1 and Fig. 2 institute according to the ratio of width to height of video Which kind of processing in the mode shown, so that video is displayed on the screen with best display effect, to reach the mesh of hommization , improve user experience.
The video display adjusting device of the embodiment of the present application proposition is described with reference to the accompanying drawings.
Fig. 6 is the structural schematic diagram of the video display adjusting device of the application one embodiment.
As shown in fig. 6, the video display adjusting device includes: to obtain module 11, the first comparison module 12, second compare mould Block 13 and first processing module 14.
Wherein, module 11 is obtained, for obtaining video aspect ratio and screen width high ratio;
First comparison module 12, for comparing video aspect ratio and preset first threshold and preset second threshold Compared with, wherein second threshold is greater than first threshold;
Second comparison module 13, for know video aspect ratio be more than or equal to first threshold and be less than second threshold when, Video aspect ratio and screen width high ratio are compared;
First processing module 14, for being made with screen height when knowing that video aspect ratio is more than or equal to screen width high ratio Height is shown for video, shows that height calculates video display width according to video.
Specifically, video display adjusting device provided by the embodiments of the present application, can execute the application previous embodiment Video display regulation method.
In one possible implementation, first processing module 14 are also used to:
When knowing that video aspect ratio is less than screen width high ratio, using screen width as video display width, according to video Display width calculates video display height.
It should be noted that the implementation process and technical principle of the video display adjusting device of the present embodiment are referring to aforementioned right The explanation of the video display regulation method of first aspect embodiment, details are not described herein again.
Video display adjusting device provided by the embodiments of the present application, first acquisition video aspect ratio and screen width high ratio, and Video aspect ratio is compared with preset first threshold and preset second threshold, wherein second threshold is greater than the first threshold Value, then when video aspect ratio is more than or equal to first threshold and is less than second threshold, by video aspect ratio and screen width high ratio It is compared, if knowing, video aspect ratio is more than or equal to screen width high ratio, height is shown using screen height as video, according to Video display height calculates video display width.Pass through the display according to video aspect ratio and screen width high ratio, to video as a result, Size is adjusted, and when realizing video and showing on the screen, screen is up and down and left and right is without black surround, and video is complete on the screen Screen display, improves display effect, improves user experience.
In the exemplary embodiment, a kind of video display adjusting device is additionally provided.
Fig. 7 is the structural schematic diagram of the video display adjusting device of another embodiment of the application.
Referring to shown in Fig. 7, on the basis of shown in Fig. 6, the video display adjusting device of the application further include:
Judgment module 21, for know video aspect ratio be less than first threshold, alternatively, be more than or equal to second threshold when, Judge whether video meets preset original display condition according to the size of the size of video and screen;
Display module 22, for showing video with the original size of video;
Third comparison module 23, for when video is unsatisfactory for preset original display condition, by video aspect ratio and screen Curtain the ratio of width to height is compared;
Second processing module 24, for being made with screen width when knowing that video aspect ratio is more than or equal to screen width high ratio For video display width, video display height is calculated according to video display width.
In one possible implementation, Second processing module 24 are also used to:
When knowing that video aspect ratio is less than screen width high ratio, height is shown using screen height as video, according to video Display height calculates video display width.
It should be noted that the implementation process and technical principle of the video display adjusting device of the present embodiment are referring to aforementioned right The explanation of the video display regulation method of first aspect embodiment, details are not described herein again.
Video display adjusting device provided by the embodiments of the present application, first acquisition video aspect ratio and screen width high ratio, and Video aspect ratio is compared with preset first threshold and preset second threshold, wherein second threshold is greater than the first threshold Value, then when video aspect ratio is more than or equal to first threshold and is less than second threshold, by video aspect ratio and screen width high ratio It is compared, if knowing, video aspect ratio is more than or equal to screen width high ratio, height is shown using screen height as video, according to Video display height calculates video display width.Pass through the display according to video aspect ratio and screen width high ratio, to video as a result, Size is adjusted, and when realizing video and showing on the screen, screen is up and down and left and right is without black surround, and video is complete on the screen Screen display, improves display effect, improves user experience.
In order to realize above-described embodiment, the application also proposes a kind of electronic equipment.
Fig. 8 is the structural schematic diagram of the electronic equipment of the application one embodiment.The electronic equipment that Fig. 8 is shown is only one A example, should not function to the embodiment of the present application and use scope bring any restrictions.
As shown in figure 8, above-mentioned electronic equipment includes: memory 1001, processor 1002 and is stored on memory 1001 And the computer program that can be run on processor 1002, when the processor 220 executes described program, realize that first aspect is real Apply video display regulation method described in example.
In one possible implementation, electronic equipment further include:
Communication interface 1003, for the communication between memory 1001 and processor 1002.
Memory 1001, for storing the computer program that can be run on processor 1002.
Memory 1001 may include high speed RAM memory, it is also possible to further include nonvolatile memory (non- Volatile memory), a for example, at least magnetic disk storage.
Processor 1002 realizes video display regulation method described in above-described embodiment when for executing described program.
If memory 1001, processor 1002 and the independent realization of communication interface 1003, communication interface 1003, memory 1001 and processor 1002 can be connected with each other by bus and complete mutual communication.The bus can be industrial standard Architecture (Industry Standard Architecture, referred to as ISA) bus, external equipment interconnection (Peripheral Component, referred to as PCI) bus or extended industry-standard architecture (Extended Industry Standard Architecture, referred to as EISA) bus etc..The bus can be divided into address bus, data/address bus, control Bus processed etc..Only to be indicated with a thick line in Fig. 8, it is not intended that an only bus or a type of convenient for indicating Bus.
Optionally, in specific implementation, if memory 1001, processor 1002 and communication interface 1003, are integrated in one It is realized on block chip, then memory 1001, processor 1002 and communication interface 1003 can be completed mutual by internal interface Communication.
Processor 1002 may be a central processing unit (Central Processing Unit, referred to as CPU), or Person is specific integrated circuit (Application Specific Integrated Circuit, referred to as ASIC) or quilt It is configured to implement one or more integrated circuits of the embodiment of the present application.
It should be noted that the implementation process and technical principle of the electronic equipment of the present embodiment are referring to aforementioned to first aspect The explanation of the video display regulation method of embodiment, details are not described herein again.
Electronic equipment provided by the embodiments of the present application, first acquisition video aspect ratio and screen width high ratio, and video is wide Height with preset first threshold and preset second threshold than being compared, wherein second threshold is greater than the first threshold, so Afterwards when video aspect ratio is more than or equal to first threshold and is less than second threshold, video aspect ratio and screen width high ratio are compared Compared with if knowing, video aspect ratio is more than or equal to screen width high ratio, and height is shown using screen height as video, aobvious according to video Show that height calculates video display width.As a result, by according to video aspect ratio and screen width high ratio, to the display size of video into Row adjustment, when realizing video and showing on the screen, screen is up and down and left and right is without black surround, and video is full frame aobvious on the screen Show, improve display effect, improves user experience.
To realize above-described embodiment, the application also proposes a kind of computer readable storage medium.
The wherein computer readable storage medium, is stored thereon with computer program, when which is executed by processor, with Realize video display regulation method described in first aspect embodiment.
To realize above-described embodiment, the application also proposes a kind of computer program, when the instruction in computer program product When being executed by processor, video display regulation method as in the foregoing embodiment is executed.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example Point is contained at least one embodiment or example of the application.
In addition, term " first ", " second " are used for descriptive purposes only and cannot be understood as indicating or suggesting relative importance Or implicitly indicate the quantity of indicated technical characteristic.Define " first " as a result, the feature of " second " can be expressed or Implicitly include at least one this feature.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includes It is one or more for realizing specific logical function or process the step of executable instruction code module, segment or portion Point, and the range of the preferred embodiment of the application includes other realization, wherein can not press shown or discussed suitable Sequence, including according to related function by it is basic simultaneously in the way of or in the opposite order, Lai Zhihang function, this should be by the application Embodiment person of ordinary skill in the field understood.
It should be appreciated that each section of the application can be realized with hardware, software, firmware or their combination.Above-mentioned In embodiment, software that multiple steps or method can be executed in memory and by suitable instruction execution system with storage Or firmware is realized.It, and in another embodiment, can be under well known in the art for example, if realized with hardware Any one of column technology or their combination are realized: having a logic gates for realizing logic function to data-signal Discrete logic, with suitable combinational logic gate circuit specific integrated circuit, programmable gate array (PGA), scene Programmable gate array (FPGA) etc..
Those skilled in the art are understood that realize all or part of step that above-described embodiment method carries It suddenly is that relevant hardware can be instructed to complete by program, the program can store in a kind of computer-readable storage medium In matter, which when being executed, includes the steps that one or a combination set of embodiment of the method.
Storage medium mentioned above can be read-only memory, disk or CD etc..Although having been shown and retouching above Embodiments herein is stated, it is to be understood that above-described embodiment is exemplary, and should not be understood as the limit to the application System, those skilled in the art can be changed above-described embodiment, modify, replace and become within the scope of application Type.

Claims (10)

1. a kind of video display regulation method, which comprises the following steps:
Obtain video aspect ratio and screen width high ratio, and by the video aspect ratio and preset first threshold and preset second Threshold value is compared, wherein the second threshold is greater than the first threshold;
If knowing, the video aspect ratio is more than or equal to the first threshold and is less than the second threshold, and the video is wide Height with the screen width high ratio than being compared;
If knowing, the video aspect ratio is more than or equal to the screen width high ratio, and height is shown using screen height as video, Show that height calculates video display width according to the video.
2. the method as described in claim 1, which is characterized in that if knowing the video aspect ratio more than or equal to described described First threshold and be less than the second threshold, then after the video aspect ratio and the screen width high ratio being compared, also Include:
If knowing, the video aspect ratio is less than the screen width high ratio, using screen width as video display width, according to The video display width calculates video display height.
3. the method as described in claim 1, which is characterized in that described by the video aspect ratio and preset first threshold After being compared with preset second threshold, further includes:
If knowing, the video aspect ratio is less than the first threshold, alternatively, being more than or equal to the second threshold, then according to The size of video and the size of the screen judge whether the video meets preset original display condition, if so, with institute The original size for stating video shows the video.
4. method as claimed in claim 3, which is characterized in that if the video is unsatisfactory for the preset original display item Part, then the method, further includes:
The video aspect ratio and the screen width high ratio are compared;
If knowing, the video aspect ratio is more than or equal to the screen width high ratio, using screen width as video display width, Video display height is calculated according to the video display width.
5. method as claimed in claim 4, which is characterized in that further include:
If knowing, the video aspect ratio is less than the screen width high ratio, and height is shown using screen height as video, according to The video display height calculates video display width.
6. a kind of video display adjusting device characterized by comprising
Module is obtained, for obtaining video aspect ratio and screen width high ratio;
First comparison module, for comparing the video aspect ratio and preset first threshold and preset second threshold Compared with, wherein the second threshold is greater than the first threshold;
Second comparison module, for knowing the video aspect ratio more than or equal to the first threshold and being less than second threshold When value, the video aspect ratio and the screen width high ratio are compared;
First processing module, for know the video aspect ratio be more than or equal to the screen width high ratio when, with screen height Height is shown as video, shows that height calculates video display width according to the video.
7. device as claimed in claim 6, which is characterized in that the first processing module is also used to:
When knowing that the video aspect ratio is less than the screen width high ratio, using screen width as video display width, according to The video display width calculates video display height.
8. device as claimed in claim 6, which is characterized in that further include:
Judgment module, for knowing the video aspect ratio less than the first threshold, alternatively, being more than or equal to second threshold When value, judge whether the video meets preset original display item according to the size of the size of the video and the screen Part;
Display module, for showing the video with the original size of the video.
9. a kind of electronic equipment characterized by comprising
Memory, processor and storage are on a memory and the computer program that can run on a processor, the processor are held Video display regulation method according to any one of claims 1 to 5 is realized when row described program.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor Video display regulation method according to any one of claims 1 to 5 is realized when execution.
CN201910574577.6A 2019-06-28 2019-06-28 Video display adjustment method and device, electronic equipment and storage medium Pending CN110286868A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910574577.6A CN110286868A (en) 2019-06-28 2019-06-28 Video display adjustment method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910574577.6A CN110286868A (en) 2019-06-28 2019-06-28 Video display adjustment method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110286868A true CN110286868A (en) 2019-09-27

Family

ID=68019598

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910574577.6A Pending CN110286868A (en) 2019-06-28 2019-06-28 Video display adjustment method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110286868A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111045764A (en) * 2019-11-18 2020-04-21 北京金山安全软件有限公司 Interface adaptation method and device, electronic equipment and storage medium
CN111263188A (en) * 2020-02-17 2020-06-09 腾讯科技(深圳)有限公司 Video image quality adjusting method and device, electronic equipment and storage medium
CN114945106A (en) * 2022-04-18 2022-08-26 海信视像科技股份有限公司 Display apparatus, content display method, and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040025112A1 (en) * 2002-08-01 2004-02-05 Chasen Jeffrey Martin Method and apparatus for resizing video content displayed within a graphical user interface
CN101662605A (en) * 2009-09-17 2010-03-03 青岛海信电器股份有限公司 Method and device for adjusting display scale of television
CN103260074A (en) * 2012-02-21 2013-08-21 联想(北京)有限公司 Method, device and terminal of image displaying
CN103297729A (en) * 2013-06-17 2013-09-11 华为终端有限公司 Video processing method and device
CN103561312A (en) * 2013-10-30 2014-02-05 乐视致新电子科技(天津)有限公司 Method and device for adjusting video playing interface
CN103700360A (en) * 2013-12-09 2014-04-02 乐视致新电子科技(天津)有限公司 Screen display proportion regulating method and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040025112A1 (en) * 2002-08-01 2004-02-05 Chasen Jeffrey Martin Method and apparatus for resizing video content displayed within a graphical user interface
CN101662605A (en) * 2009-09-17 2010-03-03 青岛海信电器股份有限公司 Method and device for adjusting display scale of television
CN103260074A (en) * 2012-02-21 2013-08-21 联想(北京)有限公司 Method, device and terminal of image displaying
CN103297729A (en) * 2013-06-17 2013-09-11 华为终端有限公司 Video processing method and device
CN103561312A (en) * 2013-10-30 2014-02-05 乐视致新电子科技(天津)有限公司 Method and device for adjusting video playing interface
CN103700360A (en) * 2013-12-09 2014-04-02 乐视致新电子科技(天津)有限公司 Screen display proportion regulating method and electronic equipment

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111045764A (en) * 2019-11-18 2020-04-21 北京金山安全软件有限公司 Interface adaptation method and device, electronic equipment and storage medium
CN111045764B (en) * 2019-11-18 2023-09-08 北京欢乐扬帆科技有限公司 Interface adaptation method and device, electronic equipment and storage medium
CN111263188A (en) * 2020-02-17 2020-06-09 腾讯科技(深圳)有限公司 Video image quality adjusting method and device, electronic equipment and storage medium
CN111263188B (en) * 2020-02-17 2021-10-08 腾讯科技(深圳)有限公司 Video image quality adjusting method and device, electronic equipment and storage medium
CN114945106A (en) * 2022-04-18 2022-08-26 海信视像科技股份有限公司 Display apparatus, content display method, and storage medium

Similar Documents

Publication Publication Date Title
CN108335279B (en) Image fusion and HDR imaging
TWI524732B (en) Real-time automatic conversion of 2-dimensional images or video to 3-dimensional stereo images or video
CN110286868A (en) Video display adjustment method and device, electronic equipment and storage medium
WO2018176925A1 (en) Hdr image generation method and apparatus
US11839721B2 (en) Information processing apparatus, information processing method, and storage medium
US9667841B2 (en) Image processing apparatus and image processing method
WO2016165060A1 (en) Skin detection based on online discriminative modeling
US20130162625A1 (en) Displayed Image Improvement
CN110866486B (en) Subject detection method and apparatus, electronic device, and computer-readable storage medium
TW201742001A (en) Method and device for image noise estimation and image capture apparatus
CN103702032A (en) Image processing method, device and terminal equipment
JP6715864B2 (en) Method and apparatus for determining a depth map for an image
CN110852334A (en) System and method for adaptive pixel filtering
CN109615620B (en) Image compression degree identification method, device, equipment and computer readable storage medium
TWI524782B (en) Image processing apparatus and image processing method
CN113014817B (en) Method and device for acquiring high-definition high-frame video and electronic equipment
US20090289969A1 (en) Image processing method and system
US20170310872A1 (en) Image dynamic range adjustment method, terminal, and storage medium
US9111362B2 (en) Method, system and apparatus for applying histogram equalization to an image
US10964028B2 (en) Electronic device and method for segmenting image
CN108470327B (en) Image enhancement method and device, electronic equipment and storage medium
JP4482933B2 (en) Motion vector detection device, image display device, image imaging device, motion vector detection method, program, and recording medium
CN112237002A (en) Image processing method and apparatus
TW201435807A (en) Method, apparatus, and non-transitory computer readable medium for enhancing image contrast
WO2023193648A1 (en) Image processing method and apparatus, electronic device, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination