On Tue, 29 Nov 2016, Diego Biurrun wrote:

idct/idct?

The vp9 inverse transforms can be different combos for the vertical and horizontal passes; it can be iwht_iwht, idct_idct, idct_iadst, iadst_idct, iadst_iadst. This optimization is only valid for the idct_idct case.


--- a/libavcodec/vp9dsp.c
+++ b/libavcodec/vp9dsp.c
@@ -953,6 +953,22 @@ type_a ## _ ## type_b ## _ ## sz ## x ## sz ## 
_add_c(uint8_t *dst,         \
+    if (has_dconly && eob == 1) {                                           \
+        const int t  = (((block[0] * 11585 + (1 << 13)) >> 14)              \
+                                   * 11585 + (1 << 13)) >> 14;              \
+        block[0] = 0;                                                       \
+        for (i = 0; i < sz; i++) {                                          \
+            for (j = 0; j < sz; j++)                                        \
+                dst[j * stride] = av_clip_uint8(dst[j * stride] +           \
+                                                (bits ?                     \
+                                                 (t + (1 << (bits - 1))) >> 
bits : \
+                                                 t));                       \

FTLIW:

                  dst[j * stride] =                                           \
                       av_clip_uint8(dst[j * stride] +                        \
                                     (bits ? (t + (1 << (bits - 1))) >> bits  \
                                           : t));                             \

FTLIW?

This looks more readable, sure.

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to