[go: up one dir, main page]

CN108134938B - Video scanning mode detection and correction method, video playing method and device - Google Patents

Video scanning mode detection and correction method, video playing method and device Download PDF

Info

Publication number
CN108134938B
CN108134938B CN201611093587.0A CN201611093587A CN108134938B CN 108134938 B CN108134938 B CN 108134938B CN 201611093587 A CN201611093587 A CN 201611093587A CN 108134938 B CN108134938 B CN 108134938B
Authority
CN
China
Prior art keywords
scanning mode
video
field image
code stream
image frame
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.)
Active
Application number
CN201611093587.0A
Other languages
Chinese (zh)
Other versions
CN108134938A (en
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201611093587.0A priority Critical patent/CN108134938B/en
Publication of CN108134938A publication Critical patent/CN108134938A/en
Application granted granted Critical
Publication of CN108134938B publication Critical patent/CN108134938B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/65Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using error resilience
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44008Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Television Systems (AREA)

Abstract

The invention provides a video scanning mode detection and correction method, a video playing device and a computer storage medium, wherein an image frame is extracted from a video code stream to be detected, then top field images and bottom field images of the image frame are subjected to reverse interleaving processing respectively to obtain top field image frames and bottom field image frames, then difference values between the top field image frames and the bottom field image frames are calculated, comparison is carried out according to the calculated difference values and preset difference threshold values, then the fact that the video code stream is scanned in a progressive scanning mode or an interlaced scanning mode is determined according to comparison results, compared with the existing scanning mode that the video code stream is determined through coding parameters in the video code stream, the fact that the video code stream is scanned in a progressive scanning mode or an interlaced scanning mode can be accurately identified, the video quality is prevented from being influenced by the fact that the scanning mode is identified in an error, and the user experience satisfaction degree is improved.

Description

Video scanning mode detection and correction method, video playing method and device
Technical Field
The invention relates to the technical field of videos, in particular to a video scanning mode detection and correction method, a video playing method and a video playing device.
Background
When recording video, there are two scanning modes for the data acquisition of source image: interlaced scanning and progressive scanning, wherein:
interlaced scanning is to acquire one Field of image at a time, alternately acquire a Top Field (Top Field) image and a Bottom Field (Bottom Field) image, the time of acquiring the Top Field image and the Bottom Field image are different, and the two fields are combined to form one frame of image.
Progressive scanning is to acquire one frame of image at a time, with the top field image and the bottom field image being acquired at the same time. For an interlaced video source, deinterlace (deinterlace) technology is needed to perform deinterlace processing during decoding, a top field image and a bottom field image of one frame cannot be directly superimposed, and otherwise, a final displayed image has a sawtooth phenomenon.
For a progressive video source, the deinterlace process is not required because the top field picture and the bottom field picture are at the same time. The film source is interlaced scanning or progressive scanning, and coding parameters in the video code stream can be identified. In practical applications, the scanning mode identified by the encoding parameters of many videos is not consistent with the scanning mode adopted in actual source image acquisition, for example, the encoding parameter identification is progressive scanning, and actually, the video source is interlaced scanning acquisition. The reasons for this are also various, such as transcoding the film source, default processing of the transcoding software by progressive scanning, or wrong configuration of the encoder parameters, which cannot be completely avoided. When a general decoder decodes a video, the video is processed according to coding parameters, and if the coding parameters identify that a slice source is interlaced, deinterlace processing is performed. If the coding parameters identify the slice source as progressive, then no interlace processing is performed. However, if the progressive slice source is actually interlaced, aliasing occurs and video quality is affected. Therefore, how to identify the actual scanning mode of the video code stream is a technical problem which needs to be solved urgently.
Disclosure of Invention
The embodiment of the invention provides a video scanning mode detection and correction method, a video playing method and a video playing device, and aims to solve the problem that the actual scanning mode of a video code stream cannot be accurately identified in the prior art.
In order to solve the above problem, the present invention provides a video scanning mode detection method, including:
extracting image frames from a video code stream to be detected;
respectively carrying out anti-interlacing processing on the top field image and the bottom field image of the image frame to obtain a top field image frame and a bottom field image frame;
calculating a difference value between the top field image frame and the bottom field image frame;
and comparing the difference value with a preset difference threshold value, and determining the scanning mode of the video code stream according to the comparison result.
In order to solve the above problem, the present invention further provides a video playing method, including:
determining the scanning mode of the video code stream to be played by the video scanning mode detection method;
and controlling the switch of the anti-interleaving processing module in the video code stream playing process according to the determined scanning mode.
In order to solve the above problem, the present invention further provides a method for correcting a video scanning mode, including:
determining the scanning mode of the video code stream to be detected by the video scanning mode detection method;
and judging whether the scanning mode of the video code stream identifier is consistent with the determined scanning mode, if not, updating the scanning mode of the video code stream identifier to the determined scanning mode.
In order to solve the above problem, the present invention further provides a video scanning mode detection apparatus, including:
the image frame extraction module is used for extracting image frames from a video code stream to be detected;
the anti-interlacing processing module is used for respectively carrying out anti-interlacing processing on the top field image and the bottom field image of the image frame to obtain a top field image frame and a bottom field image frame;
the calculating module is used for calculating a difference value between the top field image frame and the bottom field image frame;
and the analysis module is used for comparing the difference value with a preset difference threshold value and determining the scanning mode of the video code stream according to the comparison result.
In order to solve the above problem, the present invention further provides a video playing device, which is characterized in that the video playing device comprises a control module and the video scanning mode detection device;
the video scanning mode detection device is used for determining a scanning mode of a video code stream to be played;
the control module is used for controlling the switch of the anti-interleaving processing module in the video code stream playing process according to the scanning mode determined by the video scanning mode detection device.
In order to solve the above problem, the present invention further provides a video scanning mode correction apparatus, which is characterized in that the apparatus comprises an update module and the video scanning mode detection apparatus as described above;
the video scanning mode detection device is used for determining a scanning mode of a video code stream to be detected;
the updating module is used for judging whether the scanning mode of the video code stream identifier is consistent with the scanning mode determined by the video scanning mode detection device, and if not, updating the scanning mode of the video code stream identifier into the determined scanning mode.
The embodiment of the invention also provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used for executing the video scanning mode detection, correction and playing method.
Advantageous effects
According to the video scanning mode detection and correction method, the video playing device and the computer storage medium, the image frame is extracted from the video code stream to be detected, then the top field image and the bottom field image of the image frame are subjected to reverse interleaving processing respectively to obtain the top field image frame and the bottom field image frame, the difference value between the top field image frame and the bottom field image frame is calculated, the difference value obtained through calculation is compared with the preset difference threshold value, the actual scanning mode of the video code stream is determined to be progressive scanning or interlaced scanning according to the comparison result, compared with the existing scanning mode of the video code stream, the actual scanning mode of the video code stream can be accurately identified, the video quality is prevented from being influenced by the error identification of the scanning mode, and the user experience satisfaction degree is improved.
Drawings
FIG. 1 is a flowchart illustrating a video scanning mode detection method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a video playing method according to a second embodiment of the present invention;
fig. 3 is a schematic view illustrating a video playing control flow according to a second embodiment of the present invention;
FIG. 4 is a flowchart illustrating a video scanning correction method according to a third embodiment of the present invention;
FIG. 5 is a schematic view illustrating a process flow of correcting a video scanning manner according to a third embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a video scanning mode detection apparatus according to a fourth embodiment of the present invention;
fig. 7 is a schematic structural diagram of a video playback device according to a fourth embodiment of the present invention;
fig. 8 is a schematic structural diagram of a video scanning correction apparatus according to a fourth embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The first embodiment is as follows:
in order to solve the problem that the actual scanning mode of the video code stream cannot be accurately identified in the prior art, an image frame is extracted from the video code stream to be detected, then a top field image and a bottom field image of the image frame are respectively subjected to deinterlace (deinterlace) to obtain a top field image frame and a bottom field image frame, a difference value between the top field image frame and the bottom field image frame is further calculated, the difference value obtained through calculation is compared with a preset difference threshold value, and the actual scanning mode of the video code stream is determined to be progressive scanning or interlaced scanning according to a comparison result. As shown in fig. 1, the method for detecting a video scanning mode includes:
s101: and extracting image frames from the video code stream to be detected.
Before executing S101, the present embodiment further includes a process of acquiring a video code stream to be detected, where the acquisition mode may be acquired from a remote server, or may be read from a local storage device. The specific acquisition mode can be flexibly selected and set according to the specific application scene.
In this embodiment, before extracting the image frame from the video code stream to be detected, decoding the obtained video code stream is further included, and specifically, the obtained video code stream to be detected may be injected into the video decoding module for decoding processing. And the video decoding module decodes the injected video code stream data to generate a decoded image.
S102: and respectively carrying out deinterlacing (deinterlace) on the top field image and the bottom field image of the extracted image frame to obtain a complete top field image frame and a complete bottom field image frame.
Deinterlace (deinterlace) is a method of converting interlaced video into progressive video in order to remove an interlacing phenomenon in which two fields of images of the interlaced video are merged together. The deinterlace algorithm adopts a dynamic compensation method, uses dynamic estimation (motion estimation) to predict the movement of objects in a picture between adjacent fields according to the adjacent fields, obtains a dynamic vector (motion vector) of each macro block (macroblock) in the picture by dynamic estimation, then uses the former field and the dynamic vector to reconstruct a new field, namely, to fill up the image of the other field at the same time, and then uses the two fields and completes deinterlacing to obtain a complete top field image frame (marked as F)t) And bottom field image frame (labeled F)b)。
S103: top field image frame F obtained by calculationtAnd bottom field image frame FbThe difference between them.
The difference value in this embodiment is various index values for embodying the progressive scanning mode and the interlaced scanning mode.
S104: and comparing the obtained difference value with a preset difference threshold value, and determining whether the scanning mode of the video code stream is a progressive scanning mode or an interlaced scanning mode according to the comparison result. Compared with the existing scanning mode of determining the video code stream through the coding parameters in the video code stream, the method can accurately identify the actual scanning mode of the video code stream, avoid influencing the video quality due to the identification error of the scanning mode, and improve the satisfaction degree of user experience.
In this embodiment, the top field image frame F of one image frame is calculatedtAnd bottom field image frame FbThe difference value calculation principle between F and F can be calculatedtAnd FbThe sum of the difference values of all corresponding pixels (i.e., pixels at the same position). One pixel is represented by YUV color coding, Y represents luminance, i.e., gray scale value, and U and V represent chrominance, which is used to describe color and saturation. In this embodiment, the difference between two pixels can be represented by the absolute value of the difference between the luminance values of the two pixels, and the top field image frame F is takentAnd bottom field image frame FbThe sum of the brightness difference values of all the pixel points is the top field image frame FtAnd bottom field image frame FbAnd the corresponding preset difference threshold comprises a brightness difference threshold.
For example, assume top field image frame FtAnd bottom field image frame FbThe number of the pixel points is N, FtAnd FbThe brightness values of the pixel points are respectively marked as YtkAnd Ybk. Then FtAnd FbThe difference value D of (a) can be calculated by the following formula:
Figure BDA0001168781860000061
then F calculated by the difference calculating moduletAnd FbAnd judging the actual scanning mode of the video code stream according to the difference value D and a preset brightness difference threshold value. For progressive video, the top field picture and the bottom field picture are at the same time, so FtAnd FbAre substantially the same, so that the difference in brightness between them is approximately equal to 0; whereas for interlaced video, the top field picture and the bottom field picture are of different time instants, FtAnd FbThe brightness values of the two parts have a certain difference, so that the brightness difference threshold Thr can be set to be slightly larger than 0, and accurate judgment can be carried out. The setting of the specific value can be flexibly set according to the specific application scene.
Based on the above setting, if the obtained D < ═ Thr, the scanning mode of the video code stream is determined to be progressive scanning, and if D > Thr, the scanning mode of the video code stream is determined to be interlaced scanning.
In addition, in this embodiment, the difference between two pixels may also be expressed by using the absolute value of the difference between the luminance values of the two pixels and the absolute value of the difference between the color saturation values, and the top field image frame F may be comprehensively takentAnd bottom field image frame FbAnd taking the sum of the brightness value difference values and the sum of the color saturation differences of all the pixels as the difference value between the top field image frame and the bottom field image frame. Specifically, the sum of the luminance value differences between pixels at the same positions of the top field image frame and the bottom field image frame is calculated, and the sum of the color saturation differences between pixels at the same positions of the top field image frame and the bottom field image frame is calculated;
then, a composite value of the sum of the luminance value differences and the sum of the color saturation differences is calculated as a difference value between the top field image frame and the bottom field image frame. When the comprehensive value is calculated, the weights of the brightness value difference and the color saturation difference can be flexibly set according to specific application scenes.
Of course, it should be understood that, in this embodiment, the sum of the differences between the color saturation of the pixels at the same positions in the top field image frame and the bottom field image frame may also be directly calculated as the difference value between the top field image frame and the bottom field image frame. The calculation modes of the three difference values can be flexibly selected according to specific requirements.
In addition, since there is a possibility that a continuous static picture exists in a video, even in an interlaced video, the top field and the bottom field of the same frame may have the same content, in order to improve the detection accuracy, multiple frames may be detected continuously, for example, all frames within 10 seconds may be detected, and if each frame is D < ═ Thr, the video is determined to be progressive, otherwise, the video is determined to be interlaced. That is, in this embodiment, the extracting the image frame from the video bitstream to be detected may be: and extracting continuous N image frames from the video code stream to be detected, wherein N is more than or equal to 2, such as 5, 10 and the like, and the specific value can be flexibly set according to a specific application scene. Determining the scanning mode of the video code stream according to the comparison result comprises the following steps:
if the difference value between the top field image frame and the bottom field image frame of the extracted N image frames is larger than a preset difference threshold value, determining that the scanning mode of the video code stream is interlaced scanning; otherwise, determining the scanning mode of the video code stream to be progressive scanning.
Compared with the existing scanning mode for determining the video code stream through the encoding parameters in the video code stream, the scheme for detecting the actual scanning mode of the video code stream provided by the embodiment can accurately identify the actual scanning mode of the video code stream, avoid the influence on the video quality due to the identification error of the scanning mode, and improve the satisfaction degree of user experience.
Example two:
in this embodiment, a playing method is provided based on the video scanning mode detection method in the first embodiment, as shown in fig. 2, including:
s201: determining a scanning mode of a video code stream to be played by using the video scanning mode detection method shown in the first embodiment;
s202: controlling the switch of the anti-interleaving processing module in the video code stream playing process according to the determined scanning mode, comprising the following steps:
when the scanning mode of the video code stream is determined to be interlaced scanning, the anti-interlacing processing module is controlled to be started in the playing process of the video code stream;
and when the scanning mode of the video code stream is determined to be progressive scanning, controlling the anti-interleaving processing module to be closed in the playing process of the video code stream.
By adopting the playing method provided by the embodiment, various video player devices or software can avoid the staggered saw-tooth phenomenon under the condition that the scanning mode identification of the video film source is wrong. The following description exemplifies the flow of play control, as shown in fig. 3, including:
s301: the playing device (which can be various players) receives the video coding code stream sent by the remote server, or reads the video coding code stream from the local storage device, and injects the code stream data into the video decoding module.
S302: and the video decoding module decodes the injected video code stream data to generate a decoded image.
S303: and respectively generating a top field image frame Ft and a bottom field image frame Fb at the moment by respectively extracting a top field image and a bottom field image of the N frames of images from the decoded images and respectively passing through a deinterlace processing module.
And S304, calculating the difference value D of the Ft and the Fb through a difference calculating module.
S305: judging the actual scanning mode of the video according to the difference value and the brightness difference threshold Thr, if D < ═ Thr, determining that the frame is scanned line by line, and going to S306; if D > Thr, the frame is considered to be interlaced, all frames within 10 seconds are continuously detected, if each frame is D < ═ Thr, the video is determined to be progressive, otherwise, the video is determined to be interlaced, and the process goes to S307;
s306, the subsequent playing does not carry out interlace processing, and the anti-interleaving processing module is closed.
S307: and starting the anti-interleaving processing module, and continuing the interface processing of the subsequent playing.
The embodiment can automatically carry out detection again according to the steps at intervals, and can carry out correction if the video scanning mode changes.
It should be noted that some video film sources transcoded by the transcoder are interlaced before transcoding, and the coding parameters are identified as progressive film sources after transcoding, and actually the film sources are interlaced during image acquisition. When the decoder decodes according to the general method, the picture source is processed according to progressive scanning, and two field images of the same frame are directly overlapped and then output. In fact, the two images are images at different moments and are directly superposed together, and the edge of a moving object has a sawtooth phenomenon.
By using the playing method of the embodiment, the actual scanning mode of the film source is detected, and the correct processing is performed according to the actual scanning mode. Like the above-mentioned film source, when the decoder detects that the actual scanning mode is interlaced scanning, the decoder performs interlace processing, so that the aliasing phenomenon can be eliminated, and the satisfaction degree of user experience is improved.
Example three:
in this embodiment, on the basis of the video scanning mode detection method provided in the first embodiment, a video scanning mode correction method is provided, as shown in fig. 4, and includes:
s401: determining a scanning mode of a video code stream to be detected by the video scanning mode detection method shown in the first embodiment;
s402: judging whether the scanning mode of the video code stream identifier is consistent with the determined scanning mode, if not, performing full-time S403; otherwise, go to S404;
s403: the scanning mode identified by the video stream is updated to the determined scanning mode, for example, if the determined scanning mode is interlaced scanning and the scanning mode identified (which may be identified by, but is not limited to, the encoding parameter) is progressive scanning, the scanning mode is updated to interlaced scanning.
S404: the scanning mode of the video stream identifier is not updated.
By the modification method provided by the embodiment, a video content provider can modify the film source with the wrong coding parameter identification in some video scanning modes, so that the hidden danger of poor playing effect of terminal equipment is reduced. The specific correction process is shown in fig. 5, and includes:
s501: and inputting a certain film source in the video film source library to be detected into a video decoding module for decoding to generate a decoded image.
S502: and respectively generating frame images Ft and Fb at the moment by respectively passing the top field image and the bottom field image of the decoded frame image through a deinterlace processing module.
S503: ft and Fb are calculated by a difference meter to obtain a difference value D of the two.
S504: and determining a scanning mode according to the difference value D and a preset threshold Thr. If D < ═ Thr, the frame is considered progressive scanning, and if D > Thr, the frame is considered interlaced scanning. In order to guarantee higher detection accuracy, all frames within 60 seconds can be detected continuously, and if each frame is D < ═ Thr, the video is determined to be progressive, otherwise, the video is determined to be interlaced.
S505: judging whether the determined scanning mode is consistent with the scanning mode of the video code stream identifier, if so, turning to S506; otherwise, go to S507.
S506: if the actual scanning mode is consistent with the coding parameter identification, the film source is kept unchanged.
S507: and correcting the error scanning mode encoding parameters. At this time, the actual scanning mode is inconsistent with the coding parameter identification, and the coding is carried out again for correction.
And continuing to detect and correct the subsequent film sources according to the steps until all the film sources in the video film source library to be detected are detected and corrected.
Example four:
the present embodiment provides a video scanning mode detection apparatus, as shown in fig. 6, including:
and the image frame extracting module 63 is configured to extract an image frame from the video code stream to be detected.
The video scanning mode detection apparatus in this embodiment may further include a data obtaining module 61 and a video decoding module 62, where the data obtaining module 61 is configured to obtain a video code stream to be detected from a remote server, and may also read a video coding code stream from a local storage device. The specific acquisition mode can be flexibly selected and set according to the specific application scene. The data obtaining module 61 may specifically inject the obtained video code stream to be detected into the video decoding module 62 for decoding. The video decoding module 62 decodes the injected video code stream data to generate a decoded image.
An anti-interlacing processing module 64, configured to perform anti-interlacing processing on the top field image and the bottom field image of the image frame respectively to obtain a top field image frame and a bottom field image frame; the deinterlace module 64 converts the interlaced video into progressive scanning in order to eliminate the interlacing phenomenon that occurs when two fields of images of the interlaced video are merged together. The interlace algorithm employs a motion compensation method, and uses motion estimation (motion estimation) to predict the motion of objects in the picture between adjacent fields according to the adjacent fields, so as to obtain the picture by motion estimationThe motion vector (motion vector) of each macroblock (macroblock) in the plane is then used to reconstruct a new field using the previous field and the motion vector, i.e. to fill up the image of the other field at the same time, and then the two fields are de-interlaced to obtain a complete top field image frame (marked as F)t) And bottom field image frame (labeled F)b)。
A calculating module 65, configured to calculate a difference value between the top field image frame and the bottom field image frame; the difference value in this embodiment is various index values for embodying the progressive scanning mode and the interlaced scanning mode. The calculating module 65 calculates a disparity value between the top field image frame and the bottom field image frame includes:
calculating the sum of the brightness value differences between pixels at the same positions of the top field image frame and the bottom field image frame as a difference value between the top field image frame and the bottom field image frame;
or the like, or, alternatively,
calculating the sum of the brightness value differences between the pixels at the same positions of the top field image frame and the bottom field image frame, and calculating the sum of the color saturation differences between the pixels at the same positions of the top field image frame and the bottom field image frame;
a composite value of the sum of the luminance value differences and the sum of the color saturation differences is calculated as a difference value between the top field image frame and the bottom field image frame.
And the analysis module 66 is configured to compare the difference value with a preset difference threshold, and determine a scanning mode of the video code stream according to a comparison result. Specifically, the difference value is compared with a preset difference threshold value, and if the difference value is larger than the preset difference threshold value, the scanning mode of the video code stream is determined to be interlaced scanning; otherwise, determining the scanning mode of the video code stream to be progressive scanning.
The video scanning mode detection device in this embodiment is applicable to any player or scanning mode correction device. Compared with the existing scanning mode of determining the video code stream through the coding parameters in the video code stream, the method can accurately identify the actual scanning mode of the video code stream, avoid the influence on the video quality due to the identification error of the scanning mode, and improve the satisfaction degree of user experience.
Example five:
the present embodiment provides a video playing apparatus, as shown in fig. 7, including a control module 67 and a video scanning mode detection apparatus as shown in the fourth embodiment;
the video scanning mode detection device is used for determining the scanning mode of the video code stream to be played;
the control module 67 is configured to control the switch of the deinterlace processing module in the video stream playing process according to the scanning mode determined by the video scanning mode detection device, and specifically includes:
when the control module 67 determines that the scanning mode of the video code stream is interlaced scanning, the control module controls the anti-interlacing processing module to be started in the playing process of the video code stream;
when the control module 67 determines that the scanning mode of the video code stream is progressive scanning, the control module controls the anti-interleaving processing module to be closed in the playing process of the video code stream.
By using the video playing device of the embodiment, the actual scanning mode of the film source can be detected, and the correct processing can be performed according to the actual scanning mode. Like the above-mentioned film source, when the decoder detects that the actual scanning mode is interlaced scanning, the decoder performs interlace processing, so that the aliasing phenomenon can be eliminated, and the satisfaction degree of user experience is improved.
Example six:
the present embodiment provides a video scanning mode correcting apparatus, as shown in fig. 8, including an updating module 68 and a video scanning mode detecting apparatus as shown in the fourth embodiment;
the video scanning mode detection device is used for determining a scanning mode of a video code stream to be detected;
the updating module 68 is configured to determine whether a scanning mode of the video code stream identifier is consistent with a scanning mode determined by the video scanning mode detection device, and if not, update the scanning mode of the video code stream identifier to the determined scanning mode; if yes, no update is made.
For example, if the determined scan mode is interlaced and the identified scan mode (which may be identified by, but not limited to, encoding parameters) is progressive, the update module 68 updates it to interlaced.
The video scanning mode correcting device provided by the embodiment can be used for detecting and correcting subsequent film sources until all the film sources in the video film source library to be detected are detected and corrected, so that the accurate identification of the video scanning mode is ensured, and the user experience satisfaction is improved.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the invention described above may be implemented in a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented in program code executable by a computing device, such that they may be stored on a computer storage medium (ROM/RAM, magnetic disk, optical disk) and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The embodiment provides a display interface zooming control device and a terminal comprising the same, when a user operates the device, the user can realize the zooming operation of a display screen by inputting fingerprint information through a fingerprint acquisition module 91, the zoomed display interface is more favorable for the user to carry out one-hand operation, the problem of inconvenience in one-hand operation of the user due to the fact that the display screen is too large is solved, the user experience is improved, and the popularization and the application of products are facilitated.
The foregoing is a more detailed description of the present invention that is presented in conjunction with specific embodiments, and the practice of the invention is not to be considered limited to those descriptions. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (9)

