On Fri, Feb 20, 2015 at 10:59 AM, Diego Biurrun <[email protected]> wrote:
> On Fri, Feb 20, 2015 at 04:56:51PM +0100, Luca Barbato wrote:
>> On 20/02/15 16:50, Diego Biurrun wrote:
>> >On Thu, Feb 19, 2015 at 10:16:29PM -0500, Vittorio Giovara wrote:
>> >>--- /dev/null
>> >>+++ b/libavcodec/hqx.c
>> >>@@ -0,0 +1,632 @@
>> >>+static inline void put_blocks(AVFrame *pic, int plane,
>> >>+                              int x, int y, int ilace,
>> >>+                              int16_t *block0, int16_t *block1,
>> >>+                              const uint8_t *quant)
>> >>+{
>> >>+    hqx_idct_put(
>> >>+        (uint16_t *)(pic->data[plane] + x * 2 + y * pic->linesize[plane]),
>> >>+        pic->linesize[plane] * fields, block0, quant);
>> >>+    hqx_idct_put(
>> >>+        (uint16_t *)(pic->data[plane] + x * 2 + y * pic->linesize[plane]),
>> >>+        pic->linesize[plane] * fields, block1, quant);
>> >
>> >IMO an ugly way to break lines...
>>
>> an option is
>>
>> uint16_t *p = pic->data[plane] + x * 2 + y * pic->linesize[plane];
>
> That even saves some of the duplication, perfect.

... except that you need to cast it with (uint16_t *) to avoid a
warning and that brings it past 80 columns, which calls for ugly
breaks again :<
-- 
Vittorio
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to