libschroedinger.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * Copyright (c) 2008 BBC, Anuradha Suraparaju <asuraparaju at gmail dot com >
  3. *
  4. * This file is part of FFmpeg.
  5. *
  6. * FFmpeg 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. * FFmpeg 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 FFmpeg; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  19. */
  20. /**
  21. * @file libavcodec/libschroedinger.h
  22. * data structures common to libschroedingerdec.c and libschroedingerenc.c
  23. */
  24. #ifndef AVCODEC_LIBSCHROEDINGER_H
  25. #define AVCODEC_LIBSCHROEDINGER_H
  26. #include "config.h"
  27. #if CONFIG_LIBSCHROEDINGER
  28. #include <schroedinger/schrobitstream.h>
  29. #include <schroedinger/schroframe.h>
  30. #include "avcodec.h"
  31. static const struct {
  32. enum PixelFormat ff_pix_fmt;
  33. SchroChromaFormat schro_pix_fmt;
  34. SchroFrameFormat schro_frame_fmt;
  35. } ffmpeg_schro_pixel_format_map[] = {
  36. { PIX_FMT_YUV420P, SCHRO_CHROMA_420, SCHRO_FRAME_FORMAT_U8_420 },
  37. { PIX_FMT_YUV422P, SCHRO_CHROMA_422, SCHRO_FRAME_FORMAT_U8_422 },
  38. { PIX_FMT_YUV444P, SCHRO_CHROMA_444, SCHRO_FRAME_FORMAT_U8_444 },
  39. };
  40. /**
  41. * Returns the video format preset matching the input video dimensions and
  42. * time base.
  43. */
  44. SchroVideoFormatEnum ff_get_schro_video_format_preset (AVCodecContext *avccontext);
  45. /**
  46. * Sets the Schroedinger frame format corresponding to the Schro chroma format
  47. * passed. Returns 0 on success, -1 on failure.
  48. */
  49. int ff_get_schro_frame_format (SchroChromaFormat schro_chroma_fmt,
  50. SchroFrameFormat *schro_frame_fmt);
  51. #endif /* CONFIG_LIBSCHROEDINGER */
  52. #endif /* AVCODEC_LIBSCHROEDINGER_H */