[Mesa-dev] [PATCH 3/7] st/vdpau: use new vlc function to serach for VC-1 start codes

Christian König deathsimple at vodafone.de
Mon Sep 23 06:58:49 PDT 2013


From: Christian König <christian.koenig at amd.com>

Signed-off-by: Christian König <christian.koenig at amd.com>
---
 src/gallium/state_trackers/vdpau/decode.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/gallium/state_trackers/vdpau/decode.c b/src/gallium/state_trackers/vdpau/decode.c
index b144b83..e884fb2 100644
--- a/src/gallium/state_trackers/vdpau/decode.c
+++ b/src/gallium/state_trackers/vdpau/decode.c
@@ -410,14 +410,13 @@ vlVdpDecoderFixVC1Startcode(uint32_t *num_buffers, const void *buffers[], unsign
 
    /* search the first 64 bytes for a startcode */
    vl_vlc_init(&vlc, *num_buffers, buffers, sizes);
-   for (i = 0; i < 64 && vl_vlc_bits_left(&vlc) >= 32; ++i) {
+   while (vl_vlc_search_byte(&vlc, 64*8, 0x00) && vl_vlc_bits_left(&vlc) >= 32) {
       uint32_t value = vl_vlc_peekbits(&vlc, 32);
       if (value == 0x0000010D ||
           value == 0x0000010C ||
           value == 0x0000010B)
          return;
       vl_vlc_eatbits(&vlc, 8);
-      vl_vlc_fillbits(&vlc);
    }
 
    /* none found, ok add one manually */
-- 
1.8.1.2



More information about the mesa-dev mailing list