Re: [libav-devel] [PATCH 4/4] h264: 4:2:2 intra decoding support

2011-08-17 Thread Diego Biurrun
On Tue, Aug 16, 2011 at 05:40:56PM -0700, Ronald S. Bultje wrote:
 On Tue, Aug 16, 2011 at 8:05 AM, Diego Biurrun di...@biurrun.de wrote:
  -        h-pred8x8[DC_PRED8x8     ]= FUNCC(pred8x8_dc                     
  , depth);\
  -        h-pred8x8[LEFT_DC_PRED8x8]= FUNCC(pred8x8_left_dc                
  , depth);\
  -        h-pred8x8[TOP_DC_PRED8x8 ]= FUNCC(pred8x8_top_dc                 
  , depth);\
  -        h-pred8x8[ALZHEIMER_DC_L0T_PRED8x8 ]= 
  FUNC(pred8x8_mad_cow_dc_l0t, depth);\
  -        h-pred8x8[ALZHEIMER_DC_0LT_PRED8x8 ]= 
  FUNC(pred8x8_mad_cow_dc_0lt, depth);\
  -        h-pred8x8[ALZHEIMER_DC_L00_PRED8x8 ]= 
  FUNC(pred8x8_mad_cow_dc_l00, depth);\
  -        h-pred8x8[ALZHEIMER_DC_0L0_PRED8x8 ]= 
  FUNC(pred8x8_mad_cow_dc_0l0, depth);\
  +        if (chroma_format_idc == 1) {\
  +            h-pred8x8[DC_PRED8x8     ]= FUNCC(pred8x8_dc                  
     , depth);\
  +            h-pred8x8[LEFT_DC_PRED8x8]= FUNCC(pred8x8_left_dc             
     , depth);\
  +            h-pred8x8[TOP_DC_PRED8x8 ]= FUNCC(pred8x8_top_dc              
     , depth);\
  +            h-pred8x8[ALZHEIMER_DC_L0T_PRED8x8 ]= 
  FUNC(pred8x8_mad_cow_dc_l0t, depth);\
  +            h-pred8x8[ALZHEIMER_DC_0LT_PRED8x8 ]= 
  FUNC(pred8x8_mad_cow_dc_0lt, depth);\
  +            h-pred8x8[ALZHEIMER_DC_L00_PRED8x8 ]= 
  FUNC(pred8x8_mad_cow_dc_l00, depth);\
  +            h-pred8x8[ALZHEIMER_DC_0L0_PRED8x8 ]= 
  FUNC(pred8x8_mad_cow_dc_0l0, depth);\
  +        } else {\
  +            h-pred8x8[DC_PRED8x8     ]= FUNCC(pred8x16_dc                 
     , depth);\
  +            h-pred8x8[LEFT_DC_PRED8x8]= FUNCC(pred8x16_left_dc            
     , depth);\
  +            h-pred8x8[TOP_DC_PRED8x8 ]= FUNCC(pred8x16_top_dc             
     , depth);\
  +            h-pred8x8[ALZHEIMER_DC_L0T_PRED8x8 ]= 
  FUNC(pred8x8_mad_cow_dc_l0t, depth);\
  +            h-pred8x8[ALZHEIMER_DC_0LT_PRED8x8 ]= 
  FUNC(pred8x8_mad_cow_dc_0lt, depth);\
  +            h-pred8x8[ALZHEIMER_DC_L00_PRED8x8 ]= 
  FUNC(pred8x8_mad_cow_dc_l00, depth);\
  +            h-pred8x8[ALZHEIMER_DC_0L0_PRED8x8 ]= 
  FUNC(pred8x8_mad_cow_dc_0l0, depth);\
  +        }\
 
 Typo? The last 4 should be 8x16, not 8x8.

There is no such function.

 I believe the neon code misses the if (chroma == 1) additions to the
 8x8 prediction init code. They should be added, else fate will fail on
 arm devices.

You missed the if() being added in libavcodec/arm/h264dsp_init_arm.c :)

Diego
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 4/4] h264: 4:2:2 intra decoding support