1. A video scanning mode detection method comprises the following steps:
extracting image frames from a video code stream to be detected;
respectively carrying out anti-interlacing processing on the top field image and the bottom field image of the image frame to obtain a top field image frame and a bottom field image frame;
calculating a difference value between the top field image frame and the bottom field image frame;
comparing the difference value with a preset difference threshold value, and determining the scanning mode of the video code stream according to the comparison result, wherein the scanning mode comprises the following steps: comparing the difference value with a preset difference threshold value, and if the difference value is larger than the preset difference threshold value, determining that the scanning mode of the video code stream is interlaced scanning; otherwise, determining the scanning mode of the video code stream to be progressive scanning.
2. The method of claim 1 wherein computing disparity values between the top field image frame and the bottom field image frame comprises:
calculating the sum of the brightness value differences between pixels at the same positions of the top field image frame and the bottom field image frame as a difference value between the top field image frame and the bottom field image frame;
or the like, or, alternatively,
calculating the sum of the differences of color saturation between pixels at the same positions of the top field image frame and the bottom field image frame as a difference value between the top field image frame and the bottom field image frame;
or the like, or, alternatively,
calculating the sum of the brightness value differences between the pixels at the same positions of the top field image frame and the bottom field image frame, and calculating the sum of the color saturation differences between the pixels at the same positions of the top field image frame and the bottom field image frame;
and calculating a comprehensive value of the sum of the brightness value differences and the sum of the color saturation differences as a difference value between the top field image frame and the bottom field image frame.
3. The video scanning mode detection method of claim 1 or 2, wherein extracting the image frames from the video stream to be detected is: extracting continuous N image frames from a video code stream to be detected, wherein N is more than or equal to 2;
determining the scanning mode of the video code stream according to the comparison result comprises the following steps:
if the difference value between the top field image frame and the bottom field image frame of the N image frames is larger than the preset difference threshold value, determining that the scanning mode of the video code stream is interlaced scanning; otherwise, determining the scanning mode of the video code stream to be progressive scanning.
4. A video playback method, comprising:
determining a scanning mode of a video code stream to be played by the video scanning mode detection method according to any one of claims 1 to 3;
and controlling the switch of the anti-interleaving processing module in the video code stream playing process according to the determined scanning mode.
5. The video playing method of claim 4, wherein controlling the switch of the anti-interleaving processing module of the video stream during the playing process according to the determined scanning mode comprises:
when the scanning mode of the video code stream is determined to be interlaced scanning, the anti-interlacing processing module is controlled to be started in the playing process of the video code stream;
and when the scanning mode of the video code stream is determined to be progressive scanning, controlling the anti-interleaving processing module to be closed in the playing process of the video code stream.
6. A method for correcting a video scanning mode comprises the following steps:
determining a scanning mode of a video code stream to be detected by the video scanning mode detection method according to any one of claims 1 to 3;
and judging whether the scanning mode of the video code stream identifier is consistent with the determined scanning mode, if not, updating the scanning mode of the video code stream identifier to the determined scanning mode.
7. A video scanning mode detection device comprises:
the image frame extraction module is used for extracting image frames from a video code stream to be detected;
the anti-interlacing processing module is used for respectively carrying out anti-interlacing processing on the top field image and the bottom field image of the image frame to obtain a top field image frame and a bottom field image frame;
the calculating module is used for calculating a difference value between the top field image frame and the bottom field image frame;
the analysis module is used for comparing the difference value with a preset difference threshold value and determining the scanning mode of the video code stream according to the comparison result, and comprises the following steps: comparing the difference value with a preset difference threshold value, and if the difference value is larger than the preset difference threshold value, determining that the scanning mode of the video code stream is interlaced scanning; otherwise, determining the scanning mode of the video code stream to be progressive scanning.
8. A video playback apparatus comprising a control module and the video scanning mode detection apparatus according to claim 7;
the video scanning mode detection device is used for determining a scanning mode of a video code stream to be played;
the control module is used for controlling the switch of the anti-interleaving processing module in the video code stream playing process according to the scanning mode determined by the video scanning mode detection device.
9. A video scan pattern correction apparatus comprising an update module and the video scan pattern detection apparatus according to claim 7;
the video scanning mode detection device is used for determining a scanning mode of a video code stream to be detected;
the updating module is used for judging whether the scanning mode of the video code stream identifier is consistent with the scanning mode determined by the video scanning mode detection device, and if not, updating the scanning mode of the video code stream identifier into the determined scanning mode.
CN201611093587.0A 2016-12-01 2016-12-01 Video scanning mode detection and correction method, video playing method and device Active CN108134938B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611093587.0A CN108134938B (en) 2016-12-01 2016-12-01 Video scanning mode detection and correction method, video playing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611093587.0A CN108134938B (en) 2016-12-01 2016-12-01 Video scanning mode detection and correction method, video playing method and device

