[x264-devel] commit: fix bitstream writer on bigendian 64bit (regression in r903) ( Loren Merritt )
git version control
git at videolan.org
Sun Sep 28 07:46:46 CEST 2008
x264 | branch: master | Loren Merritt <pengvado at akuvian.org> | Sat Sep 20 08:41:17 2008 -0600| [972814a9c76c8d718063e27a15328fa638e92c61] | committer: Loren Merritt
fix bitstream writer on bigendian 64bit (regression in r903)
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=972814a9c76c8d718063e27a15328fa638e92c61
---
common/bs.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/common/bs.h b/common/bs.h
index c8edbdc..d963dc7 100644
--- a/common/bs.h
+++ b/common/bs.h
@@ -76,7 +76,11 @@ static inline void bs_write( bs_t *s, int i_count, uint32_t i_bits )
s->i_left -= i_count;
if( s->i_left <= 32 )
{
+#ifdef WORDS_BIGENDIAN
+ *(uint32_t*)s->p = s->cur_bits >> (32 - s->i_left);
+#else
*(uint32_t*)s->p = endian_fix( s->cur_bits << s->i_left );
+#endif
s->i_left += 32;
s->p += 4;
}
More information about the x264-devel
mailing list