Verfahren und Vorrichtung zum Mischen von Videoströmen auf der Makroblock- Ebene Method and apparatus for mixing video streams at the macroblock level
Die Erfindung beschreibt ein Verfahren zum Mischen von Videoströmen auf der Makroblock-Ebene gemäß dem Oberbegriff des Patentanspruchs 1 und eine The invention describes a method for mixing video streams at the macroblock level according to the preamble of patent claim 1 and a
Vorrichtung zur Durchführung des Verfahrens gemäß dem Oberbegriff des Apparatus for carrying out the method according to the preamble of
Patentanspruchs 9. Patent claim 9.
In bestimmten Anwendungen ist es notwendig, dass der Inhalt von mehreren In certain applications, it is necessary that the content of several
Videoströmen gleichzeitig an einem Gerät angezeigt wird. So sind beispielsweise Videokonferenzen mit mehr als zwei Teilnehmern bekannt, bei denen die Videosignale und Audiosignale zwischen zwei oder mehreren Standorten in Echtzeit übertragen werden. Die Endgeräte bzw. Softclients der Anwender sind zu diesem Zweck mit einer Kamera, heute meist USB-Webcam, und einem Mikrofon bzw. Headset als Video stream is displayed simultaneously on a device. For example, video conferencing with more than two participants is known in which the video signals and audio signals are transmitted between two or more locations in real time. The end devices or soft clients of the users are for this purpose with a camera, today usually USB webcam, and a microphone or headset as
Eingabegeräte sowie einem Bildschirm und einem Lautsprecher bzw. Headset als Ausgabegeräte ausgestattet. Die Video- und Audiosignale können hardware-basiert über Steckkarten oder rein software-basiert encodiert und decodiert werden. Heutzutage wird von den Anwendern eines Videokonferenzsystems in der Regel gefordert, dass nicht nur der momentan sprechende Teilnehmer von allen anderen Teilnehmern gesehen wird, wie das bei„voice activated switching" Systemen der Fall ist, sondern dass alle oder zumindest mehrere der Gesprächspartner sich gleichzeitig gegenseitig auf dem Input devices and a screen and a speaker or headset equipped as output devices. The video and audio signals can be hardware-based encoded and decoded via plug-in cards or purely software-based. Nowadays, users of a videoconferencing system are generally required to not only see the currently speaking subscriber from all other subscribers, as is the case with "voice activated switching" systems, but that all or at least several of the interlocutors are mutually exclusive on the
Bildschirm sehen können, wie das bei„continous presence" Systemen der Fall ist. Screen, as is the case with "continous presence" systems.
Ein weiteres Anwendungsbeispiel liegt im Bereich der Videoüberwachung, wobei in einem Kontrollraum mehrere Videoströme von unterschiedlichen Another application example is in the field of video surveillance, where in a control room several video streams of different
Überwachungskameras gleichzeitig decodiert und live auf einem Bildschirm angezeigt werden. Verfügt das System nur über einen Decoder, dann kann immer nur ein Security cameras are simultaneously decoded and displayed live on a screen. If the system has only one decoder, only one can be used
Videostrom von einer Überwachungskamera zu einem Zeitpunkt decodiert und angezeigt werden.
Aufgrund der Tatsache, dass heute sehr viele installierte Endgeräte bzw. Softclients von Videokonferenzsystemen nur über einen einzigen Decoder verfügen, ist es nicht möglich mehrere Videoströme gleichzeitig in diesen Endgeräten bzw. Softclients zu decodieren und anzuzeigen. Deshalb ist eine heute weit verbreitete Vorgehensweise, dass eine Video Bridge oder Multipoint Control Unit (MCU) eingesetzt wird. Diese stellt eine zentrale Einheit dar, die die encodierten Videoströme von mehreren Video stream from one surveillance camera at a time decoded and displayed. Due to the fact that today have very many installed terminals or soft clients of video conferencing systems only a single decoder, it is not possible to decode and display multiple video streams simultaneously in these terminals or soft clients. Therefore, a common practice today is to use a Video Bridge or Multipoint Control Unit (MCU). This is a central unit that handles the encoded video streams from multiple sources
Teilnehmern empfängt, verarbeitet und einen dedizierten Videostrom an alle Receives, processes and distributes a dedicated video stream to all participants
Teilnehmer zurücksendet. Dazu müssen die Videoströme vollständig oder zumindest größtenteils decodiert, die Videodaten zusammengefügt und dann zu einem neuen Videostrom encodiert werden. Die Figur 4 zeigt in schematischer Darstellung die vollständige Transcodierung von zwei H.264 codierten Videoströmen. Dieses Verfahren wird vielfach als hardware-basierte Implementierung realisiert, da es sehr komplex ist, was zu hohen Gerätekosten führt. Außerdem ergeben sich durch die Transcodierung Verzögerungszeiten durch die Vielzahl der Signalverarbeitungsschritte und Participant returns. For this, the video streams must be completely or at least mostly decoded, the video data merged and then encoded into a new video stream. FIG. 4 shows a schematic representation of the complete transcoding of two H.264 coded video streams. This method is often implemented as a hardware-based implementation because it is very complex, resulting in high device costs. In addition, resulting from the transcoding delay times by the plurality of signal processing steps and
Qualitätseinbußen durch die erneute Encodierung. Quality degradation due to the re-encoding.
Ein weiteres bekanntes Verfahren ist das Mischen von Videoströmen auf der Slice- Ebene, wie in der Voranmeldung des gleichen Anmelders mit dem Titel„Mixen von Videoströmen" von den Erfindern Peter Amon und Andreas Hutter beschrieben. Another known method is the mixing of video streams at the slice level, as described in the co-pending application of the same applicant entitled "Mixing Video Streams" by the inventors Peter Amon and Andreas Hutter.
Im H.264/AVC Standard sind die Makroblöcke in sogenannten Slices organisiert, wobei jedes Slice unabhängig von anderen Slices decodiert werden kann. Mit dem im In the H.264 / AVC standard, the macroblocks are organized in so-called slices, whereby each slice can be decoded independently of other slices. With the im
H.264/ AVC Standard definierten Flexible Macroblock Ordering (FMO) ist eine flexible Zuordnung der Makroblöcke zu Slice-Gruppen möglich. Diese Möglichkeit wird gemäß dem Verfahren nun für das Mischen von mehreren Videoströmen verwendet. So kann für jeden Eingangs-Videostrom eine Slice-Gruppe definiert werden, die durch einen Video Mixer in einen Strom mit zwei Slice-Gruppen vereint werden. In Figur 5 ist in einer schematischen Darstellung das Mischen zweier H.264 codierter Videoströme auf der Slice-Ebene gezeigt. Allerdings existieren heute viele Decoder, die Slice-Gruppen nicht unterstützen, wodurch das Mischen von Videoströmen auf der Slice-Ebene nicht anwendbar ist.
Für den Videocodierstandard H.261 ist vermutlich ein Verfahren bekannt, mit dem mehrere Bilder auf der Makroblock-Ebene zu einem neuen Bild zusammengefügt werden können. Die Vermutung, dass dieses Verfahren bekannt ist, begründet sich darauf, dass in dem Analystenreport„Will Your Next Video Bridge Be Software- Based?" von Wainhouse Research in 2003 (http://www.wainhouse.com/files/papers/wr- sw-video-bridges.pdf) über das Mixen von H.261 Videoströmen berichtet wird, ohne auf das Verfahren näher einzugehen. Allerdings lassen die Performance-Messungen vermuten, dass ein Verfahren wie oben beschrieben und in der Figur 6 in schematischer Darstellung gezeigt, verwendet wird, da nicht so viele komplette Transcodiervorgänge gleichzeitig auf einem Rechner der angegebenen Leistungsstärke durchführbar sind. H.264 / AVC standard defined Flexible Macroblock Ordering (FMO) allows flexible assignment of the macroblocks to slice groups. This option is now used for mixing multiple video streams according to the method. Thus, for each input video stream, a slice group can be defined, which are combined by a video mixer into a stream with two slice groups. FIG. 5 shows, in a schematic representation, the mixing of two H.264 coded video streams on the slice level. However, today there are many decoders that do not support slice groups, which makes mixing video streams at the slice level inapplicable. For the video encoding standard H.261, a method is known, with which several images on the macroblock level can be merged into a new image. The presumption that this process is known is based on the fact that in the Wainhouse Research 2003 "Will Your Next Video Bridge Be Software Based?" Analyst Report (http://www.wainhouse.com/files/papers/wr sw-video-bridges.pdf) is reported about mixing H.261 video streams without going into the process, however the performance measurements suggest that a method as described above and shown schematically in FIG , is used, since not so many complete transcoding operations can be carried out simultaneously on a computer of the specified power level.
H.261 verwendet zur Entropie-Codierung ein Variable Length Codes (VLC) Verfahren. Bei dem im H.261 Standard verwendeten variablen Längen-Codes wird ein zu codierendes Symbol mittels einer einzigen Codewort-Tabelle fest einem Codewort zugeordnet. Dadurch gibt es keine Abhängigkeit zwischen den Symbolen und somit zwischen den Makroblöcken. Somit kann durch einfache Umsortierung der H.261 uses a Variable Length Codes (VLC) method for entropy coding. In the variable length codes used in the H.261 standard, a symbol to be coded is permanently assigned to a codeword by means of a single codeword table. As a result, there is no dependence between the symbols and thus between the macroblocks. Thus, by simply resorting the
Makroblöcke das Zusammenfügen von mehreren Videoströmen zu einem Videostrom durchgeführt werden. Um die zu übertragenden Daten, wie z.B. Restfehler aus den Prädiktionen, Differenz zu den geschätzten Bewegungsvektoren, etc., nochmals zu komprimieren werden diese mittels einer sogenannten Entropie-Kodierung codiert. Der H.264/AVC Standard bietet zwei Möglichkeiten von Entropie-Kodierung für die Videoströme, das Context-based Adaptive Variable Length Coding (CAVLC) Verfahren und das Context-based Macroblocks are used to merge multiple video streams into one video stream. To transfer the data to be transmitted, e.g. Remaining errors from the prediction, difference to the estimated motion vectors, etc., to be compressed again, these are coded by means of a so-called entropy coding. The H.264 / AVC standard provides two options for entropy encoding for video streams, Context-based Adaptive Variable Length Coding (CAVLC), and context-based
Adaptive Binary Arithmetic Coding (CABAC) Verfahren. Beide basieren auf sogenannter lernfähiger kontextabhängiger Entropie-Kodierung, entweder mit variabler Codelänge oder binär arithmetischer Codierung und erreichen dadurch Adaptive Binary Arithmetic Coding (CABAC) method. Both are based on so-called adaptive context-dependent entropy coding, either with variable code length or binary arithmetic coding and thereby achieve
Leistungsvorteile im Kodierungsprozess gegenüber den anderen Standards. Bei CAVLC gibt es bei der Codierung eines Makroblocks Abhängigkeiten von Performance advantages in the coding process compared to the other standards. CAVLC has dependencies on the encoding of a macroblock
Codierentscheidungen von benachbarten, bereits codierten Makroblöcken. Bei CABAC wirkt sich die Codierung eines Symbols auf die Auswahl des Codewortes für das darauf folgende Symbol aus, so dass Abhängigkeiten zwischen den Codewörtern und somit zwischen den Makroblöcken entstehen. Das für H.261 codierte Ströme gezeigte
Verfahren zum Mischen der Videoströme auf Makroblock-Ebene kann somit nicht unmittelbar zum Mischen von H.264/AVC codierten Videoströmen durchgeführt werden. Es ist Aufgabe der vorliegenden Erfindung, ein Verfahren zum Mischen von Coding decisions from adjacent, already coded macroblocks. With CABAC, the coding of a symbol affects the selection of the codeword for the following symbol, so that dependencies arise between the codewords and thus between the macroblocks. The streams encoded for H.261 were shown Thus, a method of mixing the video streams at the macroblock level can not be performed directly for mixing H.264 / AVC encoded video streams. It is an object of the present invention to provide a method for mixing
Videoströmen anzugeben, die mit Codewörtern für Makroblöcke codiert sind und bei denen die Codewörter Abhängigkeiten untereinander aufweisen, welches gegenüber dem Stand der Technik die aufgezeigten Nachteile vermeidet. Diese Aufgabe wird durch das Verfahren gemäß Patentanspruch 1 und durch eine Vorrichtung gemäß Patentanspruch 9 gelöst. Specify video streams that are coded with codewords for macroblocks and in which the codewords dependencies among each other, which over the prior art avoids the disadvantages shown. This object is achieved by the method according to claim 1 and by a device according to claim 9.
Ausführungsformen der Erfindung sind in den abhängigen Ansprüchen angegeben. Embodiments of the invention are indicated in the dependent claims.
Das erfindungsgemäße Verfahren geht vom Mischen der Videoströme, die nach dem H.264/AVC Standard codiert sind, auf der Makroblock-Ebene aus. Zunächst müssen die von den Teilnehmern empfangenen Videoströme decodiert werden. Dies geschieht durch das Auflösen der Abhängigkeiten zwischen den Codewörtern durch eine vollständige oder teilweise Entropie-Decodierung. Danach werden die Makroblöcke der Eingangs-Videoströme neu geordnet und zu einem neuen Makroblock zusammengefügt, der alle Daten der einzelnen Makroblöcke enthält. Abschließend wird ein neuer The inventive method is based on mixing the video streams encoded according to the H.264 / AVC standard at the macroblock level. First, the video streams received by the participants must be decoded. This is done by resolving the dependencies between the codewords by full or partial entropy decoding. Thereafter, the macroblocks of the input video streams are rearranged and merged into a new macroblock containing all the data of the individual macroblocks. Finally, a new one
Videostrom encodiert und an alle oder eine bestimmte Anzahl von Teilnehmer gesendet, so dass sich die Teilnehmer gleichzeitig gegenseitig sehen können. Dies geschieht dadurch, dass die vollständige oder teilweise Entropie-Decodierung nach dem Mischen der Videoströme durch eine vollständige oder teilweise Entropie-Encodierung wieder rückgängig gemacht wird. Dieses Verfahren ist in Figur 2 schematisch dargestellt, wobei zwei H.264 codierte Videoströme auf der Makroblock-Ebene gemischt werden. Video stream is encoded and sent to all or a certain number of participants, so that the participants can see each other at the same time. This is done by reversing all or part of the entropy decoding after mixing the video streams by full or partial entropy encoding. This method is illustrated schematically in Figure 2 where two H.264 coded video streams are mixed at the macroblock level.
Das erfinderische Verfahren kann für die beiden im H.264/ A VC Standard definierten Entropie-Codierverfahren CAVLC und CABAC eingesetzt werden. The inventive method can be used for the two entropy coding methods CAVLC and CABAC defined in the H.264 / A VC standard.
Bei der CAVLC Methode wird für das zu kodierende Element in Abhängigkeit von den bereits übertragenen Daten zwischen verschiedenen VLC-Tabellen umgeschaltet. Da
die VLC-Tabellen anhand von Statistiken sorgfaltig konstruiert wurden, erzielt man so eine deutliche Leistungssteigerung gegenüber dem exponentiellen Golomb-Code. In the CAVLC method, the element to be coded is switched between different VLC tables depending on the data already transferred. There The VLC tables were carefully constructed using statistics, thus achieving a significant performance improvement over the exponential Golomb code.
Im CA VLC Verfahren werden für jeden 4x4-Block folgende Syntaxelemente codiert: - coeff token: Anzahl der Koeffizienten ungleich Null (0-16) und die Anzahl der Einsen am Ende des Zig-Zag-Scans, den sogenannten„trailing ones" In the CA VLC procedure, the following syntax elements are coded for each 4x4 block: - coeff token: number of coefficients not equal to zero (0-16) and the number of ones at the end of the zig-zag scan, the so-called "trailing ones"
- trailing_ones_sign_flag: Vorzeichen der„trailing ones" - trailing_ones_sign_flag: sign of "trailing ones"
- level_prefix und level_suffix: Betrag und Vorzeichen der Koeffizienten ungleich Null, ohne„trailing ones" - level_prefix and level_suffix: magnitude and sign of the coefficients not equal to zero, without "trailing ones"
- total_zeros: Anzahl der Koeffizienten gleich Null im 4x4-Block bis zum letzten Koeffizienten ungleich Null in der Scan-Reihenfolge - total_zeros: number of coefficients equal to zero in the 4x4 block until the last non-zero coefficient in the scan order
- run before: Anzahl der Koeffizienten gleich Null bis zum nächsten Koeffizienten ungleich Null Für die Codierung von coeff_token wird bei Luminanz-Koeffizienten eine von vier VLC-Tabellen ausgewählt. Die Auswahl hängt von der Anzahl der Koeffizienten ungleich Null in den beiden 4x4-Blöcken links und über dem aktuellen 4x4-Block ab, falls diese im selben Slice sind. Ein Slice ist bei H.264/AVC eine Anzahl von - run before: number of coefficients equal to zero until the next nonzero coefficient For coding coeff_token, one of four VLC tables is selected for luminance coefficients. The selection depends on the number of nonzero coefficients in the two 4x4 blocks on the left and above the current 4x4 block, if they are in the same slice. A slice in H.264 / AVC is a number of
Makroblöcken, die gemeinsam codiert werden. Falls die Blöcke nicht existieren, am linken oberen Bildrand oder am Anfang eines Slice, wird ein Standardwert gesetzt. Macroblocks that are coded together. If the blocks do not exist, at the top left of the screen or at the beginning of a slice, a default value is set.
Bei einer Neuanordnung der Makroblöcke beim Mixen kann sich allerdings diese Anzahl verändern, so dass am Decoder die falsche Tabelle für die Entropie- Decodierung der Codewörter herangezogen würde. Um dies zu verhindern, müssen die entsprechenden Codewörter ausgetauscht werden, wenn sich eine andere VLC-Tabelle ergeben würde. Dazu müssen die Codewörter nicht decodiert werden, also die Anzahl der Koeffizienten ungleich Null und die Anzahl„trailing ones" bestimmt werden, sondern der Übergang kann direkt aus der im H.264/AVC Standard definierten Tabelle bestimmt werden. Diese VLC Tabelle ist in Figur 3 dargestellt, wobei der Parameter nC die zu selektierende Tabelle bestimmt. In a reordering of the macroblocks during mixing, however, this number can change, so that the decoder would use the wrong table for the entropy-decoding of the code words. To prevent this, the corresponding codewords must be exchanged if another VLC table would result. For this purpose, the code words do not have to be decoded, that is to say the number of non-zero coefficients and the number of "trailing ones" are determined, but the transition can be determined directly from the table defined in the H.264 / AVC standard.This VLC table is shown in FIG 3, wherein the parameter nC determines the table to be selected.
Das Syntaxelement trailing ones sign flag wird mit fester Wortlänge und nicht adaptiv codiert. Das Syntaxelement level suffix wird mit variabler Wortlänge (0 oder 1 Bit)
codiert. Diese Wortlänge hängt allerdings nur vom Syntaxelement coeff token desselben 4x4-Blocks ab. Die übrigen Syntaxelemente trailing_ones_sign_flag, level_prefix, level suffix, total zeros, run before werden zwar adaptiv codiert, entsprechend dem CAVLC-Verfahren, allerdings bestehen keine Abhängigkeiten außerhalb des 4x4-Blocks. Somit können die Codewörter zu allen Syntaxelementen außer coeff token direkt in dem gemischten Datenstrom übernommen werden. The syntax element trailing onesign flag is coded with fixed word length and not adaptive. The syntax element level suffix is variable-length (0 or 1 bit) coded. However, this word length depends only on the syntax element coeff token of the same 4x4 block. The remaining syntax elements trailing_ones_sign_flag, level_prefix, level suffix, total zeros, run before are adaptively coded according to the CAVLC method, but there are no dependencies outside the 4x4 block. Thus, the codewords for all syntax elements except coeff token can be taken directly in the mixed data stream.
Da also nur die Makroblöcke bzw. 4x4-B locke am linken und oberen Rand überprüft werden müssen, die nach dem Mischen nicht mehr am linken oder entsprechend am oberen Rande des gemischten Bildes liegen, kann die Entropie-Decodierung und anschließende erneute Entropie-Encodierung auf ein Minimum reduziert und das Mischen effizient durchgeführt werden. Wenn also beispielsweise zwei Videosignale übereinander gemischt werden, müssen entsprechend nur die Makroblöcke am oberen Rand des zweiten Bildes überprüft und gegebenenfalls in ihrer Entropie-Codierung angepasst werden. Thus, since only the macroblocks or 4x4 B curls at the left and top edges must be checked, which are no longer at the left or corresponding to the upper edge of the mixed image after mixing, the entropy decoding and subsequent re-entropy encoding can reduced to a minimum and the mixing performed efficiently. If, for example, two video signals are mixed one above the other, then only the macroblocks at the upper edge of the second image have to be checked and, if appropriate, adapted in their entropy coding.
Die Entropie-Codierung mit dem CABAC-Verfahren erfolgt in mehreren Schritten: 1. Binarisierung des zu codierenden Symbols ähnlich einer variablen Längencodierung (VLC). Die Binärsymbole werden als„bin" bezeichnet. The entropy coding with the CABAC method takes place in several steps: 1. Binarization of the symbol to be coded similar to a variable length coding (VLC). The binary symbols are called "bin".
2. Auswahl eines Kontext-Modells anhand des Typs des zu codierenden Symbols, z.B. Bewegungsvektor oder Koeffizient, für jedes zu codierende Bit des binarisierten Symbols„bin". 2. Selection of a context model based on the type of symbol to be coded, e.g. Motion vector or coefficient, for each bit of the binarized symbol "bin" to be encoded.
3. Codieren des„bin" anhand des gewählten Kontext-Modells, d.h. arithmetische Codierung des Bits anhand der Wahrscheinlichkeiten für„0" bzw.„1". Die 3. Coding of the "bin" on the basis of the chosen context model, i.e. arithmetic coding of the bit on the basis of the probabilities for "0" and "1", respectively
Wahrscheinlichkeiten ergeben sich aus der Wahl des Kontext-Modells. Probabilities arise from the choice of the context model.
4. Aktualisierung des bei der Codierung verwendeten Kontext-Modells, d.h. 4. Update the context model used in the encoding, i.
Nachführung der Wahrscheinlichkeiten. Wenn beispielsweise eine„1" codiert wird, wird bei der nächsten Codierung eines„bin" für dessen Kontext-Modell eine höhere Wahrscheinlichkeit für eine„1" angenommen. Entsprechendes gilt für die Codierung einer„0". Tracking the probabilities. For example, if a "1" is encoded, the next encoding assumes a "bin" for its context model, a higher probability of a "1." Similarly, encoding a "0".
5. Wiederholung der Schritte 3 und 4 , bis alle„bin" des Symbols codiert wurden. Falls die„bins" eines Symbols unterschiedlichen Kontexten zugeordnet sind, dann muss auch Schritt 2 wiederholt werden.
Durch die Eigenschaften der arithmetischen Codierung, ein Bit des Ausgangsstroms kann Informationen für mehrere„bin" bzw. zu codierende Eingangssymbole enthalten, und der Aktualisierung der Kontext-Modelle ergibt sich eine Abhängigkeit des aktuell zu codierenden Symbols von den vorherigen Symbolen innerhalb desselben Slice. An Slice-Grenzen werden die Kontext-Modelle auf einen Initialwert gesetzt. Wenn die Makroblöcke von mehreren Videoströmen gemischt werden, dann stimmen die 5. Repeat steps 3 and 4 until all of the "bin" symbols have been encoded, and if the "bins" of a symbol are assigned to different contexts then step 2 must also be repeated. The arithmetic coding properties, one bit of the output stream, may contain information for several "bin" or input symbols to be coded, and updating the context models results in dependency of the currently coded symbol on the previous symbols within the same slice Slice boundaries, the context models are set to an initial value, and if the macroblocks are mixed by multiple video streams, then the
Kontexte nach dem Mixen nicht mehr überein und der neue Videostrom kann nicht mehr decodiert werden. Um eine korrekte Decodierung zu ermöglichen, ist eine vollständige Decodierung der CABAC-Symbole mit anschließender Neucodierung nötig. Durch die erneute Encodierung werden die Aktualisierungen bei den Contexts no longer match after mixing and the new video stream can no longer be decoded. In order to allow correct decoding, complete decoding of the CABAC symbols with subsequent re-encoding is necessary. Renewed encoding will cause updates to the
Kontextmodellen neu berechnet. Nur für die Makroblöcke am Anfang eines Slice werden bis zum Wechsel der Eingangsströme keine Neucodierungen vorgenommen, da die Kontexte an Slice-Grenzen initialisiert werden und damit korrekt sind. Die Context models recalculated. Only for the macroblocks at the beginning of a slice, no recodings are made until the input streams have been changed, because the contexts are initialized at slice boundaries and are therefore correct. The
Neucodierung startet also nach dem ersten Wechsel der Eingangs-Videoströme. Re-encoding therefore starts after the first change of the input video streams.
Symbole innerhalb des Datenstroms, die mit VLC, beispielsweise für den Makroblock- Typ, etc., oder einer festen Wortlänge codiert sind, werden ohne Entropie-Decodierung und erneuter Entropie-Decodierung und erneuter Entropie-Encodierung direkt in den neuen Datenstrom übernommen, da für diese keine Abhängigkeit zu vorherigenSymbols within the data stream coded with VLC, for example for the macroblock type, etc., or a fixed word length, are taken directly into the new data stream without entropy decoding and re entropy decoding and re entropy encoding, as for this no dependence on previous ones
Makroblöcken, oder allgemein zu anderen codierten Symbolen, besteht. In H.264/AVC werden als VLC sogenannte exponentielle Golomb-Codes verwendet. Dies ist möglich, da das dem aktuellen Codewort mit fester oder variabler Länge vorausgehende Macroblocks, or in general to other coded symbols. In H.264 / AVC so-called exponential Golomb codes are used as VLC. This is possible because it precedes the current fixed-length or variable-length codeword
CABAC-Codewort terminiert ist. CABAC codeword is terminated.
Beim Mischen der Videoströme müssen neben der Anpassung der Kontexte der Entropie-Codierung auch die Referenzen bei der Intra- und Inter-Prädiktion nötigenfalls angepasst bzw. schon bei der Encodierung sichergestellt werden. Eine Möglichkeit, um eine korrekte Intra-Prädiktion zu erreichen, wird in der Voranmeldung des gleichen Anmelders mit dem Titel„Accurate Intra Prediction for Macroblock-level mixing of video streams" von den Erfindern Peter Amon und Norbert Oertel beschrieben. In H.264/AVC enthalten Bewegungsvektoren die Information der Richtung und den Betrag von Bewegungen, um die Bewegungen zwischen zwei Bildern im Videostrom
zu erkennen und zu berechnen. Um eine falsche Inter-Prädiktion zu vermeiden, sollten die Bewegungsvektoren nicht außerhalb des Bildes zeigen, wie in der Voranmeldung des gleichen Anmelders mit dem Titel„Mixen von Videoströmen" von den Erfindern Peter Amon und Andreas Hutter beschrieben. When mixing the video streams in addition to the adaptation of the contexts of the entropy coding and the references in the intra- and inter-prediction must be adjusted if necessary, or even ensured during the encoding. One way to achieve a correct intra-prediction is described in the prior application of the same applicant entitled "Accurate Intra Prediction for Macroblock-level mixing of video streams" by the inventors Peter Amon and Norbert Oertel. AVC motion vectors contain the information of the direction and the amount of movements to the movements between two images in the video stream to recognize and calculate. To avoid false inter-prediction, the motion vectors should not point out of frame as described in the co-pending application entitled "Mixing Video Streams" by the inventors Peter Amon and Andreas Hutter.
Besonders vorteilhaft kann das erfinderische Verfahren auch für Videoströme durchgeführt werden, bei denen Abhängigkeiten zwischen den einzelnen Codewörtern in der Entropie-Codierung bestehen, wie beispielsweise bei den H.264-Bitströmen. Darüber hinaus werden H.264-Bitströme erzeugt, die auch von H.264-Decodern verarbeitet werden können, die keine Decodierung von Slice Groups unterstützen. The inventive method can also be carried out particularly advantageously for video streams in which dependencies exist between the individual codewords in the entropy coding, such as in the case of the H.264 bit streams. In addition, H.264 bitstreams are generated, which can also be processed by H.264 decoders that do not support slice group decoding.
Eine Ausführungsform der Erfindung ist beispielhaft in den Figuren dargestellt. An embodiment of the invention is shown by way of example in the figures.
Fig. 1 zeigt das Mischen von vier Eingangs-Videoströmen mittels einer MCU Fig. 1 shows the mixing of four input video streams by means of an MCU
Fig. 2 zeigt das Mischen von zwei H.264-Videoströmen auf der Makroblock-Ebene Fig. 3 zeigt die in H.264/AVC definierte VLC-Tabelle für die (De-)Codierung von coeff token Fig. 2 shows the mixing of two H.264 video streams at the macroblock level. Fig. 3 shows the VLC table defined in H.264 / AVC for the (de) coding of coeff token
Fig. 4 zeigt die vollständige Transcodierung von zwei H.264-Videoströmen Fig. 4 shows the complete transcoding of two H.264 video streams
Fig. 5 zeigt das Mischen von zwei H.264- Videoströmen auf der Slice-Ebene Figure 5 shows the mixing of two H.264 video streams at the slice level
Fig. 6 zeigt das Mischen von zwei H.261 -Videoströmen auf der Makroblock-Ebene Fig. 6 shows the mixing of two H.261 video streams at the macroblock level
In Fig. 1 ist das Mischen von vier Eingangs-Videoströmen mittels einer MCU dargestellt, die nach dem H.264/AVC Standard codiert sind. Es liegen vier verschiedene H.264 Eingangs- Videoströme ISl, IS2, IS3 und IS4 von vier verschiedenen Fig. 1 shows the mixing of four input video streams by means of an MCU coded according to the H.264 / AVC standard. There are four different H.264 input video streams ISl, IS2, IS3 and IS4 of four different ones
Teilnehmern einer Videokonferenz vor. Participants in a videoconference.
Die unterschiedlichen Videoinhalte A, B, C und D der vier verschiedenen Eingangs- Videoströmen ISl , IS2, IS3 und IS4 werden so zusammengemischt, dass im Ausgangs- Videostrom OS alle Videoinhalte A, B, C und D gleichzeitig enthalten sind. The different video contents A, B, C and D of the four different input video streams IS1, IS2, IS3 and IS4 are mixed together so that all the video contents A, B, C and D are simultaneously contained in the output video stream OS.
Beispielhaft sind die Videoinhalte A, B, C und D horizontal und vertikal nebeneinander angeordnet, so dass die Gesprächspartner einer Videokonferenz gleichzeitig am By way of example, the video contents A, B, C and D are arranged horizontally and vertically next to one another, so that the call partners of a video conference at the same time
Bildschirm zu sehen sind.
Entsprechend dem H.264/AVC Standard sind die Eingangs-Videoströme IS 1 , IS2, IS3 und IS4 mit einem Entropie-Kodierungsverfahren codiert. Deshalb werden die Screen can be seen. According to the H.264 / AVC standard, the input video streams IS 1, IS2, IS3 and IS4 are coded with an entropy coding method. That is why the
Eingangs-Videoströme IS 1 , IS2, IS3 und IS4 durch den jeweiligen Entropie-Decoder EDI, ED2, ED3 und ED4 so decodiert, dass die Makroblöcke der Videoströme neu geordnet und in der Multipoint Control Unit MCU zusammengemischt werden können. Die gemischten Macroblöcke werden gemäß dem H.264/AVC Standard im Entropie- Encoder EE zu einem neuen dedizierten H.264 Ausgangs- Videostrom OS encodiert. Der Videostrom OS wird danach an alle Teilnehmer gesendet. Fig. 2 ist das Mischen von zwei Videoströmen auf der Makroblock-Ebene dargestellt, die nach dem H.264/AVC Standard codiert sind. Input video streams IS 1, IS2, IS3 and IS4 are decoded by the respective entropy decoder EDI, ED2, ED3 and ED4 so that the macroblocks of the video streams can be rearranged and mixed together in the multipoint control unit MCU. The mixed macroblocks are encoded according to the H.264 / AVC standard in the entropy encoder EE to a new dedicated H.264 output video stream OS. The video stream OS is then sent to all participants. Figure 2 shows the mixing of two video streams at the macroblock level coded according to the H.264 / AVC standard.
Zunächst müssen die von den Teilnehmern empfangenen Videoströme IS 1 und IS2 in den jeweiligen Entropie-Decodern EDI und ED decodiert werden. Dies geschieht durch das Auflösen der Abhängigkeiten zwischen den Codewörtern durch eine vollständige oder teilweise Entropie-Decodierung. Danach werden die Makroblöcke MB1 und MB2 der Eingangs-Videoströme IS1 und IS2 neu geordnet und zu einem neuen Makroblock MB' zusammengefügt, der alle Daten der einzelnen Makroblöcke MB1 und MB2 enthält. Abschließend wird ein neuer Ausgangs-Videostrom OS im Entropie-Encoder EE encodiert und an alle Teilnehmer gesendet, so dass sich alle Teilnehmer gegenseitig sehen können. Dies geschieht dadurch, dass die vollständige oder teilweise Entropie- Decodierung nach dem Mischen der Videoströme durch eine vollständige oder teilweise Entropie-Encodierung wieder rückgängig gemacht wird. In Fig. 3 ist die VLC-Tabelle für die (De-)Codierung von coeff token dargestellt, die im H.264/AVC Standard definiert ist. First, the video streams IS 1 and IS 2 received by the subscribers must be decoded in the respective entropy decoders EDI and ED. This is done by resolving the dependencies between the codewords by full or partial entropy decoding. Thereafter, the macroblocks MB1 and MB2 of the input video streams IS1 and IS2 are rearranged and merged into a new macroblock MB 'containing all the data of the individual macroblocks MB1 and MB2. Finally, a new output video stream OS is encoded in the entropy encoder EE and sent to all participants, so that all participants can see each other. This is done by reversing all or part of the entropy decoding after mixing the video streams by full or partial entropy encoding. FIG. 3 shows the VLC table for (decoding) coeff token defined in the H.264 / AVC standard.
Bei der CAVLC Methode gibt es vier Auswahlmöglichkeiten einer VLC-Tabelle zur Codierung von coeffjoken. Die Auswahl erfolgt über den Wert nC, der auf Basis der Anzahl der Koeffizienten in dem Block oberhalb nU und auf der linken Seite nL des aktuellen codierten Blockes berechnet wird.
Wenn der obere Block und der linke Block vorhanden sind, d.h. die beiden Blöcke liegen im selben codierten Slice, errechnet sich der Parameter nC wie folgt: nC = (nU + nL)/2. Wenn nur der obere Block vorhanden ist, beträgt nC = nU, wenn nur der linke Block vorhanden ist, beträgt nC = nL, und wenn keiner von beiden Blöcken vorhanden ist, beträgt nC = 0. In the CAVLC method, there are four choices of a VLC table for coding coeffjoken. The selection is made by the value nC, which is calculated based on the number of coefficients in the block above nU and on the left side nL of the current coded block. If the upper block and the left block are present, ie the two blocks are in the same coded slice, the parameter nC is calculated as follows: nC = (nU + nL) / 2. If only the upper block is present, nC = nU, if there is only the left block, nC = nL, and if neither block is present, nC = 0.
Der Parameter nC selektiert die entsprechende VLC-Tabelle in Abhängigkeit der Anzahl codierter Koeffizienten in den benachbarten Blöcken, d.h. Kontext-adaptiv. In Fig. 4 ist die vollständige Transcodierung von Videoströmen dargestellt, die nach dem H.264/AVC Standard codiert sind. The parameter nC selects the corresponding VLC table depending on the number of coded coefficients in the adjacent blocks, i. Context-adaptive. FIG. 4 shows the complete transcoding of video streams encoded according to the H.264 / AVC standard.
Die beiden H.264 Eingangs-Videoströme ISl und IS2 von zwei Teilnehmern werden durch jeweils einen H.264 Video-Decoder VD1 und VD2 auf der Frame-Ebene decodiert. Nach der Decodierung der Videoströme ISl und IS2 in die jeweiligen Videoframes VF1 und VF2 erfolgt das Mischen und Zusammenfügen der beiden Videoframes VF1 und VF2 zu einem neuen Videoframe VF', der alle Daten der einzelnen Videoframes VF1 und VF2 enthält. Abschließend wird ein neuer H.264 Ausgangs-Videostrom OS im H.264 Video-Encoder VE encodiert und an alle The two H.264 input video streams IS1 and IS2 from two subscribers are decoded by a respective H.264 video decoder VD1 and VD2 at the frame level. After decoding the video streams IS1 and IS2 into the respective video frames VF1 and VF2, the two video frames VF1 and VF2 are merged and merged to form a new video frame VF 'containing all the data of the individual video frames VF1 and VF2. Finally, a new H.264 output video stream OS is encoded in the H.264 video encoder VE and sent to all
Teilnehmer gesendet. Participants sent.
Dieser Vorgang wird auch als Pixeldomain-Mixing oder vollständige Transcodierung bezeichnet, bei dem z.B. eine Formatkonvertierung, eine Mischung von Bilddaten und die Erzeugung eines Konferenzbildes durchgeführt wird. This process is also referred to as pixel domain mixing or full transcoding using e.g. a format conversion, a mixture of image data and the generation of a conference image is performed.
In Fig. 5 ist das Mischen von zwei Videoströmen auf der Slice-Ebene dargestellt, die nach dem H.264/ AVC Standard codiert sind. Figure 5 shows the mixing of two video streams at the slice level encoded according to the H.264 / AVC standard.
In den beiden H.264 Eingansvideoströme ISl und IS2 sind gemäß dem H.264 Standard ohne zusätzliche Hilfsmittel die Makroblöcke zu den Slices zugeordnet. Das Mischen der Videoströme ISl und IS2 erfolgt durch eine flexible Zuordnung der Makroblöcke zu Slice-Gruppen. So wird für die beiden Eingangs-Videoströme ISl und ISl jeweils eine Slice-Gruppe SGI und SG2 definiert, die durch den Video Mixer VM in einen H.264
Ausgangs-Videostrom OS mit den Daten der beiden Slice-Gruppen SGI und SG2 vereint werden. In the two H.264 input video streams IS1 and IS2, according to the H.264 standard, the macroblocks are assigned to the slices without additional aids. The mixing of the video streams IS1 and IS2 takes place through a flexible allocation of the macroblocks to slice groups. For example, a slice group SGI and SG2 is defined for each of the two input video streams IS1 and IS1, which is then converted into a H.264 by the video mixer VM Output video stream OS are combined with the data of the two slice groups SGI and SG2.
In Fig. 6 ist das Mischen von zwei Videoströmen auf der Makroblock-Ebene dargestellt, die nach dem H.261 Standard codiert sind. Fig. 6 shows the mixing of two video streams at the macroblock level coded according to the H.261 standard.
Die beiden H.261 Eingangs- Videoströme IS1 und IS2 von zwei Teilnehmern liegen jeweils als codierte Makroblöcke MBl und MB2 vor. Durch eine Umsortierung der Makroblöcke MBl und MB2 wird das Zusammenmischen von den beiden Eingangs-Videoströmen IS1 und IS2 auf der Makroblock-Ebene zu einem neuen codierten Makroblock MB' durchgeführt, der alle Daten der einzelnen Makroblöcke MBl und MB2 enthält, der als dedizierten H.261 Ausgangs-Videostrom OS an alle Teilnehmer gesendet wird.
The two H.261 input video streams IS1 and IS2 of two subscribers are each present as coded macroblocks MB1 and MB2. By reordering the macroblocks MB1 and MB2, merging of the two input video streams IS1 and IS2 on the macroblock level is performed to a new coded macroblock MB 'containing all the data of the individual macroblocks MB1 and MB2 which is designated as dedicated H. 261 output video stream OS is sent to all subscribers.
Bezugszeichenliste LIST OF REFERENCE NUMBERS
A - D Videoinhalte A - D video content
EDI - ED4 Entropie-Decoder EDI - ED4 entropy decoder
EE Entropie-Encoder EE entropy encoder
ISl - IS4 Eingangs-Videoströme ISl - IS4 input video streams
MB 1 , MB2 Kodierte Makroblöcke MB 1, MB2 Encoded macroblocks
MB' Mischung von kodierten Makroblöcken MB 'Mix of coded macroblocks
MCU Multipoint Control Unit MCU Multipoint Control Unit
OS Ausgangs-Videoströme OS output video streams
SG1. SG2 Slice-Gruppe SG1. SG2 slice group
VD1 , VD2 Video-Decoder VD1, VD2 video decoder
VE Video-Encoder VE video encoder
VF1, VF2 Videoframe VF1, VF2 video frame
VF' Mischung von Videoframes VF 'mix of video frames
VM Video Mixer
VM video mixer