Publications (2)

Publication Number Publication Date
CN108134938A CN108134938A (en) 2018-06-08
CN108134938B true CN108134938B (en) 2021-08-06

Family

ID=62388203

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611093587.0A Active CN108134938B (en) 2016-12-01 2016-12-01 Video scanning mode detection and correction method, video playing method and device

Country Status (1)

Country Link
CN (1) CN108134938B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111885335B (en) * 2020-06-19 2022-03-29 成都东方盛行电子有限责任公司 Ultrahigh-definition down-conversion rendering method
CN115633144A (en) * 2022-10-21 2023-01-20 抖音视界有限公司 Video processing method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1585456A (en) * 2003-08-20 2005-02-23 上海乐金广电电子有限公司 Scanning mode converting method for TV-set
CN101159838A (en) * 2007-11-14 2008-04-09 北京华纬讯电信技术有限公司 Method of improving video image display quality using separation processing
CN102104712A (en) * 2009-12-22 2011-06-22 华为终端有限公司 Video data processing method, central processing unit and terminal
CN103563354A (en) * 2011-04-11 2014-02-05 英特尔公司 Detecting video formats

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8300958B2 (en) * 2007-07-11 2012-10-30 Samsung Electronics Co., Ltd. System and method for detecting scrolling text in mixed mode film and video
US20090219439A1 (en) * 2008-02-28 2009-09-03 Graham Sellers System and Method of Deinterlacing Interlaced Video Signals to Produce Progressive Video Signals
IN2014CN03184A (en) * 2011-11-02 2015-07-03 Nec Corp

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1585456A (en) * 2003-08-20 2005-02-23 上海乐金广电电子有限公司 Scanning mode converting method for TV-set
CN101159838A (en) * 2007-11-14 2008-04-09 北京华纬讯电信技术有限公司 Method of improving video image display quality using separation processing
CN102104712A (en) * 2009-12-22 2011-06-22 华为终端有限公司 Video data processing method, central processing unit and terminal
CN103563354A (en) * 2011-04-11 2014-02-05 英特尔公司 Detecting video formats

