You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
2.2KB

  1. /*
  2. * SVQ1 encoder
  3. *
  4. * This file is part of Libav.
  5. *
  6. * Libav is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * Libav is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with Libav; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  19. */
  20. #ifndef AVCODEC_SVQ1ENC_H
  21. #define AVCODEC_SVQ1ENC_H
  22. #include <stdint.h>
  23. #include "libavutil/frame.h"
  24. #include "avcodec.h"
  25. #include "get_bits.h"
  26. #include "hpeldsp.h"
  27. #include "me_cmp.h"
  28. #include "mpegvideo.h"
  29. #include "put_bits.h"
  30. typedef struct SVQ1EncContext {
  31. /* FIXME: Needed for motion estimation, should not be used for anything
  32. * else, the idea is to make the motion estimation eventually independent
  33. * of MpegEncContext, so this will be removed then. */
  34. MpegEncContext m;
  35. AVCodecContext *avctx;
  36. MECmpContext mecc;
  37. HpelDSPContext hdsp;
  38. AVFrame *current_picture;
  39. AVFrame *last_picture;
  40. PutBitContext pb;
  41. GetBitContext gb;
  42. /* why ooh why this sick breadth first order,
  43. * everything is slower and more complex */
  44. PutBitContext reorder_pb[6];
  45. int frame_width;
  46. int frame_height;
  47. /* Y plane block dimensions */
  48. int y_block_width;
  49. int y_block_height;
  50. /* U & V plane (C planes) block dimensions */
  51. int c_block_width;
  52. int c_block_height;
  53. uint16_t *mb_type;
  54. uint32_t *dummy;
  55. int16_t (*motion_val8[3])[2];
  56. int16_t (*motion_val16[3])[2];
  57. int64_t rd_total;
  58. uint8_t *scratchbuf;
  59. int (*ssd_int8_vs_int16)(const int8_t *pix1, const int16_t *pix2,
  60. int size);
  61. } SVQ1EncContext;
  62. void ff_svq1enc_init_ppc(SVQ1EncContext *c);
  63. void ff_svq1enc_init_x86(SVQ1EncContext *c);
  64. #endif /* AVCODEC_SVQ1ENC_H */