2011-08-17 Thread Diego Biurrun
On Wed, Aug 17, 2011 at 09:54:52AM -0700, Ronald S. Bultje wrote:
 On Wed, Aug 17, 2011 at 9:51 AM, Diego Biurrun di...@biurrun.de wrote:
  On Tue, Aug 16, 2011 at 05:40:56PM -0700, Ronald S. Bultje wrote:
  On Tue, Aug 16, 2011 at 8:05 AM, Diego Biurrun di...@biurrun.de wrote:
   -        h-pred8x8[DC_PRED8x8     ]= FUNCC(pred8x8_dc                   
     , depth);\
   -        h-pred8x8[LEFT_DC_PRED8x8]= FUNCC(pred8x8_left_dc              
 , depth);\
   -        h-pred8x8[TOP_DC_PRED8x8 ]= FUNCC(pred8x8_top_dc               
     , depth);\
   -        h-pred8x8[ALZHEIMER_DC_L0T_PRED8x8 ]= 
   FUNC(pred8x8_mad_cow_dc_l0t, depth);\
   -        h-pred8x8[ALZHEIMER_DC_0LT_PRED8x8 ]= 
   FUNC(pred8x8_mad_cow_dc_0lt, depth);\
   -        h-pred8x8[ALZHEIMER_DC_L00_PRED8x8 ]= 
   FUNC(pred8x8_mad_cow_dc_l00, depth);\
   -        h-pred8x8[ALZHEIMER_DC_0L0_PRED8x8 ]= 
   FUNC(pred8x8_mad_cow_dc_0l0, depth);\
   +        if (chroma_format_idc == 1) {\
   +            h-pred8x8[DC_PRED8x8     ]= FUNCC(pred8x8_dc               
         , depth);\
   +            h-pred8x8[LEFT_DC_PRED8x8]= FUNCC(pred8x8_left_dc          
     , depth);\
   +            h-pred8x8[TOP_DC_PRED8x8 ]= FUNCC(pred8x8_top_dc           
         , depth);\
   +            h-pred8x8[ALZHEIMER_DC_L0T_PRED8x8 ]= 
   FUNC(pred8x8_mad_cow_dc_l0t, depth);\
   +            h-pred8x8[ALZHEIMER_DC_0LT_PRED8x8 ]= 
   FUNC(pred8x8_mad_cow_dc_0lt, depth);\
   +            h-pred8x8[ALZHEIMER_DC_L00_PRED8x8 ]= 
   FUNC(pred8x8_mad_cow_dc_l00, depth);\
   +            h-pred8x8[ALZHEIMER_DC_0L0_PRED8x8 ]= 
   FUNC(pred8x8_mad_cow_dc_0l0, depth);\
   +        } else {\
   +            h-pred8x8[DC_PRED8x8     ]= FUNCC(pred8x16_dc              
     , depth);\
   +            h-pred8x8[LEFT_DC_PRED8x8]= FUNCC(pred8x16_left_dc         
         , depth);\
   +            h-pred8x8[TOP_DC_PRED8x8 ]= FUNCC(pred8x16_top_dc          
     , depth);\
   +            h-pred8x8[ALZHEIMER_DC_L0T_PRED8x8 ]= 
   FUNC(pred8x8_mad_cow_dc_l0t, depth);\
   +            h-pred8x8[ALZHEIMER_DC_0LT_PRED8x8 ]= 
   FUNC(pred8x8_mad_cow_dc_0lt, depth);\
   +            h-pred8x8[ALZHEIMER_DC_L00_PRED8x8 ]= 
   FUNC(pred8x8_mad_cow_dc_l00, depth);\
   +            h-pred8x8[ALZHEIMER_DC_0L0_PRED8x8 ]= 
   FUNC(pred8x8_mad_cow_dc_0l0, depth);\
   +        }\
 
  Typo? The last 4 should be 8x16, not 8x8.
 
  There is no such function.
 
 That's because there isn't a single 8x16 function right now. They have
 to be written, e.g. this patch writes the one referenced above.

But this patch does not add any pred8x16_mad_cow functions.
I'm not following you.

  I believe the neon code misses the if (chroma == 1) additions to the
  8x8 prediction init code. They should be added, else fate will fail on
  arm devices.
 
  You missed the if() being added in libavcodec/arm/h264dsp_init_arm.c :)
 
 I expect them also in ff_h264_pred_init_neon(), similar to the ones in
 the C init code.

ff_h264_idct_add8_neon is only referenced in one place, where it is put
under if().

Diego
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 4/4] h264: 4:2:2 intra decoding support

2011-08-17 Thread Ronald S. Bultje
Hi,

