Mesa (master): vl/mpeg2: simple fix to get xine running again

Christian König deathsimple at kemper.freedesktop.org
Wed Jan 4 07:01:36 PST 2012


Module: Mesa
Branch: master
Commit: 7b181d16c3b954bf567563e90e5e94bda833fab8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7b181d16c3b954bf567563e90e5e94bda833fab8

Author: Christian König <deathsimple at vodafone.de>
Date:   Wed Jan  4 15:59:29 2012 +0100

vl/mpeg2: simple fix to get xine running again

Otherwise xines xxmc plugin will just display green blocks.

Signed-off-by: Christian König <deathsimple at vodafone.de>

---

 src/gallium/auxiliary/vl/vl_mpeg12_decoder.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
index 04253ef..1426eb8 100644
--- a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
+++ b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
@@ -260,12 +260,13 @@ MacroBlockTypeToPipeWeights(const struct pipe_mpeg12_macroblock *mb, unsigned we
       break;
 
    default:
-      if (mb->macroblock_type & PIPE_MPEG12_MB_TYPE_PATTERN) {
-         /* patern without a motion vector, just copy the old frame content */
-         weights[0] = PIPE_VIDEO_MV_WEIGHT_MAX;
+      if (mb->macroblock_type & PIPE_MPEG12_MB_TYPE_INTRA) {
+         weights[0] = PIPE_VIDEO_MV_WEIGHT_MIN;
          weights[1] = PIPE_VIDEO_MV_WEIGHT_MIN;
       } else {
-         weights[0] = PIPE_VIDEO_MV_WEIGHT_MIN;
+         /* no motion vector, but also not intra mb ->
+            just copy the old frame content */
+         weights[0] = PIPE_VIDEO_MV_WEIGHT_MAX;
          weights[1] = PIPE_VIDEO_MV_WEIGHT_MIN;
       }
       break;



More information about the mesa-commit mailing list