Also Published As

Publication number Publication date
CN108134938A (en) 2018-06-08

Similar Documents

Publication Publication Date Title
US8175163B2 (en) System and method for motion compensation using a set of candidate motion vectors obtained from digital video
KR100865248B1 (en) Caption Detection in Video Signals
US7308028B2 (en) Apparatus and method for generating mosaic images
US20080317127A1 (en) System and method for correcting motion vectors in block matching motion estimation
US20140056354A1 (en) Video processing apparatus and method
US9641838B2 (en) Moving image coding apparatus, method and program
KR101098630B1 (en) Motion adaptive upsampling of chroma video signals
CN108134938B (en) Video scanning mode detection and correction method, video playing method and device
EP2232883B1 (en) Method for measuring flicker
US9807339B2 (en) Frame rate conversion system
CN104519363A (en) Video encoding/decoding methods, corresponding computer programs and video encoding/decoding devices
JP6208936B2 (en) Video motion evaluation method and video motion evaluation apparatus
TWI568247B (en) Methods and apparatus for decoding video images
CN113940090A (en) Client-side evidence obtaining watermark device, system and method
TWI486061B (en) Method and system for motion compensated picture rate up-conversion using information extracted from a compressed video stream
TWI414182B (en) Multimedia device and play mode detection method of the same
KR20110129325A (en) Advertising image detection method and apparatus
KR20070026360A (en) Method for Compressing / Decompressing Video Information
JP5253328B2 (en) Image correction apparatus and image correction method
Takada et al. Improvement of 8K UHDTV picture quality for H. 265/HEVC by global zoom estimation
US9025930B2 (en) Chapter information creation apparatus and control method therefor
JP2014200078A (en) Moving image encoding apparatus and method for controlling the same
US7750974B2 (en) System and method for static region detection in video processing
TWI419570B (en) Multimedia device and motion compensation method thereof
JP3762331B2 (en) Re-insertion field image detection method and image coding apparatus in telecine image

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
GR01 Patent grant
GR01 Patent grant