On Wed, Aug 17, 2011 at 10:04 AM, Diego Biurrun di...@biurrun.de wrote:
 On Wed, Aug 17, 2011 at 09:54:52AM -0700, Ronald S. Bultje wrote:
 On Wed, Aug 17, 2011 at 9:51 AM, Diego Biurrun di...@biurrun.de wrote:
  On Tue, Aug 16, 2011 at 05:40:56PM -0700, Ronald S. Bultje wrote:
  On Tue, Aug 16, 2011 at 8:05 AM, Diego Biurrun di...@biurrun.de wrote:
   -        h-pred8x8[DC_PRED8x8     ]= FUNCC(pred8x8_dc                  
  , depth);\
   -        h-pred8x8[LEFT_DC_PRED8x8]= FUNCC(pred8x8_left_dc             
      , depth);\
   -        h-pred8x8[TOP_DC_PRED8x8 ]= FUNCC(pred8x8_top_dc              
  , depth);\
   -        h-pred8x8[ALZHEIMER_DC_L0T_PRED8x8 ]= 
   FUNC(pred8x8_mad_cow_dc_l0t, depth);\
   -        h-pred8x8[ALZHEIMER_DC_0LT_PRED8x8 ]= 
   FUNC(pred8x8_mad_cow_dc_0lt, depth);\
   -        h-pred8x8[ALZHEIMER_DC_L00_PRED8x8 ]= 
   FUNC(pred8x8_mad_cow_dc_l00, depth);\
   -        h-pred8x8[ALZHEIMER_DC_0L0_PRED8x8 ]= 
   FUNC(pred8x8_mad_cow_dc_0l0, depth);\
   +        if (chroma_format_idc == 1) {\
   +            h-pred8x8[DC_PRED8x8     ]= FUNCC(pred8x8_dc              
      , depth);\
   +            h-pred8x8[LEFT_DC_PRED8x8]= FUNCC(pred8x8_left_dc         
          , depth);\
   +            h-pred8x8[TOP_DC_PRED8x8 ]= FUNCC(pred8x8_top_dc          
      , depth);\
   +            h-pred8x8[ALZHEIMER_DC_L0T_PRED8x8 ]= 
   FUNC(pred8x8_mad_cow_dc_l0t, depth);\
   +            h-pred8x8[ALZHEIMER_DC_0LT_PRED8x8 ]= 
   FUNC(pred8x8_mad_cow_dc_0lt, depth);\
   +            h-pred8x8[ALZHEIMER_DC_L00_PRED8x8 ]= 
   FUNC(pred8x8_mad_cow_dc_l00, depth);\
   +            h-pred8x8[ALZHEIMER_DC_0L0_PRED8x8 ]= 
   FUNC(pred8x8_mad_cow_dc_0l0, depth);\
   +        } else {\
   +            h-pred8x8[DC_PRED8x8     ]= FUNCC(pred8x16_dc             
          , depth);\
   +            h-pred8x8[LEFT_DC_PRED8x8]= FUNCC(pred8x16_left_dc        
      , depth);\
   +            h-pred8x8[TOP_DC_PRED8x8 ]= FUNCC(pred8x16_top_dc         
          , depth);\
   +            h-pred8x8[ALZHEIMER_DC_L0T_PRED8x8 ]= 
   FUNC(pred8x8_mad_cow_dc_l0t, depth);\
   +            h-pred8x8[ALZHEIMER_DC_0LT_PRED8x8 ]= 
   FUNC(pred8x8_mad_cow_dc_0lt, depth);\
   +            h-pred8x8[ALZHEIMER_DC_L00_PRED8x8 ]= 
   FUNC(pred8x8_mad_cow_dc_l00, depth);\
   +            h-pred8x8[ALZHEIMER_DC_0L0_PRED8x8 ]= 
   FUNC(pred8x8_mad_cow_dc_0l0, depth);\
   +        }\
 
  Typo? The last 4 should be 8x16, not 8x8.
 
  There is no such function.

 That's because there isn't a single 8x16 function right now. They have
 to be written, e.g. this patch writes the one referenced above.

 But this patch does not add any pred8x16_mad_cow functions.
 I'm not following you.

Thus, the patch is wrong, right? This is what patch review does. It
finds mistakes in patches, which are then subsequently fixed.

I think you should write the pred8x16_madcow functions.

  I believe the neon code misses the if (chroma == 1) additions to the
  8x8 prediction init code. They should be added, else fate will fail on
  arm devices.
 
  You missed the if() being added in libavcodec/arm/h264dsp_init_arm.c :)

 I expect them also in ff_h264_pred_init_neon(), similar to the ones in
 the C init code.

 ff_h264_idct_add8_neon is only referenced in one place, where it is put
 under if().

