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.

46 lines
1.6KB

  1. /*
  2. * This file is part of Libav.
  3. *
  4. * Libav is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2.1 of the License, or (at your option) any later version.
  8. *
  9. * Libav is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with Libav; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  17. */
  18. #ifndef AVCODEC_VAAPI_ENCODE_H26X_H
  19. #define AVCODEC_VAAPI_ENCODE_H26X_H
  20. #include <stddef.h>
  21. #include <stdint.h>
  22. #include "golomb.h"
  23. #include "put_bits.h"
  24. // Debug code may be interested in the name of the syntax element being
  25. // for tracing purposes. Here, it is just discarded.
  26. #define write_u(pbc, width, value, name) put_bits(pbc, width, value)
  27. #define write_ue(pbc, value, name) set_ue_golomb(pbc, value)
  28. #define write_se(pbc, value, name) set_se_golomb(pbc, value)
  29. #define u(width, ...) write_u(pbc, width, __VA_ARGS__)
  30. #define ue(...) write_ue(pbc, __VA_ARGS__)
  31. #define se(...) write_se(pbc, __VA_ARGS__)
  32. // Copy from src to dst, applying emulation prevention.
  33. int ff_vaapi_encode_h26x_nal_unit_to_byte_stream(uint8_t *dst, size_t *dst_len,
  34. uint8_t *src, size_t src_len);
  35. #endif /* AVCODEC_VAAPI_ENCODE_H26X_H */