[x265] [PATCH] added csp support for blpckcopy_ps

chen chenm003 at 163.com
Tue Nov 19 02:59:47 CET 2013


At 2013-11-19 04:42:21,"Steve Borho" <steve at borho.org> wrote:
>
>On Nov 18, 2013, at 9:23 AM, praveen at multicorewareinc.com wrote:
>
>> # HG changeset patch
>> # User Praveen Tiwari
>> # Date 1384788209 -19800
>> # Node ID 59646d515e79b4d0f9a3a72c77c7af17a83bf3d9
>> # Parent  b353d170c54f0e33a8869c413be226a48deb1f5c
>> added csp support for blpckcopy_ps
>> 
>> diff -r b353d170c54f -r 59646d515e79 source/common/pixel.cpp
>> --- a/source/common/pixel.cpp Mon Nov 18 19:34:07 2013 +0530
>> +++ b/source/common/pixel.cpp Mon Nov 18 20:53:29 2013 +0530
>> @@ -837,7 +837,7 @@
>> #define CHROMA(W, H) \
>>  p.chroma_copy_pp[CSP_I420][CHROMA_ ## W ## x ## H] = blockcopy_pp_c<W, H>; \
>>  p.chroma_copy_sp[CHROMA_ ## W ## x ## H] = blockcopy_sp_c<W, H>; \
>> -    p.chroma_copy_ps[CHROMA_ ## W ## x ## H] = blockcopy_ps_c<W, H>;\
>> +    p.chroma_copy_ps[CSP_I420][CHROMA_ ## W ## x ## H] = blockcopy_ps_c<W, H>;\
>>  p.chroma_sub_ps[CHROMA_ ## W ## x ## H] = pixel_sub_ps_c<W, H>;
>> 
>> #define LUMA(W, H) \
>> diff -r b353d170c54f -r 59646d515e79 source/common/primitives.h
>> --- a/source/common/primitives.h Mon Nov 18 19:34:07 2013 +0530
>> +++ b/source/common/primitives.h Mon Nov 18 20:53:29 2013 +0530
>> @@ -247,7 +247,7 @@
>>  copy_sp_t       luma_copy_sp[NUM_LUMA_PARTITIONS];
>>  copy_sp_t       chroma_copy_sp[NUM_CHROMA_PARTITIONS];
>>  copy_ps_t       luma_copy_ps[NUM_LUMA_PARTITIONS];
>> -    copy_ps_t       chroma_copy_ps[NUM_CHROMA_PARTITIONS];
>> +    copy_ps_t       chroma_copy_ps[NUM_CSP][NUM_CHROMA_PARTITIONS];
>> 
>>  pixel_sub_ps_t  luma_sub_ps[NUM_LUMA_PARTITIONS];
>>  pixel_sub_ps_t  chroma_sub_ps[NUM_CHROMA_PARTITIONS];
>> diff -r b353d170c54f -r 59646d515e79 source/common/x86/asm-primitives.cpp
>> --- a/source/common/x86/asm-primitives.cpp Mon Nov 18 19:34:07 2013 +0530
>> +++ b/source/common/x86/asm-primitives.cpp Mon Nov 18 20:53:29 2013 +0530
>> @@ -141,7 +141,6 @@
>>  p.chroma_hps[CHROMA_ ## W ## x ## H] = x265_interp_4tap_horiz_ps_ ## W ## x ## H ## cpu; \
>>  p.chroma_vpp[CHROMA_ ## W ## x ## H] = x265_interp_4tap_vert_pp_ ## W ## x ## H ## cpu; \
>>  p.chroma_vps[CHROMA_ ## W ## x ## H] = x265_interp_4tap_vert_ps_ ## W ## x ## H ## cpu; \
>> -    p.chroma_copy_ps[CHROMA_ ## W ## x ## H] = x265_blockcopy_ps_ ## W ## x ## H ## cpu; \
>>  p.chroma_sub_ps[CHROMA_ ## W ## x ## H] = x265_pixel_sub_ps_ ## W ## x ## H ## cpu;
>> 
>> #define SETUP_CHROMA_SP_FUNC_DEF(W, H, cpu) \
>> @@ -380,6 +379,36 @@
>>  SETUP_LUMA_BLOCKCOPY_FUNC_DEF(64, 16, cpu); \
>>  SETUP_LUMA_BLOCKCOPY_FUNC_DEF(16, 64, cpu);
>> 
>> +#define SETUP_CHROMA_FROM_LUMA_SSE4(W1, H1, W2, H2, cpu) \
>> +    p.chroma_copy_ps[X265_CSP_I420][LUMA_ ## W1 ## x ## H1] = x265_blockcopy_ps_ ## W2 ## x ## H2 ## cpu;
>> +
>> +// For X265_CSP_I420 chroma width and height will be half of luma width and height
>> +#define CHROMA_BLOCKCOPY_SSE4(cpu) \
>
>When the macro accepts a cpu type argument, adding SSE4 to the name is redundant (and confusing)
>there should probably be a generic I420 macro that maps luma blocks to I420 blocks so adding more color spaces does not multiply amount of code in this file
>
Steve give us a good idea, we may modify macro to SETUP_CHROMA_FROM_LUMA(W1, H1, W2, H2, cpu, csp)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20131119/8c79e77c/attachment-0001.html>


More information about the x265-devel mailing list