I expect all chroma 8x8 arm predict functions to be under a similar
if(). Is that more clear?

Ronald
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 4/4] h264: 4:2:2 intra decoding support

2011-08-16 Thread madshi
2011/8/16 Diego Biurrun di...@biurrun.de
 From: Baptiste Coudurier baptiste.coudur...@gmail.com
 Signed-off-by: Diego Biurrun di...@biurrun.de

Wow, very nice - thanks a lot!   :-)

Best regards, madshi.
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 4/4] h264: 4:2:2 intra decoding support

2011-08-16 Thread Ronald S. Bultje
Hi,

On Tue, Aug 16, 2011 at 8:05 AM, Diego Biurrun di...@biurrun.de wrote:
 -        h-pred8x8[DC_PRED8x8     ]= FUNCC(pred8x8_dc                     , 
 depth);\
 -        h-pred8x8[LEFT_DC_PRED8x8]= FUNCC(pred8x8_left_dc                , 
 depth);\
 -        h-pred8x8[TOP_DC_PRED8x8 ]= FUNCC(pred8x8_top_dc                 , 
 depth);\
 -        h-pred8x8[ALZHEIMER_DC_L0T_PRED8x8 ]= FUNC(pred8x8_mad_cow_dc_l0t, 
 depth);\
 -        h-pred8x8[ALZHEIMER_DC_0LT_PRED8x8 ]= FUNC(pred8x8_mad_cow_dc_0lt, 
 depth);\
 -        h-pred8x8[ALZHEIMER_DC_L00_PRED8x8 ]= FUNC(pred8x8_mad_cow_dc_l00, 
 depth);\
 -        h-pred8x8[ALZHEIMER_DC_0L0_PRED8x8 ]= FUNC(pred8x8_mad_cow_dc_0l0, 
 depth);\
 +        if (chroma_format_idc == 1) {\
 +            h-pred8x8[DC_PRED8x8     ]= FUNCC(pred8x8_dc                    
  , depth);\
 +            h-pred8x8[LEFT_DC_PRED8x8]= FUNCC(pred8x8_left_dc               
  , depth);\
 +            h-pred8x8[TOP_DC_PRED8x8 ]= FUNCC(pred8x8_top_dc                
  , depth);\
 +            h-pred8x8[ALZHEIMER_DC_L0T_PRED8x8 ]= 
 FUNC(pred8x8_mad_cow_dc_l0t, depth);\
 +            h-pred8x8[ALZHEIMER_DC_0LT_PRED8x8 ]= 
 FUNC(pred8x8_mad_cow_dc_0lt, depth);\
 +            h-pred8x8[ALZHEIMER_DC_L00_PRED8x8 ]= 
 FUNC(pred8x8_mad_cow_dc_l00, depth);\
 +            h-pred8x8[ALZHEIMER_DC_0L0_PRED8x8 ]= 
 FUNC(pred8x8_mad_cow_dc_0l0, depth);\
 +        } else {\
 +            h-pred8x8[DC_PRED8x8     ]= FUNCC(pred8x16_dc                   
  , depth);\
 +            h-pred8x8[LEFT_DC_PRED8x8]= FUNCC(pred8x16_left_dc              
  , depth);\
 +            h-pred8x8[TOP_DC_PRED8x8 ]= FUNCC(pred8x16_top_dc               
  , depth);\
 +            h-pred8x8[ALZHEIMER_DC_L0T_PRED8x8 ]= 
 FUNC(pred8x8_mad_cow_dc_l0t, depth);\
 +            h-pred8x8[ALZHEIMER_DC_0LT_PRED8x8 ]= 
 FUNC(pred8x8_mad_cow_dc_0lt, depth);\
 +            h-pred8x8[ALZHEIMER_DC_L00_PRED8x8 ]= 
 FUNC(pred8x8_mad_cow_dc_l00, depth);\
 +            h-pred8x8[ALZHEIMER_DC_0L0_PRED8x8 ]= 
 FUNC(pred8x8_mad_cow_dc_0l0, depth);\
 +        }\

Typo? The last 4 should be 8x16, not 8x8.

I believe the neon code misses the if (chroma == 1) additions to the
8x8 prediction init code. They should be added, else fate will fail on
arm devices.

Ronald
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel