[Ffmpeg-devel] [RFC] Move VC1 functions to DSPContext

Michael Niedermayer michaelni
Sat Jul 29 10:13:31 CEST 2006


Hi

On Sat, Jul 29, 2006 at 06:27:50AM +0300, Kostya wrote:
> I plan to apply this patch. Is it ok to do so? After this code split it will
> be easier to deal with optimizations (and this will be closer to overall lavc
> structure).

[...]
>      }
>  
>      if(v->rangeredfrm || (v->mv_mode == MV_PMODE_INTENSITY_COMP)
> -       || (unsigned)src_x > s->h_edge_pos - (mx&3) - 16
> -       || (unsigned)src_y > s->v_edge_pos - (my&3) - 16){
> -        uint8_t *uvbuf= s->edge_emu_buffer + 18 * s->linesize;
> -
> -        ff_emulated_edge_mc(s->edge_emu_buffer, srcY, s->linesize, 16+1, 16+1,
> -                            src_x, src_y, s->h_edge_pos, s->v_edge_pos);
> +       || (unsigned)(src_x - s->mspel) > s->h_edge_pos - (mx&3) - 16 - s->mspel*3
> +       || (unsigned)(src_y - s->mspel) > s->v_edge_pos - (my&3) - 16 - s->mspel*3){
> +        uint8_t *uvbuf= s->edge_emu_buffer + 19 * s->linesize;
> +
> +        srcY -= s->mspel * (1 + s->linesize);
> +        ff_emulated_edge_mc(s->edge_emu_buffer, srcY, s->linesize, 17+s->mspel*2, 17+s->mspel*2,
> +                            src_x - s->mspel, src_y - s->mspel, s->h_edge_pos, s->v_edge_pos);

this looks like a unrelated change which if so should be in its own 
patch / commit

[...]

> +void ff_put_vc1_mspel_mc10_c(uint8_t *dst, const uint8_t *src, int stride, int rnd) {
> +    vc1_mspel_mc(dst, src, stride, 0x1, rnd);
> +}
> +
> +void ff_put_vc1_mspel_mc20_c(uint8_t *dst, const uint8_t *src, int stride, int rnd) {
> +    vc1_mspel_mc(dst, src, stride, 0x2, rnd);
> +}
> +
> +void ff_put_vc1_mspel_mc30_c(uint8_t *dst, const uint8_t *src, int stride, int rnd) {
> +    vc1_mspel_mc(dst, src, stride, 0x3, rnd);
> +}
> +
> +void ff_put_vc1_mspel_mc01_c(uint8_t *dst, const uint8_t *src, int stride, int rnd) {
> +    vc1_mspel_mc(dst, src, stride, 0x4, rnd);
> +}
> +
> +void ff_put_vc1_mspel_mc11_c(uint8_t *dst, const uint8_t *src, int stride, int rnd) {
> +    vc1_mspel_mc(dst, src, stride, 0x5, rnd);
> +}
> +
> +void ff_put_vc1_mspel_mc21_c(uint8_t *dst, const uint8_t *src, int stride, int rnd) {
> +    vc1_mspel_mc(dst, src, stride, 0x6, rnd);
> +}
> +
> +void ff_put_vc1_mspel_mc31_c(uint8_t *dst, const uint8_t *src, int stride, int rnd) {
> +    vc1_mspel_mc(dst, src, stride, 0x7, rnd);
> +}
> +
> +void ff_put_vc1_mspel_mc02_c(uint8_t *dst, const uint8_t *src, int stride, int rnd) {
> +    vc1_mspel_mc(dst, src, stride, 0x8, rnd);
> +}
> +
> +void ff_put_vc1_mspel_mc12_c(uint8_t *dst, const uint8_t *src, int stride, int rnd) {
> +    vc1_mspel_mc(dst, src, stride, 0x9, rnd);
> +}
> +
> +void ff_put_vc1_mspel_mc22_c(uint8_t *dst, const uint8_t *src, int stride, int rnd) {
> +    vc1_mspel_mc(dst, src, stride, 0xA, rnd);
> +}
> +
> +void ff_put_vc1_mspel_mc32_c(uint8_t *dst, const uint8_t *src, int stride, int rnd) {
> +    vc1_mspel_mc(dst, src, stride, 0xB, rnd);
> +}
> +
> +void ff_put_vc1_mspel_mc03_c(uint8_t *dst, const uint8_t *src, int stride, int rnd) {
> +    vc1_mspel_mc(dst, src, stride, 0xC, rnd);
> +}
> +
> +void ff_put_vc1_mspel_mc13_c(uint8_t *dst, const uint8_t *src, int stride, int rnd) {
> +    vc1_mspel_mc(dst, src, stride, 0xD, rnd);
> +}
> +
> +void ff_put_vc1_mspel_mc23_c(uint8_t *dst, const uint8_t *src, int stride, int rnd) {
> +    vc1_mspel_mc(dst, src, stride, 0xE, rnd);
> +}
> +
> +void ff_put_vc1_mspel_mc33_c(uint8_t *dst, const uint8_t *src, int stride, int rnd) {
> +    vc1_mspel_mc(dst, src, stride, 0xF, rnd);
> +}

these functions arent used outside vc1dsp.c -> they should be static

furthermore vc1dsp.c could be svn copied from vc1.c to preserve history

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

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list