[FFmpeg-devel] [PATCH] libavcodec/mpegvideo_xvmc.c: simplify expression
Nicolas Kaiser
nikai
Fri Nov 5 21:22:13 CET 2010
Hi there!
I noticed an expression that can be simplified like:
(a || (!a && !b)) => (a || !b)
Best regards,
Nicolas Kaiser
---
libavcodec/mpegvideo_xvmc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/mpegvideo_xvmc.c b/libavcodec/mpegvideo_xvmc.c
index a245200..0a5a750 100644
--- a/libavcodec/mpegvideo_xvmc.c
+++ b/libavcodec/mpegvideo_xvmc.c
@@ -301,7 +301,7 @@ void ff_xvmc_decode_mb(MpegEncContext *s)
for (i = 0; i < blocks_per_mb; i++) {
if (s->block_last_index[i] >= 0) {
// I do not have unsigned_intra MOCO to test, hope it is OK.
- if (s->mb_intra && (render->idct || (!render->idct && !render->unsigned_intra)))
+ if (s->mb_intra && (render->idct || !render->unsigned_intra))
*s->pblocks[i][0] -= 1 << 10;
if (!render->idct) {
s->dsp.idct(*s->pblocks[i]);
--
1.7.2.2
More information about the ffmpeg-devel
mailing list