OSDN Git Service

hevc: Simplify logical check
authorVittorio Giovara <vittorio.giovara@gmail.com>
Fri, 2 Oct 2015 10:43:48 +0000 (12:43 +0200)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Sun, 4 Oct 2015 11:08:58 +0000 (13:08 +0200)
The intended meaning is "if this block is the first block in a slice then
its left boundary is a slice boundary". Silence a logical-not-parentheses
warning from gcc.

libavcodec/hevc.c

index a802e1e..07b7de1 100644 (file)
@@ -2242,7 +2242,7 @@ static void hls_decode_neighbour(HEVCContext *s, int x_ctb, int y_ctb,
         if (y_ctb > 0 && s->tab_slice_address[ctb_addr_rs] != s->tab_slice_address[ctb_addr_rs - s->ps.sps->ctb_width])
             lc->boundary_flags |= BOUNDARY_UPPER_SLICE;
     } else {
-        if (!ctb_addr_in_slice > 0)
+        if (!ctb_addr_in_slice)
             lc->boundary_flags |= BOUNDARY_LEFT_SLICE;
         if (ctb_addr_in_slice < s->ps.sps->ctb_width)
             lc->boundary_flags |= BOUNDARY_UPPER_SLICE;