hpeldsp: Shrink put_no_rnd_pixels_tab array to the required minimal size

Message ID 1453287290-19155-1-git-send-email-diego@biurrun.de
State New
Headers show

Commit Message

Diego Biurrun Jan. 20, 2016, 10:54 a.m.
---

I do wonder why that was ever bigger than necessary ...

 libavcodec/hpeldsp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Vittorio Giovara Jan. 20, 2016, 4:06 p.m. | #1
On Wed, Jan 20, 2016 at 5:54 AM, Diego Biurrun <diego@biurrun.de> wrote:
> ---
>
> I do wonder why that was ever bigger than necessary ...
>
>  libavcodec/hpeldsp.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/hpeldsp.h b/libavcodec/hpeldsp.h
> index d037cba..344fa5b 100644
> --- a/libavcodec/hpeldsp.h
> +++ b/libavcodec/hpeldsp.h
> @@ -77,7 +77,7 @@ typedef struct HpelDSPContext {
>       * @param line_size number of bytes in a horizontal line of block
>       * @param h height
>       */
> -    op_pixels_func put_no_rnd_pixels_tab[4][4];
> +    op_pixels_func put_no_rnd_pixels_tab[2][4];
>
>      /**
>       * Halfpel motion compensation with no rounding (a+b)>>1.
> --

It was related to CID 991852, but indeed the [4][4] is too much.
So patch ok, but please update the documentation as well.
Diego Biurrun Jan. 21, 2016, 8:03 a.m. | #2
On Wed, Jan 20, 2016 at 11:06:29AM -0500, Vittorio Giovara wrote:
> On Wed, Jan 20, 2016 at 5:54 AM, Diego Biurrun <diego@biurrun.de> wrote:
> > ---
> >
> > I do wonder why that was ever bigger than necessary ...
> >
> >  libavcodec/hpeldsp.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libavcodec/hpeldsp.h b/libavcodec/hpeldsp.h
> > index d037cba..344fa5b 100644
> > --- a/libavcodec/hpeldsp.h
> > +++ b/libavcodec/hpeldsp.h
> > @@ -77,7 +77,7 @@ typedef struct HpelDSPContext {
> >       * @param line_size number of bytes in a horizontal line of block
> >       * @param h height
> >       */
> > -    op_pixels_func put_no_rnd_pixels_tab[4][4];
> > +    op_pixels_func put_no_rnd_pixels_tab[2][4];
> >
> >      /**
> >       * Halfpel motion compensation with no rounding (a+b)>>1.
> 
> It was related to CID 991852, but indeed the [4][4] is too much.
> So patch ok, but please update the documentation as well.

That log message provides no useful information, as usual ..

Diego
Vittorio Giovara Jan. 21, 2016, 4:35 p.m. | #3
On Thu, Jan 21, 2016 at 3:03 AM, Diego Biurrun <diego@biurrun.de> wrote:
> On Wed, Jan 20, 2016 at 11:06:29AM -0500, Vittorio Giovara wrote:
>> On Wed, Jan 20, 2016 at 5:54 AM, Diego Biurrun <diego@biurrun.de> wrote:
>> > ---
>> >
>> > I do wonder why that was ever bigger than necessary ...
>> >
>> >  libavcodec/hpeldsp.h | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/libavcodec/hpeldsp.h b/libavcodec/hpeldsp.h
>> > index d037cba..344fa5b 100644
>> > --- a/libavcodec/hpeldsp.h
>> > +++ b/libavcodec/hpeldsp.h
>> > @@ -77,7 +77,7 @@ typedef struct HpelDSPContext {
>> >       * @param line_size number of bytes in a horizontal line of block
>> >       * @param h height
>> >       */
>> > -    op_pixels_func put_no_rnd_pixels_tab[4][4];
>> > +    op_pixels_func put_no_rnd_pixels_tab[2][4];
>> >
>> >      /**
>> >       * Halfpel motion compensation with no rounding (a+b)>>1.
>>
>> It was related to CID 991852, but indeed the [4][4] is too much.
>> So patch ok, but please update the documentation as well.
>
> That log message provides no useful information, as usual ..

it provides enough information to read from the coverity dashboard
you're even admin there ;)

Patch

diff --git a/libavcodec/hpeldsp.h b/libavcodec/hpeldsp.h
index d037cba..344fa5b 100644
--- a/libavcodec/hpeldsp.h
+++ b/libavcodec/hpeldsp.h
@@ -77,7 +77,7 @@  typedef struct HpelDSPContext {
      * @param line_size number of bytes in a horizontal line of block
      * @param h height
      */
-    op_pixels_func put_no_rnd_pixels_tab[4][4];
+    op_pixels_func put_no_rnd_pixels_tab[2][4];
 
     /**
      * Halfpel motion compensation with no rounding (a+b)>>1.