]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/libtheoraenc.c
gcc chokes on xmm constraints, so pessimize int32_to_float_fmul_scalar_sse a little
[ffmpeg] / libavcodec / libtheoraenc.c
index 7f531dbee546805f699f4299db4447c9801e6f2e..d7f635ca794c8a9b4900b792061c3655bb16d215 100644 (file)
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 /*!
@@ -31,8 +31,8 @@
  */
 
 /* FFmpeg includes */
+#include "libavutil/log.h"
 #include "avcodec.h"
-#include "log.h"
 
 /* libtheora includes */
 #include <theora/theora.h>
@@ -69,8 +69,8 @@ static int concatenate_packet(unsigned int* offset, AVCodecContext* avc_context,
 
     avc_context->extradata = newdata;
     avc_context->extradata_size = newsize;
-    avc_context->extradata[ (*offset)++ ] = packet->bytes >> 8;
-    avc_context->extradata[ (*offset)++ ] = packet->bytes & 0xff;
+    AV_WB16(avc_context->extradata + (*offset), packet->bytes);
+    *offset += 2;
     memcpy( avc_context->extradata + (*offset), packet->packet, packet->bytes );
     (*offset) += packet->bytes;
     return 0;
@@ -264,7 +264,7 @@ static int encode_close(AVCodecContext* avc_context)
     return -1;
 }
 
-static const enum PixelFormat supported_pixel_formats[] = { PIX_FMT_YUV420P, -1 };
+static const enum PixelFormat supported_pixel_formats[] = { PIX_FMT_YUV420P, PIX_FMT_NONE };
 
 /*! AVCodec struct exposed to libavcodec */
 AVCodec libtheora_encoder =
@@ -277,4 +277,5 @@ AVCodec libtheora_encoder =
     .close = encode_close,
     .encode = encode_frame,
     .pix_fmts = supported_pixel_formats,
+    .long_name = NULL_IF_CONFIG_SMALL("libtheora Theora"),
 };