[-]
[+]
|
Changed |
dirac.spec
|
|
[-]
[+]
|
Added |
0001-Fix-uninitialised-memory-read-that-causes-the-encode.patch
^
|
@@ -0,0 +1,52 @@
+From 88fae6224b54ecf92ac6e3ae5083c3f352adc798 Mon Sep 17 00:00:00 2001
+From: Anuradha Suraparaju <anuradha@hoyle.rd.bbc.co.uk>
+Date: Fri, 17 Apr 2009 17:47:27 +1000
+Subject: [PATCH] Fix uninitialised memory read that causes the encoder to crash when using
+ non-overlapping blocks.
+
+---
+ libdirac_common/mot_comp.cpp | 21 +++++++++++++++------
+ 1 files changed, 15 insertions(+), 6 deletions(-)
+
+diff --git a/libdirac_common/mot_comp.cpp b/libdirac_common/mot_comp.cpp
+index aa8d37c..e0ec2ff 100644
+--- a/libdirac_common/mot_comp.cpp
++++ b/libdirac_common/mot_comp.cpp
+@@ -306,6 +306,8 @@ void MotionCompensator::CompensateComponent( Picture* pic ,
+
+ int save_from_row = m_bparams.Ybsep()-m_bparams.Yoffset();
+
++ bool row_overlap = ((m_bparams.Yblen() - m_bparams.Ybsep()) > 0);
++
+ // unpadded picture dimensions
+ const int x_end_data = pic_data_out.FirstX() + std::min(pic_data_out.LengthX(), pic_size.x );
+ const int y_end_data = pic_data_out.FirstY() + std::min(pic_data_out.LengthY(), pic_size.y );
+@@ -489,12 +491,19 @@ void MotionCompensator::CompensateComponent( Picture* pic ,
+ //Increment the block vertical position
+ pos.y += m_bparams.Ybsep();
+
+- // Copy the rows required to motion compensate the next row of block.
+- // This is usually Yblen-Ybsep rows.
+- memmove (pic_data[0], pic_data[save_from_row], (m_bparams.Yblen() - save_from_row)*pic_data.LengthX()*sizeof(ValueType));
+- memset( pic_data[m_bparams.Yblen() - save_from_row], 0, save_from_row*pic_data.LengthX()*sizeof(ValueType) );
+- save_from_row = m_bparams.Ybsep();
+-
++ if (row_overlap)
++ {
++ // Copy the rows required to motion compensate the next row of
++ // blocks. This is usually Yblen-Ybsep rows.
++ memmove (pic_data[0], pic_data[save_from_row], (m_bparams.Yblen() - save_from_row)*pic_data.LengthX()*sizeof(ValueType));
++ memset( pic_data[m_bparams.Yblen() - save_from_row], 0, save_from_row*pic_data.LengthX()*sizeof(ValueType) );
++ save_from_row = m_bparams.Ybsep();
++ }
++ else
++ {
++ // no row overlap. So reset pic_data to 0.
++ memset( pic_data[0], 0, m_bparams.Yblen()*pic_data.LengthX()*sizeof(ValueType) );
++ }
+ }//yblock
+
+ if ( m_add_or_sub == SUBTRACT)
+--
+1.7.0.3
+
|
[-]
[+]
|
Added |
dirac-1.0.2-gcc45.patch
^
|
@@ -0,0 +1,22 @@
+Index: dirac-1.0.2/libdirac_encoder/quant_chooser.cpp
+===================================================================
+--- dirac-1.0.2.orig/libdirac_encoder/quant_chooser.cpp
++++ dirac-1.0.2/libdirac_encoder/quant_chooser.cpp
+@@ -340,7 +340,7 @@ void QuantChooser::SetSkip( CodeBlock& c
+ {
+ for (int i=cblock.Xstart(); i<cblock.Xend(); ++i )
+ {
+- if ( (std::abs(m_coeff_data[j][i])<<2) >= u_threshold )
++ if ( (static_cast<int>(std::abs(m_coeff_data[j][i]))<<2) >= u_threshold )
+ can_skip = false;
+ }
+ }
+@@ -355,7 +355,7 @@ CoeffType QuantChooser::BlockAbsMax( con
+ {
+ for (int i=node.Xp() ; i<node.Xp()+node.Xl(); ++i)
+ {
+- val = std::max( val , std::abs(m_coeff_data[j][i]) );
++ val = std::max( val , static_cast<int>(std::abs(m_coeff_data[j][i])) );
+ }// i
+ }// j
+
|
[-]
[+]
|
Deleted |
dirac-gcc45.patch
^
|
@@ -1,48 +0,0 @@
-diff -Nur dirac-1.0.2-orig/libdirac_encoder/quant_chooser.cpp dirac-1.0.2/libdirac_encoder/quant_chooser.cpp
---- dirac-1.0.2-orig/libdirac_encoder/quant_chooser.cpp 2010-06-27 12:00:16.870371867 +0200
-+++ dirac-1.0.2/libdirac_encoder/quant_chooser.cpp 2010-06-27 12:05:29.274389459 +0200
-@@ -1,6 +1,6 @@
- /* ***** BEGIN LICENSE BLOCK *****
- *
--* $Id: quant_chooser.cpp,v 1.20 2009/01/21 05:22:05 asuraparaju Exp $ $Name: Dirac_1_0_2 $
-+* $Id: quant_chooser.cpp,v 1.21 2010/05/09 04:38:31 asuraparaju Exp $ $Name: $
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
-@@ -333,14 +333,14 @@
- void QuantChooser::SetSkip( CodeBlock& cblock , const int qidx)
- {
- const int u_threshold = dirac_quantiser_lists.QuantFactor4( qidx );
--
-+
- // Sets the skip flag for a codeblock
- bool can_skip = true;
- for (int j=cblock.Ystart(); j<cblock.Yend(); ++j )
- {
- for (int i=cblock.Xstart(); i<cblock.Xend(); ++i )
- {
-- if ( (std::abs(m_coeff_data[j][i])<<2) >= u_threshold )
-+ if ( (static_cast<int>(std::abs(m_coeff_data[j][i]))<<2) >= u_threshold )
- can_skip = false;
- }
- }
-@@ -355,7 +355,7 @@
- {
- for (int i=node.Xp() ; i<node.Xp()+node.Xl(); ++i)
- {
-- val = std::max( val , std::abs(m_coeff_data[j][i]) );
-+ val = std::max( val , static_cast<int>(std::abs(m_coeff_data[j][i])) );
- }// i
- }// j
-
-diff -Nur dirac-1.0.2-orig/libdirac_encoder/quant_chooser.h dirac-1.0.2/libdirac_encoder/quant_chooser.h
---- dirac-1.0.2-orig/libdirac_encoder/quant_chooser.h 2010-06-27 12:00:16.868371962 +0200
-+++ dirac-1.0.2/libdirac_encoder/quant_chooser.h 2010-06-27 12:05:29.274389459 +0200
-@@ -1,6 +1,6 @@
- /* ***** BEGIN LICENSE BLOCK *****
- *
--* $Id: quant_chooser.h,v 1.7 2008/05/27 01:29:54 asuraparaju Exp $ $Name: Dirac_1_0_2 $
-+* $Id: quant_chooser.h,v 1.7 2008/05/27 01:29:54 asuraparaju Exp $ $Name: $
- *
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
|
|
Renamed |
dirac-1.0.2.tar.bz2
^
|
[-]
[+]
|
Deleted |
dirac-rpmlintrc
^
|
@@ -1,5 +0,0 @@
-# This line is mandatory to access the configuration functions
-from Config import *
-
-addFilter("source-or-patch-not-bzipped")
-addFilter("shlib-policy-missing-lib")
|