[FFmpeg-devel] Patch review request: 10bit DNxHD decoding support

Michael Niedermayer michaelni
Fri Mar 11 00:03:14 CET 2011


On Thu, Mar 10, 2011 at 04:36:44PM +0000, Joseph Artsimovich wrote:
> Hi,
> 
> At this point I am happy with my patch adding support for decoding 10bit DNxHD, apart from poor performance due to the lack of assembly optimized IDCT code that can handle 10bit samples.  Please review and give feedback.
[...]
> @@ -166,3 +166,26 @@ void ff_faanidct_put(uint8_t *dest, int line_size, DCTELEM block[64]){
>      p8idct(block, temp, NULL,         0, 1, 8, 0);
>      p8idct(NULL , temp, dest, line_size, 8, 1, 3);
>  }
> +
> +void ff_faanidct10_put(uint16_t *dest, int line_size, DCTELEM block[64]){
> +    FLOAT temp[64];
> +    FLOAT* p_tmp = temp;
> +    int i, j;
> +
> +    emms_c();

this should be moved out of the inner loop of the codec


> +
> +    for(i=0; i<64; i++)
> +        temp[i] = block[i] * prescale[i];
> +
> +    p8idct(NULL, temp, NULL,         0, 1, 8, 0);
> +    p8idct(NULL, temp, NULL,         0, 8, 1, 0);
> +
> +    for (i = 0; i < 8; ++i) {
> +        for (j = 0; j < 8; ++j) {
> +            int val = (int)lrintf((float)p_tmp[j] * (65536.0f / 1023.0f) + 0.5f);

the scaling can be merged with prescale and +0.5 looks wrong

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110311/0bd99ae9/attachment.pgp>



More information about the ffmpeg-devel mailing list